/* ============================================
   AUTH SYSTEM - Split layout (form + illustration)
   Applies to: Login, User Registration, Restaurant Registration
   ============================================ */

/* ========== Spacing helpers ========== */
.auth-cta { margin-bottom: 20px; }

/* ========== Split layout ========== */
.auth-page {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}
@media (max-width: 880px) {
  .auth-page { grid-template-columns: 1fr; }
}

/* ========== Form side ========== */
.auth-form-side {
  display: grid;
  place-items: center;
  padding: 40px 24px;
}
.auth-card {
  width: 100%;
  max-width: 460px;
}
.auth-eyebrow {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orderzy-brand-ink);
  background: var(--orderzy-brand-soft);
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  margin-bottom: 16px;
}
.auth-title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 10px;
}
.auth-sub {
  font-size: 16px;
  color: var(--orderzy-ink-soft);
  line-height: 1.55;
  margin: 0 0 28px;
}
@media (max-width: 880px) {
  .auth-title { font-size: 28px; }
}

/* ========== Form fields ========== */
.auth-field { margin-bottom: 16px; }
.auth-field__label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.auth-label,
.auth-field__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--orderzy-ink);
  display: block;
  margin-bottom: 6px;
}
.auth-field__label-optional {
  font-weight: 400;
  color: var(--orderzy-ink-muted);
  font-size: 13px;
  margin-left: 4px;
}
.auth-field__link {
  font-size: 13px;
  color: var(--orderzy-brand-ink);
  font-weight: 700;
}
.auth-input,
.auth-field__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--orderzy-border-strong);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: 16px;
  color: var(--orderzy-ink);
  background: var(--orderzy-surface);
  transition: all var(--dur-fast) var(--ease);
}
.auth-input:focus,
.auth-field__input:focus {
  outline: none;
  border-color: var(--orderzy-brand);
  box-shadow: 0 0 0 3px var(--orderzy-brand-soft);
}
.auth-input::placeholder,
.auth-field__input::placeholder { color: var(--orderzy-ink-muted); }
.auth-input.is-invalid,
.auth-field__input.is-invalid {
  border-color: var(--orderzy-danger);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.08);
}
.auth-field__help {
  font-size: 12px;
  color: var(--orderzy-ink-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* ========== Password field ========== */
.auth-field--password { position: relative; }
.auth-field--password .auth-input,
.auth-field--password .auth-field__input { padding-right: 44px; }
.auth-password-toggle {
  position: absolute;
  right: 12px;
  bottom: 14px;
  background: none;
  border: none;
  color: var(--orderzy-ink-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
}
.auth-password-toggle:hover { color: var(--orderzy-ink); }

/* Password requirements */
.pwd-requirements {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--orderzy-ink-muted);
}
.pwd-requirements li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pwd-requirements li i { font-size: 10px; }
.pwd-requirements li.met { color: var(--orderzy-success); }
.pwd-requirements li.met i { color: var(--orderzy-success); }
.pwd-requirements li.unmet { color: var(--orderzy-danger); }
.pwd-requirements li.unmet i { color: var(--orderzy-danger); }

/* ========== Error messages ========== */
.auth-error {
  font-size: 12px;
  color: var(--orderzy-danger);
  margin-top: 4px;
  font-weight: 600;
  display: none;
}
.auth-error.visible { display: block; }
.auth-terms-error {
  font-size: 12px;
  color: var(--orderzy-danger);
  font-weight: 600;
  margin-top: -12px;
  margin-bottom: 12px;
  display: none;
}
.auth-terms-error.visible { display: block; }

/* ========== Row layout ========== */
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 880px) {
  .auth-row { grid-template-columns: 1fr; }
}

/* ========== Checkbox / terms ========== */
.auth-checkbox,
.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--orderzy-ink-soft);
  line-height: 1.55;
  cursor: pointer;
}
.auth-checkbox input,
.auth-terms input {
  width: 18px;
  height: 18px;
  accent-color: var(--orderzy-brand);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}
.auth-checkbox a,
.auth-terms a { color: var(--orderzy-brand-ink); font-weight: 700; }

/* ========== Submit button ========== */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  background: var(--orderzy-brand-deep);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.auth-btn:hover { background: #9a5500; }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ========== Forgot / Switch links ========== */
.auth-forgot {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  color: var(--orderzy-brand-ink);
  font-weight: 700;
}
.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--orderzy-ink-soft);
}
.auth-switch a { color: var(--orderzy-brand-ink); font-weight: 700; }

/* ========== Help box ========== */
.auth-help {
  padding: 14px 16px;
  background: var(--orderzy-surface-alt);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--orderzy-ink-soft);
  line-height: 1.5;
  margin-top: 20px;
}
.auth-help strong { color: var(--orderzy-ink); font-weight: 700; }
.auth-help a { color: var(--orderzy-brand-ink); font-weight: 700; }

/* ========== Route switcher ========== */
.auth-route-switch {
  background: var(--orderzy-brand-soft);
  border: 1px solid var(--orderzy-brand);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}
.auth-route-switch--subtle {
  background: var(--orderzy-surface-alt);
  border-color: var(--orderzy-border);
}

/* ========== Illustration side ========== */
.auth-art-side {
  background: linear-gradient(135deg, var(--orderzy-brand-soft) 0%, #fde5c8 100%);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 40px 32px;
}
.auth-art-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(242,133,0,0.15), transparent 50%);
  pointer-events: none;
}
@media (max-width: 880px) {
  .auth-art-side { display: none; }
}
.auth-art-content {
  position: relative;
  max-width: 440px;
}
.auth-art-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orderzy-brand-ink);
  background: rgba(255,255,255,0.7);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  margin-bottom: 20px;
}
.auth-art-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 24px;
}

/* Benefit list (used on register pages) */
.auth-benefit {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(31,29,26,0.08);
}
.auth-benefit:first-of-type { border-top: none; padding-top: 4px; }
.auth-benefit__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.8);
  color: var(--orderzy-brand-ink);
  display: grid;
  place-items: center;
}
.auth-benefit__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--orderzy-ink);
  margin: 0 0 2px;
}
.auth-benefit__desc {
  font-size: 13px;
  color: var(--orderzy-ink-soft);
  line-height: 1.5;
  margin: 0;
}

/* Dual-audience cards (login page) */
.auth-audience-card {
  background: rgba(255,255,255,0.7);
  border-radius: var(--r-md);
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.8);
}
.auth-audience-card + .auth-audience-card { margin-top: 14px; }

/* Activation note */
.auth-activation-note {
  padding: 14px 16px;
  background: var(--orderzy-surface-alt);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--orderzy-ink-soft);
  line-height: 1.5;
  margin-bottom: 20px;
}
.auth-activation-note strong { color: var(--orderzy-ink); }

/* FE1-3: disabled state for auth inputs */
.auth-input:disabled,
.auth-input[aria-disabled="true"] {
  background: var(--orderzy-surface-alt);
  color: var(--orderzy-ink-muted);
  cursor: not-allowed;
  border-color: var(--orderzy-border);
}

/* ========== Sticky banner (no auto-dismiss; explicit Got it button) ========== */
.auth-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: var(--r-sm, 10px);
  border: 1px solid var(--orderzy-success, #16a34a);
  background: rgba(22, 163, 74, 0.08);
  color: var(--orderzy-ink);
}
.auth-banner__icon {
  color: var(--orderzy-success, #16a34a);
  flex-shrink: 0;
  margin-top: 2px;
}
.auth-banner__body {
  flex: 1;
  min-width: 0;
}
.auth-banner__title {
  font-family: var(--font-heading);
  font-size: 14px;
  display: block;
  margin-bottom: 2px;
}
.auth-banner__msg {
  margin: 0;
  font-size: 13.5px;
  color: var(--orderzy-ink-soft);
  line-height: 1.5;
}
.auth-banner__btn {
  flex-shrink: 0;
  align-self: center;
  background: var(--orderzy-success, #16a34a);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.auth-banner__btn:hover { filter: brightness(0.94); }
.auth-banner__btn:focus-visible { outline: 2px solid var(--orderzy-success, #16a34a); outline-offset: 2px; }
@media (max-width: 480px) {
  .auth-banner { flex-direction: column; align-items: stretch; }
  .auth-banner__btn { align-self: flex-start; }
}

/* ========== Password strength widget ========== */
.pwd-strength {
  margin-top: 8px;
}
.pwd-strength__bar {
  position: relative;
  width: 100%;
  height: 4px;
  background: var(--orderzy-border);
  border-radius: 999px;
  overflow: hidden;
}
.pwd-strength__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--orderzy-border-strong);
  border-radius: 999px;
  transition: width 180ms ease, background-color 180ms ease;
}
.pwd-strength.is-weak   .pwd-strength__fill { background: var(--orderzy-danger, #cc3a3a); }
.pwd-strength.is-fair   .pwd-strength__fill { background: var(--orderzy-warning, #d97706); }
.pwd-strength.is-good   .pwd-strength__fill { background: var(--orderzy-brand, #f28500); }
.pwd-strength.is-strong .pwd-strength__fill { background: var(--orderzy-success, #16a34a); }
.pwd-strength__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--orderzy-ink-muted);
}
.pwd-strength__label {
  flex: 1;
  min-width: 0;
}
.pwd-strength__level {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--orderzy-ink-muted);
}
.pwd-strength.is-weak   .pwd-strength__level { color: var(--orderzy-danger, #cc3a3a); }
.pwd-strength.is-fair   .pwd-strength__level { color: var(--orderzy-warning, #d97706); }
.pwd-strength.is-good   .pwd-strength__level { color: var(--orderzy-brand-deep, #b86600); }
.pwd-strength.is-strong .pwd-strength__level { color: var(--orderzy-success, #16a34a); }
.pwd-strength__hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--orderzy-ink-muted);
}
@media (max-width: 480px) {
  .pwd-strength__row { font-size: 12px; }
  .pwd-strength__hint { font-size: 11.5px; }
}
