/* ============================================================
   LegacyApp — setup.css
   Layout B (CRM-style) + modern touches
   Kolory: #0057b7 (blue), #c9a84c (gold), #f15a24 (orange alert)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:       #0057b7;
  --blue-light: #eff6ff;
  --blue-mid:   #bfdbfe;
  --gold:       #c9a84c;
  --gold-light: #fdf7e8;
  --gold-mid:   #f0e0a0;
  --orange:     #f15a24;
  --black:      #111111;
  --gray-50:    #f9fafb;
  --gray-100:   #f3f4f6;
  --gray-200:   #e5e7eb;
  --gray-400:   #9ca3af;
  --gray-600:   #6b7280;
  --white:      #ffffff;
  --radius-sm:  6px;
  --radius-md:  8px;
  --radius-lg:  10px;
  --font:       -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

html, body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--black);
  background: var(--gray-50);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ──────────────────────────────────────────────── */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img { height: 28px; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-plan {
  background: var(--gold-light);
  color: #8a6a1a;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-mid);
  letter-spacing: .05em;
}

.nav-email {
  font-size: 13px;
  color: var(--gray-600);
}

.nav-out-form { display: contents; }

.nav-out {
  font-size: 13px;
  color: var(--gray-600);
  text-decoration: none;
  padding: 4px 0;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.nav-out:hover { color: var(--black); }

/* ── PROGRESS STRIP ───────────────────────────────────── */
.progress-strip {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  padding: 8px 20px 10px;
}

.prog-bar {
  height: 2px;
  background: var(--gray-100);
  border-radius: 1px;
  margin-bottom: 6px;
  overflow: hidden;
}

.prog-fill {
  height: 2px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--gold) 100%);
  border-radius: 1px;
  transition: width .4s ease;
}

.prog-steps {
  display: flex;
}

.prog-step {
  flex: 1;
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-200);
  text-align: center;
  letter-spacing: .03em;
}

.prog-step.done { color: var(--blue); }
.prog-step.active { color: var(--gold); }

/* ── PAGE WRAP ────────────────────────────────────────── */
.page-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -.03em;
  margin-bottom: 4px;
}

.page-sub {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── SECTION LABEL ────────────────────────────────────── */
.section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -.01em;
  margin: 28px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

/* ── PDF STRIP ────────────────────────────────────────── */
.pdf-strip {
  background: var(--blue);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
}

.pdf-strip::before {
  content: '';
  position: absolute;
  top: -30px; right: -20px;
  width: 100px; height: 100px;
  background: rgba(201, 168, 76, .15);
  border-radius: 50%;
  pointer-events: none;
}

.pdf-strip::after {
  content: '';
  position: absolute;
  bottom: -15px; left: 30px;
  width: 60px; height: 60px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
  pointer-events: none;
}

.pdf-strip-text { position: relative; z-index: 1; flex: 1; }
.pdf-strip-text h3 { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 3px; }
.pdf-strip-text p  { font-size: 12px; color: rgba(255,255,255,.6); line-height: 1.4; }

/* ── BENEFICIARY CARD ─────────────────────────────────── */
.ben-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ben-card.fallback { border-left-color: var(--gold); }

.ben-card-info { flex: 1; min-width: 0; }

.ben-type {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  margin-bottom: 7px;
}

.ben-type.primary  { background: var(--blue-light); color: var(--blue); }
.ben-type.fallback { background: var(--gold-light); color: #8a6a1a; border: 1px solid var(--gold-mid); }

.ben-email {
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ben-sub {
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.ben-extra-label { margin-top: 4px; }
.ben-tags { display: flex; flex-wrap: wrap; gap: 5px; }

.tag {
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
}

/* ── HINT BOX ─────────────────────────────────────────── */
.hint-box {
  background: var(--gold-light);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 11px 14px;
  font-size: 13px;
  color: #5a4010;
  line-height: 1.6;
  margin-bottom: 14px;
}

/* ── SLIDER CARD ──────────────────────────────────────── */
.slider-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 18px 20px 16px;
  margin-bottom: 10px;
}

.slider-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.slider-label {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.5;
  flex: 1;
}

.slider-value-wrap { text-align: right; flex-shrink: 0; }

.slider-number {
  font-size: 30px;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  letter-spacing: -.05em;
  display: block;
}

.slider-unit {
  font-size: 11px;
  color: var(--gray-400);
  display: block;
  text-align: right;
  margin-top: 1px;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--gray-200);
  margin: 5px 0 14px;
}

/* ── RANGE INPUT ──────────────────────────────────────── */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--gray-200);
  outline: none;
  cursor: pointer;
  display: block;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  border: 2.5px solid var(--blue);
  box-shadow: 0 1px 6px rgba(0, 87, 183, .25);
  cursor: pointer;
  transition: transform .1s;
}

input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  border: 2.5px solid var(--blue);
  box-shadow: 0 1px 6px rgba(0, 87, 183, .25);
  cursor: pointer;
}

/* ── TIMELINE ─────────────────────────────────────────── */
.timeline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 2px 12px;
}

.timeline-line { flex: 1; height: 1px; background: var(--gray-200); }

.timeline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.timeline-label {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  white-space: nowrap;
}

/* ── BUTTONS ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  cursor: pointer;
  border: none;
  transition: background .15s, transform .1s;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: .01em;
}

.btn:active { transform: scale(.98); }

/* Primary — niebieski */
.btn-primary {
  background: var(--blue);
  color: var(--white);
}
.btn-primary:hover { background: #0049a3; }

/* Secondary — złoty */
.btn-secondary {
  background: var(--gold);
  color: var(--white);
}
.btn-secondary:hover { background: #b8973b; }

/* Outline — obramowanie niebieskie */
.btn-outline {
  background: var(--white);
  color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn-outline:hover { background: var(--blue-light); }

/* Ghost — tylko tekst */
.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}
.btn-ghost:hover { background: var(--gray-100); color: var(--black); }

/* Full width */
.btn-full { width: 100%; }

/* Small */
.btn-sm { font-size: 12px; padding: 7px 14px; }

/* Add dashed button */
.btn-add-dashed {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--white);
  border: 1.5px dashed var(--blue-mid);
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  padding: 13px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font);
  transition: all .15s;
  margin: 10px 0 24px;
}
.btn-add-dashed:hover {
  background: var(--blue-light);
  border-style: solid;
}

/* ── CONSENT CARD ─────────────────────────────────────── */
.consent-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
}

.consent-alert {
  background: #fff7ed;
  border-bottom: 2px solid var(--orange);
  padding: 12px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.consent-alert-icon {
  width: 24px;
  height: 24px;
  background: var(--orange);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.consent-alert-title {
  font-size: 13px;
  font-weight: 700;
  color: #9a3412;
  margin-bottom: 2px;
}

.consent-alert-sub {
  font-size: 12px;
  color: #c2410c;
  line-height: 1.4;
}

.consent-row {
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--gray-50);
}

.consent-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 3px;
}

.consent-required {
  color: #ef4444;
  font-size: 10px;
  font-weight: 400;
  margin-left: 5px;
}

.consent-desc {
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.4;
}

.consent-footer {
  padding: 12px 18px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--gray-50);
}

/* ── TOGGLE ───────────────────────────────────────────── */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
  display: block;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--gray-200);
  border-radius: 12px;
  transition: background .2s;
}

.toggle input:checked ~ .toggle-track { background: var(--blue); }

.toggle-thumb {
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--white);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: left .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

.toggle input:checked ~ .toggle-track ~ .toggle-thumb { left: 23px; }

/* ── FORM FIELDS ──────────────────────────────────────── */
.form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.form-card-note {
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.5;
  margin-bottom: 16px;
}

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 6px;
}

/* Floating label field */
.floating-field { position: relative; }

.floating-input {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--gray-200);
  padding: 18px 0 6px;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  font-family: var(--font);
  outline: none;
  color: var(--black);
  transition: border-color .2s;
}

.floating-input:focus { border-bottom-color: var(--blue); }

.floating-label {
  position: absolute;
  top: 18px;
  left: 0;
  font-size: 13px;
  color: var(--gray-400);
  pointer-events: none;
  transition: all .15s;
}

.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label {
  top: 2px;
  font-size: 9px;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* Standard input */
.form-input {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 10px 13px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  outline: none;
  transition: border-color .15s;
}

.form-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 87, 183, .08);
}

select.form-input { cursor: pointer; }

.form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-row .form-group { flex: 1; min-width: 180px; }

/* ── MULTI-ROW (phones, addresses) ────────────────────── */
.multi-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.multi-row .form-input { flex: 1; min-width: 0; }

.remove-btn {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-family: var(--font);
  line-height: 1;
  transition: all .12s;
}

.remove-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.btn-add-field {
  background: transparent;
  border: 1px dashed var(--gray-200);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font);
  transition: all .12s;
  margin-top: 4px;
}

.btn-add-field:hover {
  border-color: var(--blue);
  background: var(--blue-light);
  border-style: solid;
}

/* Address block */
.addr-block {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
}

.addr-block-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── FORM CARD SECTION TITLE ──────────────────────────── */
.form-sec-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 12px;
  margin-top: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-100);
}

.form-hint {
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.5;
  margin-bottom: 10px;
}

/* ── TOAST ────────────────────────────────────────────── */
.toast {
  background: #111;
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast::before {
  content: '✓';
  display: inline-flex;
  width: 20px;
  height: 20px;
  background: #16a34a;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

/* ── PENDING-ACTIVATION BANNER ────────────────────────
   Shown above the dashboard while the customer has a row in
   awaiting_activation (bought on FastSpring, manager hasn't
   reconciled yet). Mirrors the gold/orange palette already in
   use for high-attention hints; deliberately warmer than .toast
   so it reads as informational, not an error. */
.banner-pending {
  background: var(--gold-light);
  border-left: 4px solid var(--gold);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  color: #5a4a15;
}

.banner-pending-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

.banner-pending-body {
  font-size: 13px;
  line-height: 1.55;
  color: var(--gray-600);
}

/* ── FOOTER ───────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--gray-200);
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  font-size: 12px;
}

.footer a {
  color: var(--gray-400);
  text-decoration: none;
  transition: color .12s;
}

.footer a:hover { color: var(--black); }

/* ── MODAL ────────────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 12px;
}

.modal-body {
  font-size: 13px;
  color: #374151;
  line-height: 1.65;
  margin-bottom: 22px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── STICKY SAVE BAR ──────────────────────────────────── */
.sticky-bar {
  position: sticky;
  top: 56px;
  z-index: 90;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.sticky-bar-hint {
  font-size: 12px;
  color: var(--gray-400);
}

.sticky-bar-ok {
  font-size: 12px;
  color: #16a34a;
  font-weight: 600;
  display: none;
}

.sticky-bar-actions {
  display: flex;
  gap: 8px;
}

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 600px) {
  .page-wrap { padding: 20px 14px 48px; }
  .nav { padding: 0 14px; }
  .nav-email { display: none; }
  .pdf-strip { flex-wrap: wrap; }
  .pdf-strip .btn-secondary { width: 100%; text-align: center; }
  .ben-card { flex-wrap: wrap; }
  .ben-card .btn { align-self: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .form-row .form-group { min-width: 0; width: 100%; }
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .btn { width: 100%; }
  .sticky-bar { top: 0; border-radius: 0; border-left: none; border-right: none; }
  .progress-strip { padding: 8px 14px 10px; }
}

@media (max-width: 400px) {
  .page-title { font-size: 19px; }
  .slider-number { font-size: 26px; }
  .consent-row { flex-wrap: wrap; }
}

/* ── DESKTOP LAYOUT (>900px) ──────────────────────────── */
@media (min-width: 900px) {

  /* Page wrap becomes a full-width shell */
  .page-wrap {
    max-width: 1200px;
    padding: 20px 32px 48px;
  }

  /* Two-column grid */
  .desktop-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    align-items: start;
  }

  .desktop-main  { min-width: 0; }
  .desktop-aside { min-width: 0; }

  /* Aside gets a subtle background */
  .desktop-aside-inner {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 16px;
    position: sticky;
    top: 72px;
  }

  /* PDF strip in aside — more compact */
  .desktop-aside .pdf-strip {
    margin-bottom: 16px;
  }

  /* Stat cards row in aside */
  .stat-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
  }

  .stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
  }

  .stat-card-number {
    font-size: 22px;
    font-weight: 800;
    color: var(--blue);
    line-height: 1;
    letter-spacing: -.04em;
  }

  .stat-card-number.gold  { color: var(--gold); }
  .stat-card-number.green { color: #16a34a; }

  .stat-card-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: 3px;
  }

  /* Nav wider */
  .nav { padding: 0 32px; }
  .progress-strip { padding: 8px 32px 10px; }

  /* Page title on desktop */
  .page-title { font-size: 20px; }
  .page-sub   { font-size: 13px; margin-bottom: 16px; }

  /* Hide PDF strip from main column on desktop (it's in aside) */
  .desktop-main .pdf-strip  { display: none; }

  /* Section labels */
  .section-label { font-size: 12px; margin-top: 16px; }

  /* Cards more comfortable */
  .ben-card { padding: 16px 20px; }
  .ben-email { font-size: 15px; }
  .ben-sub   { font-size: 13px; }

  /* Slider more comfortable */
  .slider-card { padding: 20px 22px 18px; }
  .slider-label { font-size: 13px; }
  .slider-number { font-size: 34px; }

  /* Consent rows */
  .consent-label { font-size: 14px; }
  .consent-desc  { font-size: 12px; }
}

/* ── TYPOGRAPHY SCALE (all sizes) ─────────────────────── */

/* Base body */
body { font-size: 14px; line-height: 1.5; }

/* Nav */
.nav-logo  { font-size: 16px; }
.nav-plan  { font-size: 11px; }
.nav-email { font-size: 13px; }
.nav-out   { font-size: 13px; }

/* Progress */
.prog-step { font-size: 11px; }

/* Page header */
.page-title { font-size: 22px; font-weight: 700; }
.page-sub   { font-size: 13px; }

/* Section labels */
.section-label { font-size: 12px; font-weight: 700; }

/* Beneficiary card */
.ben-type  { font-size: 10px; }
.ben-email { font-size: 14px; font-weight: 600; }
.ben-sub   { font-size: 12px; }
.tag       { font-size: 11px; }

/* Hint */
.hint-box  { font-size: 13px; }

/* Slider */
.slider-label  { font-size: 13px; }
.slider-number { font-size: 30px; }
.slider-unit   { font-size: 11px; }
.slider-ticks  { font-size: 10px; }

/* Timeline */
.timeline-label { font-size: 11px; }

/* Buttons */
.btn         { font-size: 13px; }
.btn-sm      { font-size: 12px; }
.btn-add-dashed { font-size: 13px; }

/* Consent */
.consent-alert-title { font-size: 13px; }
.consent-alert-sub   { font-size: 12px; }
.consent-label       { font-size: 13px; }
.consent-desc        { font-size: 12px; }

/* Form */
.form-label     { font-size: 10px; }
.form-input     { font-size: 14px; }
.floating-input { font-size: 14px; }
.form-sec-title { font-size: 14px; }
.form-hint      { font-size: 12px; }
.form-card-note { font-size: 13px; }

/* Footer */
.footer     { font-size: 12px; }

/* Toast */
.toast { font-size: 13px; }

/* Stat cards (desktop aside) */
.stat-card-number { font-size: 22px; }
.stat-card-label  { font-size: 9px; }

/* Add field button */
.btn-add-field { font-size: 12px; }

/* Sticky bar */
.sticky-bar-hint { font-size: 12px; }
.sticky-bar-ok   { font-size: 12px; }

/* ── LOGIN PAGE ───────────────────────────────────────── */

.login-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 420px;
}

.login-logo {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo img {
  height: 36px;
}

.login-lang {
  text-align: center;
  margin-top: 10px;
}

.login-lang a {
  font-size: 12px;
  color: var(--blue);
  text-decoration: none;
}

.login-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.login-h {
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 6px;
  letter-spacing: -.02em;
}

.login-sub {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 20px;
  line-height: 1.5;
}

.login-err {
  font-size: 13px;
  color: #dc2626;
  margin-bottom: 12px;
  min-height: 0;
}

.login-ok {
  font-size: 13px;
  color: #16a34a;
  margin-bottom: 12px;
  min-height: 0;
}

.login-info {
  font-size: 13px;
  color: var(--gray-600);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 16px;
}

.login-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 6px;
}

.login-input {
  width: 100%;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #1a202c;
  background: #ffffff;
  outline: none;
  transition: border-color .15s;
  margin-bottom: 12px;
  box-sizing: border-box;
  display: block;
}

.login-input:focus {
  border-color: var(--blue);
}

.pin-input {
  font-family: monospace;
  font-size: 20px;
  letter-spacing: .15em;
  text-align: center;
  text-transform: uppercase;
}

.login-btn {
  width: 100%;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
  margin-top: 4px;
}

.login-btn:hover {
  background: #003d82;
  opacity: 1;
  visibility: visible;
}

.login-back {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--blue);
  text-decoration: none;
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--gray-400);
}

.login-footer a {
  color: var(--gray-400);
  text-decoration: underline;
}

/* ── dashboard helpers (replaces former inline styles) ───────────── */
.empty-hint {
  text-align: center;
  padding: 32px 16px;
  color: var(--gray-400);
  font-size: 14px;
}
.limit-hint {
  text-align: center;
  padding: 10px;
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 20px;
}
.footer-danger { color: var(--orange); }

/* ── compat: classes used by edit_beneficiary template ───────────── */
.btn-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 16px;
  font-weight: 600;
  color: var(--blue);
  border: 1px dashed var(--blue);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: background .15s;
}
.btn-add:hover { background: var(--blue-light); }

/* ── edit_beneficiary: one-off helpers (ex-inline styles) ────────── */
.ben-type-select          { flex: 0 0 110px; }
.ben-type-select-wide     { flex: 0 0 120px; }
.remove-btn-wide          { margin-top: 8px; width: 100%; }
.form-group-country       { margin-top: 10px; }
.form-actions-bottom      { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.form-group-grow          { flex: 1; min-width: 200px; }

/* Per-substitute "notify after N days" pill shown on dashboard cards. */
.ben-wait-days {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 10px;
  background: #eaf2fb;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #0a3b78;
}
.ben-wait-days-label { color: #5a6a88; font-weight: 400; }
.ben-wait-days-value { color: #0a3b78; font-weight: 700; }

/* Empty-state CTA — shown on dashboard when no substitute beneficiary
   exists yet. One big, prominent action so the owner's next step is
   obvious. */
.empty-add-cta {
  margin-top: 20px;
  padding: 36px 24px;
  border: 2px dashed var(--gold, #c9a84c);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf7 0%, #fff 100%);
  text-align: center;
}
.empty-add-cta-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold, #c9a84c);
  color: var(--navy, #060d1a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 14px;
}
.empty-add-cta h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--black, #111);
  margin-bottom: 8px;
}
.empty-add-cta p {
  font-size: 14px;
  color: var(--gray-500, #5a6a88);
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto 20px;
}

/* Info variant of .hint-box — blue accent, used for "why is this locked?"
   explanations. Same box geometry as hint-box; different palette. */
.hint-box-info {
  background: #eaf2fb;
  border-left-color: var(--blue, #0057b7);
  color: #0a3b78;
}

/* "None"/brak placeholder shown when a primary beneficiary has no phone
   on file — looks like an input but flatter, italic, unmistakably empty. */
.form-input-empty {
  display: block;
  padding: 10px 13px;
  background: #f3f4f6;
  border: 1px dashed #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  color: #9ca3af;
  font-style: italic;
}

/* Additional-phones container sits inside the same card as the additional
   emails — give it breathing room under the "+ Add email" button above. */
.phone-container-extra { margin-top: 14px; }

/* Read-only inputs (primary beneficiary email/phone — app-managed).
   Muted background + not-allowed cursor so owners see the value but
   cannot edit it here. */
.form-input[readonly] {
  background: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
  border-style: dashed;
}
.form-input[readonly]:focus {
  outline: none;
  box-shadow: none;
  border-color: #e5e7eb;
}

/* Small explanatory note shown directly below a locked field. Keep it
   tight to the input so the reason for the lock is obvious. */
.form-locked-note {
  margin-top: 6px;
  padding: 10px 12px;
  background: #eaf2fb;
  border-left: 3px solid var(--blue, #0057b7);
  border-radius: 0 6px 6px 0;
  font-size: 12px;
  line-height: 1.5;
  color: #0a3b78;
}

/* Disabled primary/ghost buttons — muted so "nothing to save" reads as
   "nothing to save", not "broken button". */
.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  filter: grayscale(0.3);
}
.btn:disabled:hover,
.btn[disabled]:hover {
  transform: none;
  opacity: 0.45;
}

/* ── delete_account.html: dark danger screen ─────────────────────── */
body.danger-page {
  background: #0d0f14;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f1f3f8;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  margin: 0;
}
.danger-page-box {
  max-width: 440px;
  width: 100%;
  background: #161920;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-top: 3px solid #ef4444;
  border-radius: 14px;
  padding: 32px;
}
.danger-page-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ef4444;
}
.danger-page-text {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.6;
  margin-bottom: 20px;
}
.danger-page-err {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
.danger-page-label {
  font-size: 12px;
  color: #6b7280;
  display: block;
  margin-bottom: 4px;
}
.danger-page-input {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #f1f3f8;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  margin-bottom: 16px;
}
.danger-page-btn {
  width: 100%;
  padding: 11px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.danger-page-btn:hover { background: #dc2626; }
.danger-page-back {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: #6b7280;
  text-decoration: none;
}
.danger-page-back:hover { color: #9ca3af; }

/* ── account_deleted.html: GDPR confirmation ─────────────────────── */
body.gdpr-confirm {
  font-family: Inter, -apple-system, sans-serif;
  max-width: 480px;
  margin: 80px auto;
  padding: 20px;
  text-align: center;
}
.gdpr-confirm-title {
  color: #16a34a;
  margin-bottom: 12px;
}
.gdpr-confirm-text {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
}
.gdpr-confirm-home { margin-top: 16px; }
.gdpr-confirm-home a { color: #0057b7; text-decoration: none; }
.gdpr-confirm-home a:hover { text-decoration: underline; }

/* Read-only "managed in mobile app" pill shown when b.cycle_id is set. */
.ade-locked {
  padding: 10px 13px;
  background: var(--gray-50, #f3f4f6);
  border: 1.5px solid var(--gray-200, #e5e7eb);
  border-radius: 8px;
  font-size: 13px;
  color: var(--gray-400, #9ca3af);
  font-style: italic;
}
.ade-locked-flex { flex: 1; }

/* Danger banner: delete secondary beneficiary (priority > 1). */
.danger-banner {
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.danger-banner-title { font-size: 13px; font-weight: 600; color: #991b1b; }
.danger-banner-sub   { font-size: 12px; color: #b91c1c; margin-top: 2px; }
.danger-banner-btn {
  background: #ef4444;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
  border: none;
  font-family: inherit;
  cursor: pointer;
}
.danger-banner-btn:hover { background: #dc2626; }
