﻿/* ═══════════════════════════════════════════════════════════
   AUTH — Centered Card Layout (Login, Signup, Forgot, etc.)
   ═══════════════════════════════════════════════════════════ */

/* ── Page wrapper ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: #f0f2f8;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(75,107,245,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(185,28,28,0.04) 0%, transparent 50%);
}

/* ── Card ── */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(12,15,26,0.06), 0 8px 32px rgba(12,15,26,0.06);
  border: 1px solid #e8eaf2;
  padding: 40px 36px 36px;
}
.auth-card.wide {
  max-width: 480px;
}

/* ── Auth header (logo above card) ── */
.auth-header {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 10px 20px;
}

/* ── Logo block ── */
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}
.auth-logo-icon {
      width: 120px !important;
    height: 100px !important;
  border-radius: 10px;
  flex-shrink: 0;
  border: none !important;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-logo-icon svg { width: 18px; height: 18px; color: #fff; }
.auth-logo-name {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-align: center;
}

/* ── Titles ── */
.auth-title {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 13.5px;
  color: var(--ink-3);
  margin-bottom: 28px;
  line-height: 1.55;
}

/* ── Form fields ── */
.form-field { margin-bottom: 18px; }
.form-field:last-child { margin-bottom: 0; }

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.01em;
}

.form-input {
  display: block;
  width: 100%;
  height: 44px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 13px;
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-input::placeholder { color: var(--ink-4); }
.form-input:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(76,110,245,.10);
  background: #fff;
}

/* ── Password field ── */
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.forgot-link {
  font-size: 12px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
.forgot-link:hover { text-decoration: underline; }

.password-wrapper { position: relative; }
.password-toggle {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--ink-4); display: flex; align-items: center; padding: 4px;
  transition: color .15s;
}
.password-toggle:hover { color: var(--ink-2); }
.password-toggle svg { width: 16px; height: 16px; }
.form-input.has-toggle { padding-right: 40px; }

/* ── Form rows (2-col grid) ── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

/* ── Section divider label ── */
.form-section-label {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin: 24px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Strength bar ── */
.strength-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin-top: 8px;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width .3s, background .3s;
}
.password-hint {
  font-size: 11.5px;
  color: var(--ink-4);
  margin-top: 5px;
}

/* ── Primary button (brand red) ── */
.btn-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: #00437a;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: background .15s, box-shadow .15s, transform .1s;
  margin-top: 6px;
}
.btn-auth:hover {
  background: #01335c;
    box-shadow: 0 4px 14px rgb(0 16 209 / 25%);
}
.btn-auth:active { transform: translateY(0); }
.btn-auth:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.btn-auth svg { width: 15px; height: 15px; }

/* ── Divider ── */
.auth-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ── Footer text ── */
.auth-footer-text {
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
}
.auth-footer-text a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}
.auth-footer-text a:hover { text-decoration: underline; }

/* ── Terms ── */
.terms-text {
  font-size: 12px;
  color: var(--ink-4);
  margin-bottom: 20px;
  line-height: 1.6;
}
.terms-text a { color: var(--blue); text-decoration: none; }
.terms-text a:hover { text-decoration: underline; }

/* ── Tom Select alignment inside auth cards ── */
.auth-card .ts-wrapper {
  width: 100% !important;
}
.auth-card .ts-wrapper,
.auth-card .ts-control {
  min-height: 44px;
}
.auth-card .ts-control {
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  background: var(--surface) !important;
  padding: 0 32px 0 13px !important;
  font-size: 13.5px !important;
  font-family: 'Inter', sans-serif !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}
.auth-card .ts-control:focus-within {
  border-color: var(--blue-mid) !important;
  box-shadow: 0 0 0 3px rgba(76,110,245,.10) !important;
  background: #fff !important;
}
.auth-card .ts-dropdown {
  border-radius: var(--radius-sm) !important;
  border: 1.5px solid var(--border) !important;
  box-shadow: 0 8px 24px rgba(12,15,26,.12) !important;
  background-color: white !important;
}
.auth-card .ts-dropdown .option {
  font-size: 13.5px !important;
  padding: 9px 13px !important;
}
.auth-card .ts-dropdown .active,
.auth-card .ts-dropdown .selected {
  background: var(--blue-pale) !important;
  color: var(--blue) !important;
}

/* ── Select styling ── */
.auth-card select {
  display: block;
  width: 100%;
  height: 44px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 13px;
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239399b8' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  transition: border-color .15s, box-shadow .15s;
}
.auth-card select:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(76,110,245,.10);
  background-color: #fff;
}

/* ── Icon header (verify/confirm pages) ── */
.form-icon-header {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--blue-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.form-icon-header svg { width: 24px; height: 24px; color: var(--blue); }

/* ── Confirm page centered content ── */
.auth-confirm-center {
  text-align: center;
}
.auth-confirm-center .auth-title {
  text-align: center;
}
.auth-confirm-center .auth-sub {
  text-align: center;
}

/* ── Inline alerts ── */
.auth-alert {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
  display: none;
  line-height: 1.5;
}
.auth-alert.error {
  color: var(--red);
  background: var(--red-pale);
  border: 1px solid rgba(201,42,42,.15);
}
.auth-alert.success {
  color: #087f5b;
  background: var(--teal-pale);
  border: 1px solid rgba(12,166,120,.15);
}
.auth-alert.visible { display: block; }

/* ── Code input ── */
.code-input {
  display: block;
  width: 100%;
  height: 48px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  letter-spacing: .12em;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.code-input::placeholder {
  color: var(--ink-4);
  letter-spacing: .04em;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
}
.code-input:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(76,110,245,.10);
  background: #fff;
}

/* ── Match indicator ── */
.match-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  font-size: 12px;
}
.match-indicator svg { width: 13px; height: 13px; }
.match-indicator.ok { color: var(--teal); }
.match-indicator.no { color: var(--red); }

/* ── Expiry notice ── */
.expiry-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--amber-pale);
  border: 1.5px solid rgba(240,140,0,.2);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  margin-bottom: 24px;
}
.expiry-notice svg { width: 15px; height: 15px; color: var(--amber); flex-shrink: 0; }
.expiry-notice span { font-size: 12.5px; color: #7c5700; line-height: 1.45; }

.form-divider { height: 1px; background: var(--border); margin: 10px 0 20px; }
.form-hint { font-size: 11.5px; color: var(--ink-4); margin-top: 5px; }

/* ── Resend row ── */
.resend-row {
  text-align: center;
  font-size: 13px;
  color: var(--ink-4);
  margin-top: 8px;
}
.resend-row button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  padding: 0;
}
.resend-row button:hover { text-decoration: underline; }

/* ── Back link (ghost style) ── */
.auth-back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  transition: color .15s;
}
.auth-back-link:hover { color: var(--blue); }
.auth-back-link svg { width: 14px; height: 14px; }

/* ── Optional label ── */
.optional {
  font-weight: 400;
  color: var(--ink-4);
  font-style: italic;
}

/* ── Copyright footer ── */
.auth-copyright {
  text-align: center;
  font-size: 11px;
  color: var(--ink-4);
  margin-top: 24px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .auth-page { padding: 20px 12px; }
  .auth-header { padding: 24px 16px; }
  .auth-card { padding: 28px 22px 24px; border-radius: 12px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

}
