/* ==========================================================================
   ReBox — css/auth-tokens.css
   Component styles for the STAFF login pages (staff-login.html /
   admin-login.html and legacy redirect pages).

   ⚠️ UPDATE (Design System unification): the --fc-* tokens below used to be
   DECLARED here with their own hex values ("kept in its own file so it can
   never collide with the main app's --rebox-* design system" — see git
   history). That isolation is exactly what let this file's palette drift
   from the main app (a different green, a different font family) without
   anyone noticing, which is the bug this update fixes.

   The --fc-* names are now defined ONCE, in
   /shared/css/design-tokens.css, as aliases of the canonical --rebox-*
   tokens (e.g. --fc-primary: var(--rebox-green)). That file MUST be linked
   before this one on every page that uses this stylesheet. Do not
   redeclare any --fc-* variable in this file — that would silently
   reintroduce the drift this fix removes. New component CSS added here
   should reference the canonical --rebox-*/--text-*/--radius-* names
   directly instead of --fc-*; the --fc-* names are kept only so the
   existing selectors below keep working until Phase 2 rewrites this file
   per-account.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { direction: rtl; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--fc-bg); color: var(--fc-text);
  font-family: var(--fc-font); font-size: var(--fc-text-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
svg { width: 24px; height: 24px; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
.fc-numeral { font-variant-numeric: lining-nums tabular-nums; unicode-bidi: plaintext; }
:focus-visible { outline: 2px solid var(--fc-primary); outline-offset: 2px; }
.fc-ltr { direction: ltr; unicode-bidi: embed; }
.fc-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* ==========================================================================
   ReBox — login-components.css
   Every component class the auth pages (login.html) actually use.
   ========================================================================== */

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.login-page {
  width: 100%;
  max-width: 400px;
  background: var(--fc-surface);
  border-radius: var(--fc-radius-xl);
  box-shadow: var(--fc-shadow);
  padding: 32px 24px;
}

.login-brand {
  text-align: center;
  margin-bottom: 24px;
}
.login-brand .brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.login-brand .brand img { height: 48px; width: auto; }
.login-brand h1 {
  font-size: 21px;
  font-weight: 800;
  color: var(--fc-primary-dark);
}
.login-brand p {
  font-size: 13px;
  color: var(--fc-text-2);
  margin-top: 6px;
  line-height: 1.6;
}

/* ---- form fields ---- */
.field { margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--fc-text);
}
.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--fc-radius-md);
  border: 1.5px solid var(--fc-border);
  background: var(--fc-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus {
  border-color: var(--fc-primary);
  box-shadow: 0 0 0 3px var(--fc-primary-10);
  outline: none;
}
.input-icon-wrap {
  position: relative;
}
.input-icon-wrap svg {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--fc-text-2);
  pointer-events: none;
}
.input-icon-wrap .input {
  padding-right: 42px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.field-error {
  font-size: 13px;
  color: var(--fc-danger);
  background: var(--fc-danger-10);
  border-radius: var(--fc-radius-sm);
  padding: 10px 12px;
  margin: 4px 0 12px;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: var(--fc-text-button);
  font-weight: 800;
  border-radius: var(--fc-radius-md);
  padding: 11px 20px;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; pointer-events: none; }
.btn-primary { background: var(--fc-primary); color: #fff; }
.btn-primary:hover { opacity: 0.92; }
.btn-outline {
  background: transparent;
  color: var(--fc-primary-dark);
  box-shadow: inset 0 0 0 1.5px var(--fc-border);
}
.btn-block { width: 100%; }

/* ---- password strength meter ---- */
.password-strength { margin-top: 10px; }
.password-strength-bar {
  display: flex;
  gap: 4px;
}
.password-strength-bar .seg {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--fc-border);
  transition: background 0.15s ease;
}
.password-strength.is-weak .seg:nth-child(1) { background: var(--fc-danger); }
.password-strength.is-medium .seg:nth-child(1),
.password-strength.is-medium .seg:nth-child(2) { background: var(--fc-warning); }
.password-strength.is-strong .seg { background: var(--fc-success); }
.password-strength-label {
  font-size: 12px;
  margin-top: 6px;
  color: var(--fc-text-2);
}
.password-strength.is-weak .password-strength-label { color: var(--fc-danger); }
.password-strength.is-medium .password-strength-label { color: var(--fc-yellow-dark); }
.password-strength.is-strong .password-strength-label { color: var(--fc-primary); }

.password-rules {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}
.password-rules li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--fc-text-2);
}
.password-rules li .rule-icon {
  width: 14px; height: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--fc-border);
}
.password-rules li .rule-icon svg { width: 10px; height: 10px; }
.password-rules li.is-met { color: var(--fc-primary-dark); }
.password-rules li.is-met .rule-icon { background: var(--fc-primary); color: #fff; }

.confirm-match-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin-top: 8px;
}
.confirm-match-hint svg { width: 14px; height: 14px; }
.confirm-match-hint.is-match { color: var(--fc-primary-dark); }
.confirm-match-hint.is-mismatch { color: var(--fc-danger); }

/* ---- misc ---- */
.login-back {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--fc-text-2);
  margin-top: 18px;
}
select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2366736a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 34px;
}
/* ==========================================================================
   ReBox — login-responsive.css
   ========================================================================== */

@media (min-width: 768px) {
  .login-page {
    max-width: 440px;
    padding: 40px 36px;
  }
  .login-brand h1 { font-size: 24px; }
}

@media (min-width: 1024px) {
  body { background: linear-gradient(160deg, var(--fc-primary-light), var(--fc-bg) 55%); }
  .login-page { box-shadow: 0 12px 40px rgba(36, 92, 54, 0.1); }
}


/* --- staff-portal additions (scoped, do not affect login.html) --- */
.staff-badge{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;padding:5px 12px;border-radius:999px;background:var(--fc-primary-light);color:var(--fc-primary-dark);margin-bottom:10px;}
.staff-badge--driver{background:var(--fc-yellow-soft);color:var(--fc-yellow-dark);}
.staff-badge--admin{background:var(--fc-coral-soft);color:var(--fc-coral-dark);}
.pw-toggle{position:absolute;inset-inline-start:10px;top:50%;transform:translateY(-50%);background:none;border:0;cursor:pointer;color:var(--fc-text-2);font-size:12px;font-weight:700;padding:6px 8px;min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center;border-radius:8px;}
.pw-toggle:hover{background:var(--fc-primary-10);}
.pw-toggle:focus-visible{outline:2px solid var(--fc-primary);outline-offset:2px;}
.input-icon-wrap{position:relative;}
.input-icon-wrap .input{padding-inline-start:56px;}
.field-error[role="alert"]{display:block;}
.auth-note{text-align:center;font-size:12.5px;color:var(--fc-text-2);margin-top:14px;line-height:1.7;}
.auth-note a{color:var(--fc-primary);font-weight:700;}
.btn[disabled]{opacity:.6;cursor:not-allowed;}
.btn .spin{display:inline-block;width:15px;height:15px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:reboxspin .7s linear infinite;vertical-align:-2px;margin-inline-end:7px;}
@keyframes reboxspin{to{transform:rotate(360deg);}}
@media (max-width:360px){.login-page{padding-inline:14px;}.staff-badge{font-size:11px;}}


/* --- unified staff portal --- */
.staff-login-shell{max-width:520px;}
.staff-portal-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 10px;}
.staff-portal-card{min-height:76px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;text-align:right;padding:12px;border:1.5px solid var(--fc-border);border-radius:16px;background:var(--fc-bg);transition:border-color .15s ease,background .15s ease,box-shadow .15s ease,transform .1s ease;}
.staff-portal-card:hover{border-color:rgba(105,184,79,.45);background:var(--fc-primary-10);}
.staff-portal-card:active{transform:scale(.99);}
.staff-portal-card.is-selected{border-color:var(--fc-primary);background:var(--fc-primary-light);box-shadow:0 0 0 3px var(--fc-primary-10);}
.staff-portal-card__icon{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:#fff;color:var(--fc-primary-dark);}
.staff-portal-card__icon--driver{color:var(--fc-yellow-dark);background:var(--fc-yellow-soft);}
.staff-portal-card>span:nth-child(2){min-width:0;}
.staff-portal-card strong,.staff-portal-card small{display:block;}
.staff-portal-card strong{font-size:14px;font-weight:800;color:var(--fc-text);}
.staff-portal-card small{font-size:11px;color:var(--fc-text-2);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.staff-portal-card__check{color:var(--fc-primary);font-size:20px;}
.staff-selection-note{font-size:11.5px;line-height:1.7;color:var(--fc-text-2);background:var(--fc-primary-10);border-radius:12px;padding:9px 11px;margin:0 0 16px;}
.staff-login-security{display:flex;align-items:flex-start;gap:10px;margin-top:16px;padding:11px 12px;border:1px solid var(--fc-border);border-radius:14px;background:#fff;}
.staff-login-security>.icon{color:var(--fc-primary);font-size:22px;flex:0 0 auto;}
.staff-login-security strong,.staff-login-security small{display:block;}
.staff-login-security strong{font-size:12px;}
.staff-login-security small{font-size:11px;color:var(--fc-text-2);line-height:1.6;margin-top:2px;}
.staff-submit{min-height:48px;}
@media(max-width:520px){.staff-portal-cards{grid-template-columns:1fr;}.staff-login-shell{padding-inline:18px;}}


/* --- ReBox staff/admin login polish: visual-only, authentication untouched --- */
.staff-login-page,
body:has(.staff-login-shell) {
  background: #fffaf1;
}

.login-page {
  border: 1px solid rgba(231,234,228,.92);
}

.login-brand .brand img {
  height: 72px;
  width: min(250px, 78vw);
  object-fit: contain;
  filter: drop-shadow(0 5px 12px rgba(36,92,54,.08));
}

.login-brand .brand {
  margin-bottom: 18px;
}

.login-brand h1 {
  font-size: clamp(23px, 5vw, 28px);
  letter-spacing: -.35px;
}

.login-brand p {
  max-width: 480px;
  margin-inline: auto;
  font-size: 13.5px;
}

.auth-input-wrap {
  min-height: 56px;
}

.auth-input-wrap .input {
  min-height: 56px;
  border-radius: 15px;
  background: #fff;
  border-width: 1.5px;
  padding-block: 14px;
}

.auth-input-wrap .input:focus {
  box-shadow: 0 0 0 4px var(--fc-primary-10);
}

.auth-field-icon {
  position: absolute;
  inset-inline-end: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fc-text-2);
  font-size: 21px;
  pointer-events: none;
  z-index: 1;
}

.auth-input-wrap .input {
  padding-inline-end: 48px;
}

.auth-input-wrap .pw-toggle {
  inset-inline-start: 8px;
  min-width: 72px;
  height: 40px;
  min-height: 40px;
  border: 1px solid var(--fc-border);
  border-radius: 12px;
  background: #f8faf8;
  color: var(--fc-primary-dark);
  font-size: 12px;
  font-weight: 800;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}

.auth-input-wrap .pw-toggle:hover {
  background: var(--fc-primary-light);
  border-color: rgba(105,184,79,.35);
}

.auth-input-wrap .pw-toggle .icon { font-size: 17px; }

.auth-input-wrap .pw-toggle:active {
  transform: translateY(-50%) scale(.97);
}

.staff-login-shell .staff-portal-cards {
  margin-top: 2px;
}

.staff-login-shell .staff-portal-card {
  min-height: 82px;
  border-radius: 18px;
}

.staff-login-shell .staff-submit,
.login-page .btn-primary {
  min-height: 54px;
  border-radius: 15px;
  font-size: 15px;
  box-shadow: 0 8px 20px rgba(105,184,79,.16);
}

.staff-login-security {
  border-radius: 16px;
  background: linear-gradient(135deg, #fbfdfb, #fff);
}

@media (min-width: 768px) {
  .login-page {
    max-width: 560px;
    padding: 42px 42px 34px;
  }
  .login-page:not(.staff-login-shell) {
    max-width: 500px;
  }
}

@media (max-width: 520px) {
  body {
    padding: 18px 10px;
  }
  .login-page {
    padding: 28px 18px 24px;
    border-radius: 24px;
  }
  .login-brand .brand img {
    height: 64px;
    width: min(235px, 82vw);
  }
  .field { margin-bottom: 14px; }
  .field-label { font-size: 13.5px; margin-bottom: 7px; }

  /* Staff role picker: keep Merchant + Driver side-by-side on phones. */
  .staff-login-shell .staff-portal-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 12px;
  }
  .staff-login-shell .staff-portal-card {
    position: relative;
    min-width: 0;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    padding: 16px 10px 13px;
    text-align: center;
    border-radius: 20px;
  }
  .staff-login-shell .staff-portal-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    flex: 0 0 auto;
  }
  .staff-login-shell .staff-portal-card > span:nth-child(2) {
    width: 100%;
  }
  .staff-login-shell .staff-portal-card strong {
    font-size: 15px;
    line-height: 1.25;
  }
  .staff-login-shell .staff-portal-card small {
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.35;
    white-space: normal;
  }
  .staff-login-shell .staff-portal-card__check {
    position: absolute;
    top: 9px;
    left: 9px;
    font-size: 20px;
  }
}

@media (max-width: 360px) {
  .login-page { padding-inline: 14px; }
  .auth-input-wrap .pw-toggle { min-width: 66px; padding-inline: 8px; }
}


/* ============================================================================
   ReBox Auth Reference UI
   Visual-only layer for customer/staff/admin authentication surfaces.
   Existing IDs, form actions, role checks and JS contracts are untouched.
   ============================================================================ */
body {
  min-height: 100svh;
  padding: 24px 14px;
  background-color: #fff;
  background-image: radial-gradient(circle, rgba(61,79,68,.10) 2px, transparent 2.2px);
  background-size: 28px 28px;
}
.login-page {
  max-width: 440px;
  padding: 34px 24px 26px;
  border: 1px solid #edf0eb;
  border-radius: 28px;
  background: #fffaf1;
  box-shadow: 0 14px 38px rgba(36,92,54,.10);
}
.login-brand { margin-bottom: 22px; }
.login-brand .brand { margin-bottom: 12px; }
.login-brand .brand img {
  height: 68px;
  width: min(220px,72vw);
  filter: none;
}
.login-brand h1 {
  color: #222b25;
  font-size: clamp(22px,5vw,28px);
  letter-spacing: -.35px;
}
.login-brand p { color: #788079; font-size: 13px; }
.auth-form-card {
  padding: 10px;
  border: 1px solid #ecefe9;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(36,92,54,.045);
}
.auth-form-card form { padding: 2px 8px 2px; }
.field { margin-bottom: 16px; }
.field-label { color: #252b27; font-size: 13px; margin-bottom: 7px; }
.input {
  min-height: 54px;
  border-radius: 15px;
  border: 1.5px solid #e4e8e2;
  background: #fff;
  color: #252b27;
}
.input::placeholder { color: #a0a7a1; }
.input:focus { border-color: #69b84f; box-shadow: 0 0 0 4px rgba(105,184,79,.10); }
.auth-input-wrap { min-height: 54px; }
.auth-input-wrap .input { min-height: 54px; border-radius: 15px; background: #fff; }
.login-page .btn-primary {
  min-height: 54px;
  border-radius: 15px;
  background: #4d8f4f;
  box-shadow: 0 8px 18px rgba(77,143,79,.17);
}
.login-page .btn-primary:hover { opacity: .95; }
.login-back { color: #7a827c; margin-top: 16px; }

/* Staff/admin role picker becomes the same compact segmented control as the reference UI. */
.staff-auth-card .staff-portal-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 0 0 18px;
  border-radius: 18px;
  background: #f1f3ef;
}
.staff-auth-card .staff-portal-card {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px 10px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: #69736c;
  box-shadow: none;
}
.staff-auth-card .staff-portal-card:hover { background: rgba(255,255,255,.55); }
.staff-auth-card .staff-portal-card.is-selected {
  color: #4c8f50;
  background: #fff;
  border: 0;
  box-shadow: 0 2px 8px rgba(36,92,54,.08);
}
.staff-auth-card .staff-portal-card__icon,
.staff-auth-card .staff-portal-card__check { display: none; }
.staff-auth-card .staff-portal-card > span:nth-child(2) { min-width: 0; }
.staff-auth-card .staff-portal-card strong { font-size: 14px; font-weight: 800; color: inherit; }
.staff-auth-card .staff-portal-card small { display: none; }
.staff-auth-card .staff-portal-card:active { transform: none; }
.staff-login-security {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 10px 4px 0;
}

/* Admin has no role selector; keep the same inner form surface. */
.staff-auth-card form { margin: 0; }

@media (min-width: 768px) {
  .login-page { max-width: 440px; padding: 38px 28px 28px; }
  .staff-login-shell { max-width: 440px; }
}
@media (max-width: 520px) {
  body { padding: 12px 8px; }
  .login-page { padding: 28px 16px 22px; border-radius: 25px; }
  .login-brand .brand img { height: 62px; }
  .login-brand h1 { font-size: 23px; }
  .auth-form-card { padding: 8px; border-radius: 22px; }
  .auth-form-card form { padding-inline: 6px; }
}

/* ============================================================================
   ReBox Auth — mobile viewport + instant client-side auth switching
   Visual/interaction layer only. Existing forms, IDs, auth logic and routes
   remain unchanged.
   ============================================================================ */
@media (max-width: 600px) {
  html, body { min-height: 100%; }
  body {
    display: block;
    min-height: 100svh;
    width: 100%;
    padding: 6px;
    overflow-x: hidden;
  }
  .login-page {
    width: 100%;
    max-width: none !important;
    min-height: calc(100svh - 12px);
    margin: 0;
    padding: 26px 14px 28px;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .login-brand {
    flex: 0 0 auto;
    margin-bottom: 22px;
  }
  .login-brand .brand { margin-bottom: 12px; }
  .login-brand .brand img {
    height: clamp(64px, 18vw, 88px);
    width: min(270px, 78vw);
  }
  .login-brand h1 {
    font-size: clamp(23px, 6vw, 30px);
    line-height: 1.35;
  }
  .login-brand p {
    font-size: 14px;
    margin-top: 7px;
  }
  .auth-form-card {
    width: 100%;
    padding: 10px;
    border-radius: 25px;
  }
  .auth-mode-switch,
  .staff-auth-card .staff-portal-cards {
    margin-bottom: 18px;
  }
  .auth-mode-tab {
    min-height: 52px;
    font-size: 17px;
  }
  .auth-form-card form { padding-inline: 8px; }
  .field { margin-bottom: 18px; }
  .field-label { font-size: 15px; margin-bottom: 8px; }
  .input,
  .auth-input-wrap,
  .auth-input-wrap .input { min-height: 58px; }
  .login-page .btn-primary {
    min-height: 58px;
    font-size: 17px;
  }
  .login-back { font-size: 15px; margin-top: 18px; }

  /* The registration form is intentionally allowed to scroll naturally. */
  #view-register { min-height: calc(100svh - 12px); }
  #view-register .login-brand { margin-bottom: 18px; }
}

@media (min-width: 601px) {
  .login-page { min-height: auto; }
}

/* Switching the two primary customer auth views must never wait for a page
   reload/network/font reinitialization. JS updates this state instantly. */
.auth-view.auth-view-switching { opacity: 0; }
.auth-view { transition: opacity .08s linear; }


/* Final mobile viewport fit — visual-only override. */
@media (max-width: 600px) {
  html, body {
    width: 100%;
    min-width: 100%;
    margin: 0;
  }
  body {
    padding: 0;
    min-height: 100dvh;
    background-size: 26px 26px;
  }
  .login-page,
  .staff-login-shell {
    width: 100%;
    max-width: none !important;
    min-height: 100dvh;
    margin: 0;
    padding: 22px 16px 26px;
    border-radius: 0;
    box-shadow: none;
    border-inline: 0;
  }
  .login-brand {
    margin-bottom: 18px;
  }
  .login-brand .brand {
    margin-bottom: 9px;
  }
  .login-brand .brand img {
    height: 60px;
    width: min(220px, 68vw);
  }
  .login-brand h1 {
    font-size: 21px;
    line-height: 1.35;
  }
  .login-brand p {
    font-size: 12px;
    line-height: 1.6;
  }
  .auth-form-card {
    padding: 8px;
    border-radius: 22px;
  }
  .field {
    margin-bottom: 14px;
  }
  .field-label {
    font-size: 14px;
    margin-bottom: 6px;
  }
  .auth-input-wrap,
  .auth-input-wrap .input,
  .input {
    min-height: 52px;
  }
  .auth-input-wrap .input {
    border-radius: 14px;
    padding-block: 12px;
  }
  .staff-login-shell .staff-portal-cards {
    gap: 7px;
    margin-bottom: 14px;
  }
  .staff-login-shell .staff-portal-card {
    min-height: 112px;
    border-radius: 17px;
    padding: 12px 8px;
  }
  .staff-login-shell .staff-portal-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }
  .staff-login-shell .staff-portal-card strong {
    font-size: 14px;
  }
  .staff-login-shell .staff-portal-card small {
    font-size: 9.5px;
  }
  .staff-submit,
  .login-page .btn-primary {
    min-height: 54px;
    border-radius: 14px;
    font-size: 16px;
  }
  .staff-login-security {
    margin-top: 13px;
    padding: 9px 10px;
  }
  .staff-login-security strong {
    font-size: 11px;
  }
  .staff-login-security small {
    font-size: 10px;
  }
}


/* Desktop + tablet staff/admin auth sizing — visual-only. */
@media (min-width: 601px) {
  html, body { min-height: 100%; }
  body {
    min-height: 100dvh;
    padding: 28px 24px;
    background: #fffaf1;
    background-image: none;
  }
  .login-page {
    width: min(100%, 640px);
    max-width: 640px;
    padding: 46px 42px 38px;
    border-radius: 32px;
    box-shadow: 0 18px 48px rgba(36,92,54,.09);
  }
  .staff-login-shell { max-width: 700px; }
  .login-brand { margin-bottom: 28px; }
  .login-brand .brand { margin-bottom: 16px; }
  .login-brand .brand img {
    height: 88px;
    width: min(300px, 46vw);
  }
  .login-brand h1 { font-size: 30px; line-height: 1.35; }
  .login-brand p { font-size: 15px; margin-top: 8px; }
  .auth-form-card { padding: 14px; border-radius: 28px; }
  .staff-portal-cards { gap: 12px; margin-bottom: 14px; }
  .staff-portal-card { min-height: 88px; padding: 14px; border-radius: 18px; }
  .staff-portal-card strong { font-size: 16px; }
  .staff-portal-card small { font-size: 12px; }
  .auth-form-card form { padding: 4px 10px 4px; }
  .field { margin-bottom: 21px; }
  .field-label { font-size: 16px; margin-bottom: 9px; }
  .auth-input-wrap, .auth-input-wrap .input { min-height: 62px; }
  .auth-input-wrap .input { border-radius: 17px; padding-block: 15px; font-size: 16px; }
  .auth-field-icon { font-size: 23px; }
  .staff-submit, .login-page .btn-primary { min-height: 62px; border-radius: 17px; font-size: 18px; }
  .staff-login-security { margin-top: 20px; padding: 13px 14px; border-radius: 16px; }
  .staff-login-security strong { font-size: 13px; }
  .staff-login-security small { font-size: 12px; }
}

@media (min-width: 1200px) {
  body { padding: 40px 32px; }
  .login-page { width: min(100%, 720px); max-width: 720px; padding: 54px 52px 44px; }
  .staff-login-shell { max-width: 780px; }
  .login-brand .brand img { height: 98px; width: min(330px, 34vw); }
  .login-brand h1 { font-size: 32px; }
  .login-brand p { font-size: 16px; }
  .auth-form-card { padding: 16px; }
  .staff-portal-card { min-height: 96px; }
  .staff-portal-card strong { font-size: 17px; }
  .staff-portal-card small { font-size: 13px; }
  .field-label { font-size: 17px; }
  .auth-input-wrap, .auth-input-wrap .input { min-height: 66px; }
  .auth-input-wrap .input { font-size: 17px; }
  .staff-submit, .login-page .btn-primary { min-height: 66px; font-size: 19px; }
}

/* Final register-width correction: the register view has a legacy inline
   max-width value; keep it wide on tablet/desktop to match the auth layout. */
@media (min-width: 601px) {
  #view-register.login-page {
    width: min(100%, 700px);
    max-width: 700px !important;
  }
}
@media (min-width: 1200px) {
  #view-register.login-page {
    width: min(100%, 780px);
    max-width: 780px !important;
  }
}

/* Password recovery links — auth-only, no change to application forms. */
.auth-forgot-row{
  text-align:center;
  margin-top:14px;
}
.auth-forgot-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:4px 8px;
  color:var(--fc-text-2);
  font-size:13px;
  font-weight:700;
  transition:color .15s ease,opacity .15s ease;
}
.auth-forgot-link:hover{color:var(--fc-primary-dark);}
.auth-forgot-link:focus-visible{outline:2px solid var(--fc-primary);outline-offset:3px;border-radius:8px;}

/* ============================================================================
   ReBox Password Recovery — final visual layer
   Keeps recovery pages consistent with the main authentication experience.
   No auth logic, routes, IDs or data contracts are changed.
   ============================================================================ */
.recovery-page {
  width: min(100%, 680px) !important;
  max-width: 680px !important;
  padding: 48px 42px 38px !important;
}
.recovery-page .login-brand {
  margin-bottom: 28px;
}
.recovery-page .login-brand .brand {
  margin-bottom: 18px;
}
.recovery-page .login-brand .brand img {
  height: 92px;
  width: min(320px, 44vw);
}
.recovery-page .login-brand h1 {
  font-size: 30px;
  line-height: 1.35;
  color: #222b25;
}
.recovery-page .login-brand > p {
  margin-top: 8px;
  font-size: 15px;
  color: #788079;
}
.recovery-icon {
  width: 54px !important;
  height: 54px !important;
  margin: 0 auto 14px !important;
  border-radius: 16px !important;
  display: grid !important;
  place-items: center !important;
  background: #eaf5e7 !important;
  color: #4d8f4f !important;
  font-size: 27px !important;
}
.recovery-icon .icon,
.recovery-security .icon,
.recovery-page .icon {
  font-family: "Material Symbols Rounded" !important;
  font-weight: 500;
  font-style: normal;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  line-height: 1;
}
.recovery-card {
  width: 100% !important;
  margin-top: 0 !important;
  padding: 18px !important;
  border-radius: 28px !important;
  background: #fff !important;
  border: 1px solid #ecefe9 !important;
  box-shadow: 0 8px 26px rgba(36,92,54,.06) !important;
}
.recovery-card form {
  padding: 6px 10px 4px !important;
}
.recovery-copy {
  margin-bottom: 24px !important;
}
.recovery-copy strong {
  display: block;
  color: #252b27;
  font-size: 19px;
  line-height: 1.5;
}
.recovery-copy p {
  color: #788079 !important;
  font-size: 14px !important;
  line-height: 1.7;
  margin-top: 6px !important;
}
.recovery-page .field {
  margin-bottom: 20px;
}
.recovery-page .field-label {
  font-size: 16px;
  margin-bottom: 9px;
  color: #252b27;
}
.recovery-page .auth-input-wrap,
.recovery-page .auth-input-wrap .input {
  min-height: 62px;
}
.recovery-page .auth-input-wrap .input {
  border-radius: 17px;
  font-size: 16px;
}
.recovery-page .staff-submit,
.recovery-page .btn-primary {
  min-height: 62px;
  border-radius: 17px;
  font-size: 18px;
}
.recovery-security {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 14px 15px;
  border: 1px solid #e4eee2;
  border-radius: 17px;
  background: #f7fbf6;
  color: #66736a;
  font-size: 12.5px;
  line-height: 1.8;
}
.recovery-security strong {
  display: block;
  color: #245c36;
  margin-bottom: 2px;
  font-size: 13px;
}
.recovery-security .icon {
  color: #4d8f4f;
  font-size: 24px;
  flex: 0 0 auto;
}
.recovery-actions {
  text-align: center;
  margin-top: 18px;
}
.recovery-actions a {
  color: #788079;
  font-size: 14px;
}
.recovery-sent,
.recovery-checking,
.recovery-success,
.recovery-invalid {
  padding: 20px 10px !important;
}
.recovery-sent strong,
.recovery-success strong {
  font-size: 20px !important;
}
.recovery-invalid strong {
  font-size: 19px !important;
}

@media (min-width: 1200px) {
  .recovery-page {
    width: min(100%, 780px) !important;
    max-width: 780px !important;
    padding: 54px 52px 44px !important;
  }
  .recovery-page .login-brand .brand img {
    height: 100px;
    width: min(340px, 34vw);
  }
  .recovery-page .login-brand h1 { font-size: 32px; }
  .recovery-card { padding: 20px !important; }
  .recovery-card form { padding: 8px 12px 6px !important; }
}

@media (max-width: 600px) {
  .recovery-page {
    width: 100% !important;
    max-width: none !important;
    min-height: 100dvh;
    padding: 24px 16px 28px !important;
  }
  .recovery-page .login-brand {
    margin-bottom: 18px;
  }
  .recovery-page .login-brand .brand img {
    height: 70px;
    width: min(240px, 72vw);
  }
  .recovery-page .login-brand h1 {
    font-size: 23px;
  }
  .recovery-page .login-brand > p {
    font-size: 13px;
  }
  .recovery-icon {
    width: 48px !important;
    height: 48px !important;
    font-size: 24px !important;
    margin-bottom: 10px !important;
  }
  .recovery-card {
    padding: 10px !important;
    border-radius: 23px !important;
  }
  .recovery-card form {
    padding-inline: 8px !important;
  }
  .recovery-copy {
    margin-bottom: 20px !important;
  }
  .recovery-copy strong {
    font-size: 17px;
  }
  .recovery-copy p {
    font-size: 12.5px !important;
  }
  .recovery-page .field-label {
    font-size: 14px;
    margin-bottom: 7px;
  }
  .recovery-page .auth-input-wrap,
  .recovery-page .auth-input-wrap .input {
    min-height: 54px;
  }
  .recovery-page .auth-input-wrap .input {
    border-radius: 14px;
    font-size: 14px;
  }
  .recovery-page .staff-submit,
  .recovery-page .btn-primary {
    min-height: 54px;
    border-radius: 14px;
    font-size: 16px;
  }
  .recovery-security {
    margin-top: 15px;
    padding: 11px 12px;
    font-size: 11px;
  }
  .recovery-actions a { font-size: 13px; }
}
