/* ==================================================
   EOS BASE STYLES â€” GLOBAL LAYOUT + NORMALISATION
   ================================================== */

/* ============================
   1) GLOBAL FOUNDATION
   ============================ */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--color-bg-page);
  color: var(--color-text-primary);
  font-family: var(--font-family-base);
  font-size: var(--font-size-md);
  line-height: 1.4;
}

/* ============================
   2) GLOBAL WRAPPERS
   ============================ */
/* Offset fixed top navigation/menu */
.page-wrapper {
  padding-top: var(--page-offset-top);
  padding-bottom: var(--page-offset-bottom);
  margin: 0;
}

/* Header logo image (desktop hidden, mobile shown) */
.title-bar img {
  max-width: 100%;
  height: auto;
  margin: var(--space-5) auto;
  display: none;
}

/* ============================
   3) GLOBAL CONTROL STANDARD
   ============================ */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea,
  button) {
  font-family: var(--font-family-base) !important;
  font-size: var(--font-size-md) !important;
  border-radius: var(--radius-lg) !important;
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea,
  button) {
  min-height: var(--control-height);
  padding: var(--control-padding-y) var(--control-padding-x);
  margin: var(--control-margin-y) 0;
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea) {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 2px solid #cfe7f5;
  background: linear-gradient(180deg, #ffffff, #edf7fc);
  color: #0f2a37;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 8px rgba(11,79,104,.05);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease, transform .08s ease;
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea):focus,
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea):focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(42, 144, 184, 0.18);
  background: #ffffff;
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea,
  button):focus-visible {
  outline: none;
}

:where(input[readonly]:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  textarea[readonly]) {
  background: #f4f8fa;
  color: #5f7480;
}

/* Date/time control polish */
input[type="date"],
input[type="datetime-local"],
input[type="time"] {
  min-width: 170px;
  appearance: none;
  -webkit-appearance: none;
  padding-top: calc(var(--control-padding-y) * 0.5) !important;
  padding-bottom: calc(var(--control-padding-y) * 0.5) !important;
  margin-top: calc(var(--control-margin-y) * 0.5) !important;
  margin-bottom: calc(var(--control-margin-y) * 0.5) !important;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.85;
  filter: saturate(0.9) contrast(1.05);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--color-text-secondary) 50%),
    linear-gradient(135deg, var(--color-text-secondary) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 1px),
    calc(100% - 12px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  margin: 0;
  border-radius: 8px;
  border: 2px solid #8fc6dc;
  background: linear-gradient(180deg, #ffffff, #edf7fc);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 6px rgba(11,79,104,.08);
  cursor: pointer;
  position: relative;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .08s ease;
}

input[type="checkbox"]:hover {
  border-color: #63b6d8;
}

input[type="checkbox"]:checked {
  background: linear-gradient(180deg, #2a90b8, #1d6f8e);
  border-color: #0b4f68;
  box-shadow: 0 0 0 3px rgba(42, 144, 184, 0.16);
}

input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 1px;
  width: 5px;
  height: 11px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

input[type="checkbox"]:focus,
input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(42, 144, 184, 0.18);
}

/* Required / validation error state */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea).is-required-missing-control {
  border: 2px solid #dc2626 !important;
  background: #fff5f5 !important;
  color: #7f1d1d !important;
  -webkit-text-fill-color: #7f1d1d !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.16) !important;
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea).is-required-missing-control:focus,
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea).is-required-missing-control:focus-visible {
  border-color: #b91c1c !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.22) !important;
  background: #fff !important;
}

input[type="checkbox"].is-required-missing-control {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.16) !important;
}

/* ============================
   4) GLOBAL SCROLLBARS
   ============================ */
html,
body,
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(42, 144, 184, 0.9) rgba(11, 43, 58, 0.14);
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(11, 43, 58, 0.14), rgba(42, 144, 184, 0.08));
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2a90b8, #1d6f8d);
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(42, 144, 184, 0.35), 0 6px 16px rgba(11, 43, 58, 0.25);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #34a7d6, #1f7c9f);
}

/* ============================
   5) MOBILE OVERRIDES
   ============================ */
@media (max-width: 795px) {
  .page-wrapper {
    padding-top: var(--page-offset-top-mobile);
  }

  .title-bar {
    flex-direction: column;
    margin-top: -20px !important;
    align-items: center;
    text-align: center;
  }

  .title-bar img {
    display: block;
    margin-bottom: var(--space-2) !important;
  }
}

.eos-nav-icon-wrap{position:relative;display:inline-flex}
.eos-nav-badge{
  position:absolute;
  top:5px;
  right:0px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  background:#d90429;
  color:#fff;
  font-size:0.72rem;
  font-weight:800;
  line-height:18px;
  text-align:center;
  border:2px solid #fff;
  box-shadow:0 2px 6px rgba(0,0,0,.28);
  z-index:5;
}

/* Instruction cards: no underlines + black text */
.instructions a,
.instructions a:visited,
.instructions a:hover,
.instructions a:focus,
.instructions a:active{
  text-decoration:none !important;
  color:#000 !important;
}

.instructions,
.instructions h1,
.instructions h2,
.instructions h3,
.instructions h4,
.instructions p,
.instructions .instruction-item,
.instructions .instruction-item p{
  color:#000 !important;
}

