/*
 * auth-brand-a.css
 * Brand A ("tighten") surface tokens and shared styles for auth pages only.
 * Scoped with .auth-a-* prefixes so they never restyle the dashboard or any
 * signed-in surface. Include alongside dist/app.css on auth templates.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* ── New tokens not present in the global stylesheet ── */
:root {
  --brand-navy-100: #eef2f6;
  --brand-font-heading: 'Plus Jakarta Sans', sans-serif;
  --brand-font-body: 'Inter', sans-serif;
}

/* ── Page shell ── */
.auth-a-body {
  background: var(--brand-navy-100);
  min-height: 100vh;
  font-family: var(--brand-font-body);
  margin: 0;
  padding: 0;
}

.auth-a-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Brand mark header ── */
.auth-a-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px 0;
}

.auth-a-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.auth-a-brand-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--brand-navy-900);
  flex-shrink: 0;
}

.auth-a-brand-tile-inner {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--brand-teal);
}

.auth-a-brand-name {
  font-family: var(--brand-font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brand-navy-900);
  letter-spacing: -0.01em;
}

/* ── Main / card centering ── */
.auth-a-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 44px;
}

/* ── Auth card ── */
.auth-a-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(13,27,42,0.08), 0 4px 20px rgba(13,27,42,0.07);
  padding: 36px 40px;
  width: 100%;
  max-width: 440px;
}

/* ── FCA trust pill ── */
.auth-a-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-navy-100);
  color: var(--brand-navy-900);
  font-family: var(--brand-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.auth-a-trust-pill svg {
  color: var(--brand-teal);
  flex-shrink: 0;
}

.auth-a-pill-wrap {
  text-align: center;
  margin-bottom: 2px;
}

/* ── Card headings ── */
.auth-a-card h2 {
  font-family: var(--brand-font-heading);
  font-weight: 700;
  color: var(--brand-navy-900);
  font-size: 1.45rem;
  margin: 0 0 4px;
  text-align: center;
}

.auth-a-card .form-subtitle {
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
  font-family: var(--brand-font-body);
  margin: 0 0 22px;
}

/* ── Form groups ── */
.auth-a-card .form-group {
  margin-bottom: 18px;
}

.auth-a-card .form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #374151;
  font-size: 0.875rem;
  font-family: var(--brand-font-body);
}

.auth-a-card .form-group input,
.auth-a-card .form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  font-size: 15px;
  font-family: var(--brand-font-body);
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
  color: var(--brand-navy-900);
}

.auth-a-card .form-group input:focus,
.auth-a-card .form-group select:focus {
  outline: none;
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(78,205,196,0.2);
}

/* ── Primary CTA: teal bg + navy text (Brand A spec) ── */
.auth-a-card .btn-primary {
  display: block;
  width: 100%;
  padding: 13px;
  background: var(--brand-teal);
  color: var(--brand-navy-900);
  border: none;
  border-radius: 6px;
  font-family: var(--brand-font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.auth-a-card .btn-primary:hover {
  background: var(--brand-teal-hover);
}

.auth-a-card .btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(78,205,196,0.4);
}

/* ── Secondary / outline button ── */
.auth-a-btn-outline {
  display: inline-block;
  padding: 11px 20px;
  background: transparent;
  border: 2px solid var(--brand-navy-900);
  color: var(--brand-navy-900);
  border-radius: 6px;
  font-family: var(--brand-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}

.auth-a-btn-outline:hover {
  background: var(--brand-navy-100);
}

/* ── Secondary links ── */
.auth-a-card .auth-link {
  text-align: center;
  margin-top: 14px;
  color: #64748b;
  font-size: 0.875rem;
  font-family: var(--brand-font-body);
}

.auth-a-card .auth-link a {
  color: var(--brand-navy-900);
  text-decoration: none;
  font-weight: 500;
}

.auth-a-card .auth-link a:hover {
  color: var(--brand-teal);
}

/* ── Alert blocks ── */
.auth-a-card .alert {
  padding: 11px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 0.875rem;
  font-family: var(--brand-font-body);
}

.auth-a-card .alert-danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.auth-a-card .alert-success { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.auth-a-card .alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.auth-a-card .alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }

/* ── Card divider ── */
.auth-a-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 18px 0;
}

/* ── Trust row (foot of card) ── */
.auth-a-trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.auth-a-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: #94a3b8;
  font-family: var(--brand-font-body);
}

/* ── Inline form row ── */
.auth-a-form-row {
  display: flex;
  gap: 12px;
}

.auth-a-form-row .form-group {
  flex: 1;
}

/* ═══════════════════════════════════════════════════════
   TWO-COLUMN ADVISER CARD (login_adviser, adapted parts)
   ═══════════════════════════════════════════════════════ */

.auth-a-two-col-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 880px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(13,27,42,0.10), 0 8px 32px rgba(13,27,42,0.08);
}

.auth-a-value-panel {
  background: var(--brand-navy-900);
  color: #fff;
  padding: 44px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-a-value-panel h2 {
  font-family: var(--brand-font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
  color: #fff;
  text-align: left;
}

.auth-a-value-panel .panel-subtitle {
  font-family: var(--brand-font-body);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.55;
  margin: 0 0 24px;
}

.auth-a-adviser-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(78,205,196,0.12);
  border: 1px solid rgba(78,205,196,0.3);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  color: var(--brand-teal);
  font-weight: 600;
  margin-bottom: 18px;
}

.auth-a-adviser-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-teal);
  animation: auth-pulse-dot 2s infinite;
}

@keyframes auth-pulse-dot { 0%,100%{opacity:1} 50%{opacity:0.3} }

.auth-a-pillars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.auth-a-pillar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 11px 13px;
}

.auth-a-pillar-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: rgba(78,205,196,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.auth-a-pillar-body h4 { margin: 0 0 2px; font-size: 0.85rem; font-weight: 600; color: #e2e8f0; font-family: var(--brand-font-heading); }
.auth-a-pillar-body p  { margin: 0; font-size: 0.76rem; color: rgba(255,255,255,0.55); line-height: 1.4; font-family: var(--brand-font-body); }

.auth-a-panel-cta {
  background: rgba(78,205,196,0.1);
  border: 1px solid rgba(78,205,196,0.25);
  border-radius: 8px;
  padding: 13px 15px;
  text-align: center;
}

.auth-a-panel-cta p {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.7);
  margin: 0 0 6px;
  font-family: var(--brand-font-body);
}

.auth-a-panel-cta a {
  color: var(--brand-teal);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.auth-a-panel-cta a:hover { text-decoration: underline; }

.auth-a-form-panel {
  background: #ffffff;
  padding: 44px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Apply card-level styles inside form-panel too */
.auth-a-form-panel .form-group { margin-bottom: 18px; }
.auth-a-form-panel .form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #374151;
  font-size: 0.875rem;
  font-family: var(--brand-font-body);
}
.auth-a-form-panel .form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  font-size: 15px;
  font-family: var(--brand-font-body);
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-a-form-panel .form-group input:focus {
  outline: none;
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(78,205,196,0.2);
}
.auth-a-form-panel .btn-primary {
  display: block;
  width: 100%;
  padding: 13px;
  background: var(--brand-teal);
  color: var(--brand-navy-900);
  border: none;
  border-radius: 6px;
  font-family: var(--brand-font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-a-form-panel .btn-primary:hover { background: var(--brand-teal-hover); }
.auth-a-form-panel .btn-primary:focus { outline: none; box-shadow: 0 0 0 3px rgba(78,205,196,0.4); }
.auth-a-form-panel .auth-link { text-align: center; margin-top: 13px; color: #64748b; font-size: 0.875rem; font-family: var(--brand-font-body); }
.auth-a-form-panel .auth-link a { color: var(--brand-navy-900); text-decoration: none; font-weight: 500; }
.auth-a-form-panel .auth-link a:hover { color: var(--brand-teal); }
.auth-a-form-panel .alert { padding: 10px 13px; border-radius: 8px; margin-bottom: 16px; font-size: 0.875rem; font-family: var(--brand-font-body); }
.auth-a-form-panel .alert-danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.auth-a-form-panel .alert-success { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.auth-a-form-panel .alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.auth-a-form-panel .alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }

.auth-a-form-panel h2 {
  font-family: var(--brand-font-heading);
  font-weight: 700;
  color: var(--brand-navy-900);
  font-size: 1.35rem;
  text-align: center;
  margin: 0 0 4px;
}

.auth-a-form-panel .form-subtitle {
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
  font-family: var(--brand-font-body);
  margin: 0 0 22px;
}

.auth-a-trust-row-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  justify-content: center;
}

.auth-a-divider-text {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  font-size: 0.73rem;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--brand-font-body);
}

.auth-a-divider-text::before,
.auth-a-divider-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* ── Responsive two-col ── */
@media (max-width: 768px) {
  .auth-a-two-col-wrapper {
    grid-template-columns: 1fr;
    max-width: 460px;
  }
  .auth-a-value-panel { padding: 28px 24px; }
  .auth-a-form-panel  { padding: 28px 24px; }
}

/* ── Responsive single-col card ── */
@media (max-width: 520px) {
  .auth-a-card { padding: 26px 22px; }
  .auth-a-form-row { flex-direction: column; gap: 0; }
  .auth-a-main { align-items: flex-start; padding-top: 16px; }
}

/* ═══════════════════════════════════
   ADVISER REGISTER — light full-page
   ═══════════════════════════════════ */

.auth-a-reg-body {
  background: var(--brand-navy-100);
  min-height: 100vh;
  font-family: var(--brand-font-body);
  margin: 0;
  padding: 0 0 48px;
}

.auth-a-reg-header {
  text-align: center;
  padding: 28px 20px 0;
}

.auth-a-reg-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  margin-bottom: 12px;
}

.auth-a-reg-header h1 {
  font-family: var(--brand-font-heading);
  color: var(--brand-navy-900);
  margin: 6px 0 4px;
  font-size: 1.45rem;
  font-weight: 700;
}

.auth-a-reg-header p {
  color: #64748b;
  margin: 0;
  font-size: 0.9rem;
  font-family: var(--brand-font-body);
}

/* ── Plan cards on light bg ── */
.auth-a-plan-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
}

.auth-a-plan-card:hover {
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(78,205,196,0.12);
}

.auth-a-plan-card.selected {
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(78,205,196,0.2);
}

.auth-a-plan-card.featured {
  border-color: var(--brand-teal);
}

.auth-a-plan-name { color: var(--brand-navy-900); font-size: 1.05rem; font-weight: 700; margin: 0 0 6px; font-family: var(--brand-font-heading); }
.auth-a-plan-price { margin: 10px 0 4px; }
.auth-a-plan-price .amount { font-size: 2rem; font-weight: 800; color: var(--brand-navy-900); font-family: var(--brand-font-heading); }
.auth-a-plan-price .per    { font-size: 0.82rem; color: #64748b; }
.auth-a-plan-tagline { color: #64748b; font-size: 0.82rem; margin: 0 0 14px; font-family: var(--brand-font-body); }
.auth-a-plan-divider { height: 1px; background: #f1f5f9; margin: 14px 0; }
.auth-a-plan-features { list-style: none; padding: 0; margin: 0; }
.auth-a-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.83rem;
  color: #374151;
  margin-bottom: 7px;
  line-height: 1.35;
  font-family: var(--brand-font-body);
}
.auth-a-plan-features li::before {
  content: "✓";
  color: var(--brand-teal);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 0.78rem;
  margin-top: 1px;
}

.auth-a-plan-cta {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 9px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  border: 2px solid var(--brand-navy-900);
  background: transparent;
  color: var(--brand-navy-900);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--brand-font-heading);
}

.auth-a-plan-card.selected .auth-a-plan-cta,
.auth-a-plan-cta:hover,
.auth-a-plan-card.featured .auth-a-plan-cta {
  background: var(--brand-teal);
  border-color: var(--brand-teal);
  color: var(--brand-navy-900);
}

.auth-a-plan-card.featured.selected .auth-a-plan-cta { background: var(--brand-teal-hover); border-color: var(--brand-teal-hover); }

/* ── Register form card ── */
.auth-a-form-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(13,27,42,0.08), 0 4px 20px rgba(13,27,42,0.07);
  padding: 34px 36px 28px;
}

@media (max-width: 600px) { .auth-a-form-card { padding: 22px 18px; } }

.auth-a-form-card h2 {
  font-family: var(--brand-font-heading);
  color: var(--brand-navy-900);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 4px;
  text-align: center;
}

.auth-a-form-card .form-subtitle {
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
  font-family: var(--brand-font-body);
  margin: 0 0 18px;
}

.auth-a-form-card .form-group { margin-bottom: 13px; }
.auth-a-form-card .form-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
  color: #374151;
  font-size: 0.85rem;
  font-family: var(--brand-font-body);
}
.auth-a-form-card .form-group input,
.auth-a-form-card .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--brand-font-body);
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-a-form-card .form-group input:focus,
.auth-a-form-card .form-group select:focus {
  outline: none;
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(78,205,196,0.2);
}

.auth-a-form-card .btn-submit {
  width: 100%;
  padding: 13px;
  background: var(--brand-teal);
  color: var(--brand-navy-900);
  border: none;
  border-radius: 6px;
  font-family: var(--brand-font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 6px;
}
.auth-a-form-card .btn-submit:hover { background: var(--brand-teal-hover); }
.auth-a-form-card .btn-submit:focus { outline: none; box-shadow: 0 0 0 3px rgba(78,205,196,0.4); }

.auth-a-form-card .alert { padding: 10px 13px; border-radius: 8px; margin-bottom: 13px; font-size: 0.875rem; font-family: var(--brand-font-body); }
.auth-a-form-card .alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.auth-a-form-card .alert-info   { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }

.auth-a-form-card .auth-link { text-align: center; margin-top: 13px; color: #64748b; font-size: 0.84rem; font-family: var(--brand-font-body); }
.auth-a-form-card .auth-link a { color: var(--brand-navy-900); text-decoration: none; font-weight: 500; }
.auth-a-form-card .auth-link a:hover { color: var(--brand-teal); }

.auth-a-form-card .field-hint { font-size: 0.74rem; color: #94a3b8; margin-top: 3px; font-family: var(--brand-font-body); }

.auth-a-section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--brand-font-body);
}
.auth-a-section-divider::before,
.auth-a-section-divider::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }

.auth-a-selected-plan-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(78,205,196,0.08);
  border: 1px solid rgba(78,205,196,0.3);
  border-radius: 8px;
  padding: 8px 13px;
  font-size: 0.84rem;
  color: #0f7c77;
  margin-bottom: 18px;
  font-family: var(--brand-font-body);
}

.auth-a-form-row-inner { display: flex; gap: 12px; }
.auth-a-form-row-inner .form-group { flex: 1; }
@media (max-width: 500px) { .auth-a-form-row-inner { flex-direction: column; gap: 0; } }

/* billing toggle — inherit existing classes, adjust label colour for light bg */
.auth-a-reg-body .billing-toggle span { color: #64748b; }
.auth-a-reg-body .billing-toggle span.active { color: var(--brand-navy-900); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   MOBILE / TOUCH IMPROVEMENTS
   All scoped to auth-a-* so they cannot bleed into signed-in UI.
   ═══════════════════════════════════════════════════════════ */

/* ── Prevent iOS auto-zoom on input focus (font-size must be ≥ 16px) ── */
@media (max-width: 767px) {
  .auth-a-card .form-group input,
  .auth-a-card .form-group select,
  .auth-a-form-panel .form-group input,
  .auth-a-form-card .form-group input,
  .auth-a-form-card .form-group select {
    font-size: 16px;
    min-height: 44px;
    box-sizing: border-box;
  }

  /* Raise primary CTA to comfortable 44px tap target */
  .auth-a-card .btn-primary,
  .auth-a-form-panel .btn-primary,
  .auth-a-form-card .btn-submit {
    min-height: 44px;
    padding: 12px 16px;
  }

  /* MFA verify button */
  .auth-a-submit {
    min-height: 44px;
  }

  /* Recovery-code submit — also raise to touch-friendly size */
  .auth-a-card details button,
  .auth-a-card .auth-a-recovery-btn {
    min-height: 44px;
    padding: 10px 18px;
  }

  /* Raise secondary link tap area without breaking layout */
  .auth-a-card .auth-link a,
  .auth-a-form-panel .auth-link a {
    display: inline-block;
    padding: 4px 2px;
  }
}

/* ── Phone portrait (≤ 430px — iPhone SE, iPhone mini, Android compact) ── */
@media (max-width: 430px) {
  .auth-a-header {
    padding: 18px 14px 0;
  }

  /* Allow card to scroll from top rather than centering, so primary
     actions stay above the on-screen keyboard */
  .auth-a-main {
    align-items: flex-start;
    padding: 14px 10px 28px;
  }

  .auth-a-card {
    padding: 22px 16px;
    border-radius: 10px;
  }

  .auth-a-card h2 {
    font-size: 1.25rem;
  }

  /* MFA 6-digit input — reduce letter-spacing so it doesn't overflow on 360px phones */
  .auth-a-card #code {
    font-size: 1.25rem !important;
    letter-spacing: 0.2em !important;
    padding: 12px 8px !important;
  }

  /* Recovery code input — keep 16px to prevent iOS auto-zoom */
  .auth-a-card #recovery_code {
    font-size: 16px !important;
    padding: 10px 10px !important;
  }

  /* Two-column wrapper (adviser login) — stack earlier on very small phones */
  .auth-a-two-col-wrapper {
    max-width: 100%;
  }

  .auth-a-value-panel,
  .auth-a-form-panel {
    padding: 22px 16px;
  }

  /* Password input wrapper — ensure toggle button doesn't clip */
  .password-input-wrapper {
    position: relative;
  }
}

/* ── Notched-phone safe-area support ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .auth-a-main {
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }
}

@supports (padding-left: env(safe-area-inset-left)) {
  .auth-a-main {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }
}

/* ── iPad portrait (768px–1023px) — card comfortable width ── */
@media (min-width: 768px) and (max-width: 1023px) {
  .auth-a-card {
    max-width: 420px;
  }

  .auth-a-two-col-wrapper {
    max-width: 760px;
  }
}
