/* NestSacco auth — production enterprise (pre-2.10.64 style) */
:root {
  --auth-blue: #003366;
  --auth-teal: #0F766E;
  --auth-teal-dark: #0B5F58;
  --auth-yellow: #FFDB00;
  --auth-bg: #EEF2F7;
  --auth-text: #0f172a;
  --auth-muted: #475569;
  --auth-border: #CBD5E1;
  --auth-radius: 14px;
  --auth-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --auth-field-h: 44px;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; }
body.auth-page {
  margin: 0;
  font-family: var(--auth-font);
  color: var(--auth-text);
  background: #EEF2F7 !important;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
  border: 0;
}
@media (min-width: 1100px) {
  body.auth-page {
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-height: 100vh;
  }
  .auth-shell {
    margin: 1.25rem auto;
    min-height: calc(100vh - 2.5rem);
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid #0B1220;
    box-shadow: 0 8px 0 #0B1220;
  }
}
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; min-height: auto; }
  .auth-panel-left { min-height: auto; padding: 1.25rem 1.35rem !important; }
  .auth-panel-left h1 { font-size: 1.4rem !important; }
}

.auth-panel-left {
  background: #003366 !important;
  color: #fff;
  padding: 1.75rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-panel-left h1,
.auth-panel-left h2,
.auth-panel-left p,
.auth-panel-left li { color: #fff !important; }
.auth-brand { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 1.35rem; }
.auth-brand .mark {
  width: 44px; height: 44px;
  background: #fff; color: #003366;
  font-weight: 900; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
}
.auth-brand span { font-weight: 800; font-size: 1rem; }
.auth-panel-left h1 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}
.auth-panel-left h1 em { font-style: normal; color: var(--auth-yellow); }
.auth-note {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.92);
  max-width: 28rem;
}
.auth-foot {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.78);
  margin-top: 1.5rem;
}
.auth-foot a { color: var(--auth-yellow); text-decoration: none; font-weight: 700; }
.auth-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(255,255,255,0.18);
  color: #fff; text-decoration: none;
  font-size: 1rem; margin-bottom: 1rem; font-weight: 700;
}

.auth-panel-right {
  background: #F8FAFC !important;
  padding: 1.5rem 1.75rem 2rem;
  overflow-y: auto;
  min-width: 0;
}
.auth-form-wrap {
  background: #fff !important;
  border: 2px solid #E2E8F0 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 16px rgba(15,23,42,0.06) !important;
  padding: 1.25rem 1.35rem 1.5rem;
  max-width: 100%;
}
.auth-form-wrap.wide { max-width: 100%; }
.auth-form-wrap h2 { margin: 0 0 1rem; font-size: 1.1rem; font-weight: 800; }

.auth-field { margin-bottom: 0.85rem; }
.auth-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.3rem;
}
.auth-field input,
.auth-field select,
.auth-field textarea,
.auth-form-wrap input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.auth-form-wrap select,
.auth-form-wrap textarea {
  width: 100%;
  height: var(--auth-field-h);
  padding: 0 0.75rem;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--auth-text);
  background: #fff !important;
  border: 1.5px solid var(--auth-border) !important;
  border-radius: 10px !important;
  outline: none;
}
.auth-field textarea { height: auto; min-height: 88px; padding: 0.65rem 0.75rem; }
.auth-field input:focus,
.auth-field select:focus {
  border-color: var(--auth-teal) !important;
  box-shadow: 0 0 0 3px rgba(15,118,110,0.15);
}
.auth-field-row { display: flex; gap: 0.5rem; }
.auth-field-row .auth-field { flex: 1; margin-bottom: 0; min-width: 0; }

.auth-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 0.85rem;
}
.auth-grid2 .auth-field { margin-bottom: 0; }
.auth-grid2 .span2 { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .auth-grid2 { grid-template-columns: 1fr; }
}

.auth-steps { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.1rem; }
.auth-step-pill {
  display: inline-flex; align-items: center;
  padding: 0.35rem 0.7rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 800;
  background: #E2E8F0; color: #64748B;
}
.auth-step-pill.on { background: #0F766E !important; color: #fff !important; }

.auth-btn-primary,
button.auth-btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 46px;
  border: none; border-radius: 11px;
  background: #0F766E !important; color: #fff !important;
  font-weight: 800; font-size: 0.95rem; font-family: inherit;
  cursor: pointer; text-decoration: none;
}
.auth-btn-primary:hover { background: #0B5F58 !important; }
.auth-btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  height: 42px; padding: 0 1rem;
  border: 1.5px solid #CBD5E1; border-radius: 10px;
  background: #fff; color: #0f172a; font-weight: 700; font-size: 0.88rem;
  cursor: pointer; text-decoration: none; font-family: inherit;
}
.auth-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.auth-actions .auth-btn-primary { flex: 1 1 140px; width: auto; }

.auth-alert {
  padding: 0.7rem 0.85rem; border-radius: 10px;
  font-size: 0.88rem; font-weight: 600; margin-bottom: 0.85rem;
}
.auth-alert-info { background: #ECFDF5; color: #065F46; }
.auth-alert-error { background: #FEF2F2; color: #991B1B; }
.auth-links {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 0.5rem 1rem; margin-top: 1rem;
  font-size: 0.88rem; font-weight: 700;
}
.auth-links a { color: #0B5F58; text-decoration: none; }
.auth-check {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.88rem; font-weight: 700; margin-bottom: 0.85rem;
}
.auth-check input { width: auto; height: auto; }


/* Material registration aesthetics */
body.auth-page { background: linear-gradient(160deg, #E8EEF5 0%, #F1F5F9 40%, #E2E8F0 100%) !important; }
.auth-form-wrap {
  background: #fff !important;
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.08) !important;
  padding: 1.35rem 1.4rem 1.6rem !important;
}
.auth-field label {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #475569 !important;
}
.auth-field input,
.auth-field select,
.auth-field textarea {
  background: #F8FAFC !important;
  border: 1.5px solid #E2E8F0 !important;
  border-radius: 12px !important;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.auth-field input:focus,
.auth-field select:focus {
  background: #fff !important;
  border-color: #0F766E !important;
  box-shadow: 0 0 0 3px rgba(15,118,110,.14) !important;
}
.auth-step-pill {
  background: #E2E8F0;
  box-shadow: none;
}
.auth-step-pill.on {
  background: linear-gradient(135deg, #0F766E, #14B8A6) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(15,118,110,.35);
}
.ea-country-chip.on {
  border-color: #0F766E !important;
  background: #ECFDF5 !important;
  color: #0B5F58 !important;
}
.auth-panel-left {
  background: linear-gradient(165deg, #0B1220 0%, #0F766E 55%, #0E7490 100%) !important;
}


/* ========== Inline phone + password + country chips ========== */
.ea-phone-field { margin-bottom: 0.85rem; min-width: 0; }
.ea-phone-field > label {
  display: block;
  margin-bottom: 0.3rem;
}
.ea-phone-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.45rem !important;
  width: 100%;
}
.ea-phone-flag {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: var(--auth-field-h, 44px) !important;
}
.ea-phone-flag img,
.ns-flag {
  display: block !important;
  width: 22px !important;
  height: 16px !important;
  object-fit: cover !important;
  border-radius: 2px !important;
}
.ea-dial-select {
  flex: 0 0 auto !important;
  width: 7.5rem !important;
  max-width: 9rem !important;
  min-width: 6.5rem !important;
  height: var(--auth-field-h, 44px) !important;
  padding: 0 0.4rem !important;
  font-weight: 800 !important;
  font-size: 0.88rem !important;
  border-radius: 12px !important;
  border: 1.5px solid #E2E8F0 !important;
  background: #F1F5F9 !important;
  color: #0f172a !important;
  margin: 0 !important;
}
.ea-phone-input {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: auto !important;
  height: var(--auth-field-h, 44px) !important;
  margin: 0 !important;
  padding: 0 0.75rem !important;
  font-size: 16px !important; /* no iOS zoom */
  font-weight: 600 !important;
  border-radius: 12px !important;
  border: 1.5px solid #E2E8F0 !important;
  background: #F8FAFC !important;
}
.ea-phone-input:focus,
.ea-dial-select:focus {
  outline: none;
  border-color: #0F766E !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(15,118,110,.14);
}

/* Nested auth-field inside row must not stack full width */
.auth-field-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 0.5rem !important;
  align-items: flex-end !important;
  width: 100%;
}
.auth-field-row > .auth-field {
  margin-bottom: 0 !important;
  min-width: 0 !important;
}
.auth-field-row > .auth-field:first-child:not(:only-child) {
  flex: 0 0 7.25rem !important;
  max-width: 8rem !important;
}
.auth-field-row > .auth-field:last-child {
  flex: 1 1 0 !important;
}

/* Password show INSIDE the field */
.auth-pw-wrap,
.ns-pw-wrap {
  position: relative !important;
  display: block !important;
  width: 100% !important;
}
.auth-pw-wrap input,
.ns-pw-wrap input {
  width: 100% !important;
  padding-right: 3.75rem !important;
  box-sizing: border-box !important;
}
.auth-pw-toggle,
.ns-pw-toggle {
  position: absolute !important;
  right: 0.35rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  height: 32px !important;
  margin: 0 !important;
  padding: 0 0.55rem !important;
  border: 0 !important;
  background: transparent !important;
  color: #64748B !important;
  font-weight: 800 !important;
  font-size: 0.75rem !important;
  cursor: pointer !important;
  z-index: 2 !important;
  line-height: 1 !important;
  font-family: inherit !important;
}
.auth-pw-toggle:hover,
.ns-pw-toggle:hover { color: #0F766E !important; }

/* Country chips: flag + name only */
.ea-country-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.45rem !important;
}
.ea-country-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  padding: 0.45rem 0.85rem !important;
  border-radius: 999px !important;
  border: 1.5px solid #E2E8F0 !important;
  background: #fff !important;
  font-weight: 700 !important;
  font-size: 0.84rem !important;
  cursor: pointer !important;
  color: #0f172a !important;
  user-select: none;
}
.ea-country-chip input[type="radio"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  pointer-events: none !important;
}
.ea-country-chip .ea-flag { font-size: 1.15rem; line-height: 1; }
.ea-country-chip .ea-name { font-weight: 800; letter-spacing: 0.01em; }
.ea-country-chip.on,
.ea-country-chip:has(input:checked) {
  border-color: #0F766E !important;
  background: #ECFDF5 !important;
  color: #0B5F58 !important;
  box-shadow: 0 0 0 2px rgba(15,118,110,.12);
}

@media (max-width: 400px) {
  .ea-dial-select { width: 6.5rem !important; min-width: 5.75rem !important; font-size: 0.8rem !important; }
}

.ea-country-chip .ea-flag { display:inline-flex; align-items:center; }
.ea-country-chip .ea-flag img { width:20px; height:15px; border-radius:2px; object-fit:cover; }
