/* ============================================================
   GSTR-1 Converter — design tokens + shell + dashboard
   Palette sampled from the approved mockups (2026-11-05):
   sidebar navy #041E42, primary blue #0B4AA6 (hover #004299),
   page bg #F2F6FC. Step 1: foundation + dashboard.
   ============================================================ */
:root {
  --navy-900: #041e42;
  --navy-800: #0a2a52;
  --navy-700: #123a63;
  --primary: #0b4aa6;
  --primary-dark: #004299;
  --primary-soft: #e8effc;
  --bg: #f2f6fc;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-soft: #edf1f7;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --green: #16a34a;
  --green-bg: #dcfce7;
  --green-soft: #f0fdf4;
  --amber: #d97706;
  --amber-bg: #fef3c7;
  --amber-soft: #fffbeb;
  --red: #dc2626;
  --red-bg: #fee2e2;
  /* Darker text-only shades of the same hues: status text must pass 4.5:1 (WCAG AA).
     Icons and fills keep the brighter --green / --amber / --red. */
  --green-text: #166534;
  --amber-text: #92400e;
  --red-text: #991b1b;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 4px 14px rgba(15, 23, 42, .05);
  --font: "Inter", "Noto Sans Devanagari", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
h1, h2, h3, p { margin: 0; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.view { padding: 24px 28px 48px; max-width: 1180px; width: 100%; margin: 0 auto; }

/* ---------- sidebar ---------- */
.sidebar {
  width: 232px; flex-shrink: 0; transition: width .25s ease;
  background: var(--navy-900); color: #dbe7f5;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px 16px; color: #fff;
  font-size: 16px; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); border-radius: 9px;
}
.brand-icon svg { width: 20px; height: 20px; }
.brand-text strong { font-weight: 800; }
.sidebar-toggle {
  margin-left: auto; width: 30px; height: 30px; flex-shrink: 0;
  display: grid; place-items: center;
  background: transparent; border: none; border-radius: 7px;
  color: #9db1c9; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.sidebar-toggle:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.sidebar-toggle svg { width: 17px; height: 17px; transition: transform .25s ease; }
/* Collapsed sidebar: icon-only strip, like the reference */
.app.sidebar-collapsed .sidebar { width: 64px; }
.app.sidebar-collapsed .brand { padding: 20px 0 16px; justify-content: center; }
.app.sidebar-collapsed .brand-icon, .app.sidebar-collapsed .brand-text { display: none; }
.app.sidebar-collapsed .sidebar-toggle { margin-left: 0; }
.app.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
.app.sidebar-collapsed .nav { padding: 14px 10px; align-items: center; }
.app.sidebar-collapsed .nav-item { justify-content: center; gap: 0; padding: 10px; width: 44px; font-size: 0; }
.app.sidebar-collapsed .pro-card { display: none; }
.nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 9px;
  color: #c3d2e4; font-weight: 500; font-size: 14.5px;
}
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active { background: var(--navy-800); color: #fff; font-weight: 600; }
.pro-card {
  margin: auto 14px 16px; padding: 16px 14px;
  background: var(--navy-800); border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 12px; color: #dbe7f5; font-size: 13.5px;
}
.pro-crown { display: block; width: 22px; height: 22px; color: #fbbf24; margin-bottom: 6px; }
.pro-crown svg { width: 22px; height: 22px; }
.pro-card p { margin-bottom: 4px; }
.pro-card p strong { color: #fff; font-size: 14.5px; }
.pro-sub { color: #9db1c9; font-size: 12.5px; margin-bottom: 12px !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 600; padding: 11px 18px;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(11, 74, 166, .22); }
.btn:active { transform: translateY(0); }
.btn-outline {
  background: #fff; color: var(--primary);
  border: 1.5px solid #c9d6ea;
}
.btn-outline:hover { border-color: var(--primary); background: var(--primary-soft); }
.btn-light { background: #fff; color: var(--navy-900); }
.btn-light:hover { background: #e8effc; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:disabled:hover { transform: none; box-shadow: none; }

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 28px 6px; max-width: 1180px; width: 100%; margin: 0 auto;
}
.page-title { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.lang-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 13px 14px; font-size: 13.5px; font-weight: 500; color: var(--text);
}
.lang-pill svg { width: 16px; height: 16px; color: var(--muted); }
.lang-pill .chev { width: 14px; height: 14px; }
.icon-btn {
  position: relative; width: 38px; height: 38px;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: 50%;
  color: var(--text);
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .dot {
  position: absolute; top: 8px; right: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); border: 2px solid #fff;
}
/* ---------- dashboard ---------- */
.welcome-card {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 28px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 24px;
}
.welcome-text { flex: 1; min-width: 0; }
.welcome-text h2 { font-size: 25px; font-weight: 800; letter-spacing: -.015em; margin-bottom: 4px; }
.welcome-text p { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.welcome-art { flex-shrink: 0; width: 170px; }
.welcome-art svg { width: 100%; height: auto; display: block; }

.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px;
}
.stat-card {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; display: flex; align-items: center; gap: 13px;
}
.stat-icon {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 11px;
  display: grid; place-items: center;
}
.stat-icon svg { width: 21px; height: 21px; }
.stat-icon.blue { background: var(--primary-soft); color: var(--primary); }
.stat-icon.green { background: var(--green-bg); color: var(--green); }
.stat-icon.amber { background: var(--amber-bg); color: var(--amber); }
.stat-icon.navy { background: #e0e9f5; color: var(--navy-800); }
.stat-num { font-size: 23px; font-weight: 800; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 13px; }

.reminder-banner {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 15px 18px; margin-bottom: 18px;
}
.reminder-icon {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 11px;
  background: var(--border-soft); color: var(--muted);
  display: grid; place-items: center;
}
.reminder-icon svg { width: 22px; height: 22px; }
.reminder-body { flex: 1; min-width: 0; }
.reminder-body strong { font-size: 15px; display: block; }
.reminder-body span { color: var(--muted); font-size: 13.5px; }
.days-pill {
  flex-shrink: 0; background: var(--green-bg); color: var(--green-text);
  font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px;
}
/* Overdue reminders are plain cards too — the tinted slab looked
   off on the dark dashboard. The red pill already carries the
   overdue signal, so the banner itself stays neutral. */
.reminder-banner.overdue { background: var(--card); border-color: var(--border-soft); }
.reminder-banner.overdue .reminder-icon { background: var(--amber-bg); color: var(--amber-text); }

.card {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 17px 20px 0;
}
.card-head h3 { font-size: 16.5px; font-weight: 700; }
.link-arrow {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 12px; border: 1px solid #dbe7fb; border-radius: 8px;
  background: #fff; color: var(--primary);
  font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap;
  cursor: pointer; text-decoration: none;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.link-arrow:hover { background: var(--primary-soft); border-color: var(--primary); transform: translateX(2px); }
.link-arrow:active { transform: translateX(1px) scale(.98); }

.table-wrap { overflow-x: auto; padding: 10px 8px 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 12.5px; font-weight: 600; border-bottom: 1px solid var(--border-soft); }
td { border-bottom: 1px solid var(--border-soft); }
tr:last-child td { border-bottom: none; }
td strong { font-weight: 600; }
.mkt-badges { display: inline-flex; gap: 4px; vertical-align: middle; }
.mkt {
  width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff; line-height: 1; flex-shrink: 0;
}
.mkt.amazon, .mkt.meesho { background: #fff; border: 1px solid #e5e7eb; }
.mkt.flipkart { background: #ffe500; }
.mkt svg { width: 15px; height: 15px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}
.status-pill svg { width: 13px; height: 13px; }
.status-pill.ready { background: var(--green-bg); color: var(--green-text); }
.status-pill.filed { background: var(--primary-soft); color: var(--primary); }
.status-pill.attention { background: var(--amber-bg); color: var(--amber-text); }
.btn-mini {
  background: #fff; border: 1.5px solid #c9d6ea; color: var(--primary);
  font-size: 13px; font-weight: 600; padding: 13px 13px; border-radius: 8px;
  min-width: 96px; text-align: center;
}
.btn-mini:hover { background: var(--primary-soft); }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-top: 18px; }
.mini-card { padding: 18px 20px; }
.mini-card h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.mini-card h3 svg { width: 19px; height: 19px; color: var(--primary); }
.plan-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 4px 0; color: var(--text); }
.plan-line svg { width: 16px; height: 16px; flex-shrink: 0; }
.plan-line.ok svg { color: var(--green); }
/* Locked plan lines stay de-emphasised vs body text but must still pass 4.5:1:
   --muted (#64748b) on white is 4.76:1; the lock icon + PRO tag keep the affordance. */
.plan-line.locked { color: var(--muted); }
.plan-line.locked svg { color: var(--muted); }
.plan-line .tag {
  margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted);
  background: #f1f5f9; padding: 2px 8px; border-radius: 999px;
}
.mini-card .btn { margin-top: 12px; }
.help-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px; font-weight: 500; color: var(--text);
}
.help-link:last-child { border-bottom: none; }
.help-link svg { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head strong { font-size: 14.5px; }
.cal-nav { display: flex; gap: 4px; }
.cal-nav button svg { width: 20px; height: 20px; }
.cal-jump-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.cal-nav button {
  width: 44px; height: 44px; border: 1px solid var(--border); background: #fff;
  border-radius: 9px; color: var(--muted); font-size: 18px; line-height: 1;
  display: grid; place-items: center; padding: 0;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
  font-size: 12.5px; text-align: center;
}
.cal-grid .dow { color: var(--muted-2); font-weight: 600; font-size: 11px; padding: 3px 0; }
.cal-grid .day { padding: 5px 0; border-radius: 7px; color: var(--text); }
.cal-grid .day.dim { color: #cbd5e1; }
.cal-grid .day.due { background: var(--primary); color: #fff; font-weight: 700; }
.cal-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.cal-note strong { color: var(--red); }

/* ---------- placeholder (screens not built yet) ---------- */
.placeholder {
  background: var(--card); border: 1px dashed #c9d6ea; border-radius: var(--radius);
  padding: 44px 28px; text-align: center;
}
.placeholder h2 { font-size: 19px; margin-bottom: 8px; }
.placeholder p { color: var(--muted); max-width: 520px; margin: 0 auto 16px; }
.placeholder .step-tag {
  display: inline-block; background: var(--primary-soft); color: var(--primary);
  font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}

/* ---------- bottom nav (mobile) ---------- */
.bottom-nav { display: none; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 80px);
  background: var(--navy-900); color: #fff; font-size: 14px; font-weight: 500;
  padding: 12px 20px; border-radius: 10px; box-shadow: 0 8px 24px rgba(2, 6, 23, .3);
  opacity: 0; pointer-events: none; transition: transform .25s ease, opacity .25s ease;
  z-index: 60; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- convert: stepper ---------- */
.stepper {
  list-style: none; margin: 0 0 20px; padding: 6px 0 0;
  display: flex; align-items: flex-start;
}
.step { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.step-dot {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; border: 2px solid #c9d6ea; color: var(--muted);
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.step-dot svg { width: 17px; height: 17px; }
.step.active .step-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.done .step-dot { background: var(--green); border-color: var(--green); color: #fff; }
.step-label { font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: center; white-space: nowrap; }
.step.active .step-label { color: var(--primary); }
.step.done .step-label { color: var(--green-text); }
.step-line { flex: 1; height: 2px; background: #dbe4f0; margin-top: 17px; min-width: 20px; }

/* ---------- convert: upload screen ---------- */
.convert-head { margin-bottom: 14px; }
.convert-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.convert-head p { color: var(--muted); font-size: 14px; margin-top: 3px; }
.convert-card { padding: 22px 24px 24px; }
.convert-step-title { font-size: 17px; font-weight: 700; }
.convert-sub { color: var(--muted); font-size: 13.5px; margin: 3px 0 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.field { margin-bottom: 18px; }
.field > label, .field-label {
  display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px;
}
.req { color: var(--red); }
.field select, .field input[type="text"], .field input[type="email"] {
  width: 100%; padding: 11px 12px; font-size: 14.5px; font-family: var(--font);
  border: 1.5px solid #c9d6ea; border-radius: var(--radius-sm); background: #fff; color: var(--text);
}
.field select:focus, .field input[type="text"]:focus, .field input[type="email"]:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 74, 166, .14);
}
.gstin-wrap { position: relative; }
.gstin-wrap input { text-transform: uppercase; padding-right: 40px; }
.gstin-check {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 800;
}
.gstin-check svg { width: 13px; height: 13px; }
.gstin-check.ok { background: var(--green-bg); color: var(--green); }
.gstin-check.bad { background: var(--red-bg); color: var(--red); }
.field-hint { font-size: 12.5px; color: var(--muted); margin: 5px 0 0; min-height: 16px; }
.field-hint.ok { color: var(--green-text); }
.field-hint.bad { color: var(--red); }

.mkt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mkt-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: #fff; border: 1.5px solid #c9d6ea; border-radius: 12px;
  padding: 16px 10px 14px; text-align: center; transition: border-color .15s ease, box-shadow .15s ease;
}
.mkt-card:hover { border-color: var(--primary); }
.mkt-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 74, 166, .14); }
.mkt-check {
  position: absolute; top: 8px; right: 8px; width: 21px; height: 21px; border-radius: 50%;
  background: var(--primary); color: #fff; display: none; place-items: center;
}
.mkt-check svg { width: 12px; height: 12px; }
.mkt-card.selected .mkt-check { display: grid; }
.mkt-logo {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-size: 23px; font-weight: 800; color: #fff; margin-bottom: 5px; flex-shrink: 0;
}
.mkt-logo.amazon, .mkt-logo.meesho { background: #fff; border: 1px solid #e5e7eb; }
.mkt-logo.flipkart { background: #ffe500; }
.mkt-logo svg { width: 30px; height: 30px; }
.mkt-card-name { font-size: 14.5px; font-weight: 700; color: var(--text); }
.mkt-card-report { font-size: 12.5px; color: var(--muted); }

.guide-banner {
  display: flex; align-items: center; gap: 12px;
  background: var(--primary-soft); border: 1px solid #c9d6ea;
  border-radius: 12px; padding: 13px 15px; margin-bottom: 14px;
}
.guide-banner-icon {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%;
  background: #fff; color: var(--primary); display: grid; place-items: center;
}
.guide-banner-icon svg { width: 19px; height: 19px; }
.guide-banner-body { flex: 1; min-width: 0; }
.guide-banner-body strong { display: block; font-size: 14px; }
.guide-banner-body span { font-size: 13px; color: var(--muted); }
.guide-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.guide-panel[hidden] { display: none; }

/* ---------- help & guides (redesigned) ---------- */
.help-head { margin-bottom: 18px; }
.help-head h2 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 4px; }
.help-head p { color: var(--muted); font-size: 14px; }
.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.help-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
.help-card-wide { margin-bottom: 18px; }
.help-card-head { display: flex; gap: 12px; align-items: flex-start; }
.help-card-head strong { display: block; font-size: 15px; }
.help-path { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.help-portal-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--navy-900); color: #fff; flex-shrink: 0;
}
.help-portal-icon svg { width: 26px; height: 26px; }
.help-steps { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; }
.help-card-wide .help-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.help-steps li { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.5; }
.step-num {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-top: 1px;
}
.help-cta { display: flex; justify-content: center; }
@media (max-width: 900px) {
  .help-grid { grid-template-columns: 1fr; }
  .help-card-wide .help-steps { grid-template-columns: 1fr; }
}
.guide-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 15px; background: #fbfdff;
}
.guide-card-head { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 9px; }
.guide-card-head > div { min-width: 0; }
.guide-card-head strong { display: block; font-size: 13.5px; }
.guide-path { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.guide-steps { margin: 0; padding-left: 0; list-style: none; font-size: 13px; color: var(--text); }
.guide-steps li { padding: 3px 0; }
.guide-steps li strong { color: var(--primary); }

.dropzone {
  --dropzone-glow: rgba(13, 107, 87, .2);
  position: relative;
  border: 2px dashed #b8c7dd; border-radius: 12px; background: #fbfdff;
  padding: 26px 18px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--primary); background: var(--primary-soft); outline: none; }
.dropzone.drag {
  border-color: var(--primary); background: var(--primary-soft);
  transform: translateY(-2px) scale(1.005);
  animation: dz-pulse .9s ease-in-out infinite;
}
.dropzone.drag .dz-icon { animation: dz-bob .65s ease-in-out infinite; }
.dropzone.drag strong { animation: dz-text-pulse .9s ease-in-out infinite; }
.dropzone.drop-success { animation: dz-drop-success .55s cubic-bezier(.2, .8, .2, 1) both; }
.dropzone.drop-success .dz-icon { animation: dz-success-pop .55s cubic-bezier(.2, .8, .2, 1) both; }
.dropzone.drop-success::after {
  content: "✓"; position: absolute; top: 12px; right: 12px; z-index: 1;
  display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; background: #0d6b57; color: #fff;
  font-size: 17px; font-weight: 800; line-height: 1; pointer-events: none;
  animation: dz-check-pop .35s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes dz-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--dropzone-glow); }
  50% { box-shadow: 0 0 0 12px transparent; }
}
@keyframes dz-bob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.16); }
}
@keyframes dz-text-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes dz-drop-success {
  0% { transform: scale(.98); box-shadow: 0 0 0 0 rgba(18, 128, 92, .4); }
  55% { transform: scale(1.015); box-shadow: 0 0 0 12px rgba(18, 128, 92, .14); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; }
}
@keyframes dz-success-pop {
  0% { transform: translateY(4px) scale(.68); }
  70% { transform: translateY(-3px) scale(1.2); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes dz-check-pop {
  0% { opacity: 0; transform: scale(.4) rotate(-18deg); }
  70% { opacity: 1; transform: scale(1.14) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.dz-icon { width: 46px; height: 46px; color: var(--primary); }
.dz-icon svg { width: 46px; height: 46px; }
.dropzone strong { font-size: 15px; }
.dropzone .dz-note { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.privacy-note {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12.5px; color: var(--muted); margin: 10px 0 0; text-align: center;
}
.privacy-note svg { width: 15px; height: 15px; color: var(--green); flex-shrink: 0; }
.file-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.file-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.file-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.file-ok {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 600; color: var(--green-text); white-space: nowrap;
}
.file-ok svg { width: 14px; height: 14px; }
.trash-btn {
  width: 44px; height: 44px; flex-shrink: 0;
  background: none; border: none; padding: 0; color: var(--muted); border-radius: 9px;
  display: grid; place-items: center;
}
.trash-btn:hover { color: var(--red); background: var(--red-bg); }
.trash-btn svg { width: 17px; height: 17px; }
.file-empty { color: var(--muted); font-size: 13.5px; text-align: center; margin: 4px 0; }
.file-summary { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.convert-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.file-parse-note { font-size: 12.5px; color: var(--muted); margin: -2px 0 8px 47px; }
.file-parse-note.ok { color: var(--green-text); font-weight: 600; }
.file-parse-note.err { color: var(--red); font-weight: 600; }
.demo-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; font-size: 13.5px; color: var(--muted); }
.demo-btn { padding: 7px 12px; font-size: 13px; }

/* ---------- validation screen ---------- */
.valid-card { padding: 22px 24px 24px; }
.valid-top { display: grid; grid-template-columns: auto 1fr 250px; gap: 22px; align-items: start; margin-bottom: 20px; }
.ring-wrap { position: relative; width: 130px; height: 130px; flex-shrink: 0; }
.ring-num {
  position: absolute; left: 0; right: 0; top: 44px; text-align: center;
  font-size: 26px; font-weight: 800; line-height: 1;
}
.ring-label {
  position: absolute; left: 0; right: 0; top: 74px; text-align: center;
  font-size: 12.5px; color: var(--muted); font-weight: 600;
}
.valid-head h3 { font-size: 19px; font-weight: 800; margin-bottom: 3px; }
.valid-head p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.issue-counts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.count-chip {
  font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
}
.count-chip em { font-style: normal; font-weight: 500; }
.count-chip.warn { background: var(--amber-bg); color: var(--amber-text); }
.count-chip.err { background: var(--red-bg); color: var(--red-text); }
.why-card {
  background: var(--amber-soft); border: 1px solid #fde68a;
  border-radius: 12px; padding: 15px 16px;
}
.why-card h4 { font-size: 14.5px; margin-bottom: 5px; }
.why-card p { font-size: 13.5px; color: #57534e; }
.issues-title { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.issues-list { display: flex; flex-direction: column; gap: 9px; }
.issue-row {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border); border-radius: 11px; padding: 13px 15px; background: #fff;
}
.issue-row.fixed { background: var(--green-soft); border-color: #bbf7d0; }
.issue-icon {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center;
}
.issue-icon svg { width: 18px; height: 18px; }
.issue-icon.error { background: var(--red-bg); color: var(--red); }
.issue-icon.warning { background: var(--amber-bg); color: var(--amber); }
.issue-body { flex: 1; min-width: 0; }
.issue-body strong { display: block; font-size: 14px; }
.issue-body span { display: block; font-size: 13px; color: var(--muted); }
.issue-body .fixed-note { color: var(--green-text); font-weight: 600; margin-top: 2px; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-warn { background: #fef3c7; color: #92400e; border: 1.5px solid #fcd34d; }
.btn-warn:hover { background: #fde68a; }
.chev-btn {
  width: 44px; height: 44px; flex-shrink: 0;
  background: none; border: none; padding: 0; color: var(--muted);
  border-radius: 9px; display: grid; place-items: center;
}
.chev-btn:hover { background: #f1f5f9; }
.chev-btn svg { width: 18px; height: 18px; }
.fix-slot { margin: -2px 0 2px; }
.fix-slot[hidden] { display: none; }
.fix-panel {
  border: 1px solid var(--border); border-left: 3px solid var(--primary);
  border-radius: 10px; background: #fbfdff; padding: 13px 15px;
}
.fix-label { font-size: 13.5px; margin-bottom: 9px; }
.fix-row { display: flex; gap: 9px; }
.fix-row input {
  flex: 1; min-width: 0; padding: 10px 12px; font-size: 14px; font-family: var(--font);
  border: 1.5px solid #c9d6ea; border-radius: 9px; background: #fff; text-transform: uppercase;
}
.fix-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 74, 166, .14); }
.suggest-chip {
  margin-top: 9px; background: var(--primary-soft); color: var(--primary);
  border: 1px solid #c9d6ea; font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
}
.suggest-chip:hover { background: #dbe7fb; }

/* ---------- review screen ---------- */
.review-card { padding: 22px 24px 24px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.summary-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 15px 16px; display: flex; align-items: center; gap: 12px;
}
.sum-icon {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 11px;
  display: grid; place-items: center;
}
.sum-icon svg { width: 21px; height: 21px; }
.sum-icon.blue { background: var(--primary-soft); color: var(--primary); }
.sum-icon.navy { background: #e0e9f5; color: var(--navy-800); }
.sum-icon.amber { background: var(--amber-bg); color: var(--amber); }
.sum-num { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.sum-label { color: var(--muted); font-size: 13px; }
.split-card { flex-direction: column; align-items: stretch; gap: 3px; justify-content: center; }
.split-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); }
.split-row strong { color: var(--text); font-weight: 700; }
.tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  border-bottom: 2px solid var(--border); margin-bottom: 14px;
}
.tab-btn {
  background: none; border: none; padding: 9px 13px; margin-bottom: -2px;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.tab-head h4 { font-size: 15px; font-weight: 700; }
.tab-note { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.tab-body tfoot td {
  background: #f8fafc; font-size: 13.5px; border-top: 2px solid var(--border);
}
.b2b-scroll { max-height: 560px; overflow-y: auto; }

/* ---------- download screen ---------- */
.download-card { padding: 22px 24px 24px; }
.success-banner {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--green-soft); border: 1px solid #bbf7d0;
  border-radius: 12px; padding: 14px 16px; margin-bottom: 18px;
}
.success-icon {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
  background: var(--green); color: #fff; display: grid; place-items: center;
}
.success-icon svg { width: 16px; height: 16px; }
.success-banner strong { display: block; font-size: 15px; color: #14532d; }
.success-banner div span { font-size: 13.5px; color: #166534; }
.download-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 18px; }
.dl-list { display: flex; flex-direction: column; gap: 10px; }
.dl-row {
  display: flex; align-items: center; gap: 13px;
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.dl-row:hover { border-color: #c7d8f5; box-shadow: 0 4px 14px rgba(4, 30, 66, .06); }
.dl-icon {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 11px;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center;
}
.dl-icon svg { width: 21px; height: 21px; }
.dl-body { flex: 1; min-width: 0; }
.dl-body strong { display: block; font-size: 14.5px; }
.dl-body span { display: block; font-size: 12.5px; color: var(--muted); }
.dl-body .dl-desc { color: var(--text); font-size: 13px; }
.next-card {
  background: var(--primary-soft); border: 1px solid #c9d6ea;
  border-radius: 12px; padding: 16px 18px;
}
.next-card h4 { font-size: 15px; margin-bottom: 10px; }
.next-steps { padding-left: 18px; font-size: 13.5px; line-height: 1.75; color: var(--text); }
#markFiledBtn:disabled { background: var(--green); opacity: 1; cursor: default; }

/* ---------- mobile "More" sheet ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(4, 30, 66, .45);
  z-index: 60; opacity: 0; transition: opacity .2s ease;
}
.sheet-backdrop.show { opacity: 1; }
.sheet-backdrop[hidden] { display: none; }
.more-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  background: #fff; border-radius: 18px 18px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%); transition: transform .22s ease;
  box-shadow: 0 -8px 30px rgba(4, 30, 66, .18);
}
.more-sheet.open { transform: translateY(0); }
.more-sheet[hidden] { display: none; }
.sheet-handle { width: 40px; height: 4px; border-radius: 999px; background: #dbe3ef; margin: 0 auto 10px; }
.sheet-link {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 6px; font-size: 15px; font-weight: 600; color: var(--text);
  border-bottom: 1px solid var(--border-soft); background: none; border-left: none;
  border-right: none; border-top: none; text-align: left; font-family: var(--font);
}
.sheet-link svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }
.sheet-pro { color: var(--primary); }
.sheet-close {
  width: 100%; margin-top: 12px; padding: 12px; border-radius: 10px;
  background: #f1f5f9; border: none; font-size: 14.5px; font-weight: 700; color: var(--text);
}

/* ---------- motion ---------- */
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.view { animation: viewIn .28s ease both; }
.success-icon { animation: popIn .38s cubic-bezier(.2, 1.4, .4, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .view, .success-icon { animation: none; }
  .link-arrow, .btn, .dl-row, .tab-btn { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid .mini-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .view { padding: 16px 16px 96px; }
  .topbar { padding: 14px 16px 4px; }
  .page-title { font-size: 17px; white-space: nowrap; }
  .lang-pill span { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  /* Reminder banner: let the overdue pill drop below the text instead of
     squeezing it into a narrow column at phone widths. */
  .reminder-banner { flex-wrap: wrap; }
  .reminder-body { flex-basis: calc(100% - 56px); }
  .days-pill { margin-left: 56px; }
  .welcome-card { flex-direction: column; align-items: flex-start; padding: 20px; }
  .welcome-art { width: 130px; }
  .dash-grid { grid-template-columns: 1fr; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: #fff; border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 0 2px; font-size: 11.5px; font-weight: 600; color: var(--muted);
    border-radius: 9px; background: none; border: none; font-family: var(--font);
  }
  .bn-item svg { width: 21px; height: 21px; }
  .bn-item.active { color: var(--primary); }
  .form-grid { grid-template-columns: 1fr; }
  .mkt-grid { grid-template-columns: 1fr; }
  .guide-panel { grid-template-columns: 1fr; }
  .guide-banner { flex-wrap: wrap; }
  .guide-banner .btn { width: 100%; }
  .convert-card { padding: 18px 16px 20px; }
  .convert-actions { flex-direction: column; }
  .convert-actions .btn { width: 100%; }
  .step-label { font-size: 11px; white-space: normal; }
  .file-size { display: none; }
  .valid-top { grid-template-columns: 1fr; justify-items: center; gap: 14px; }
  .valid-head, .why-card { width: 100%; }
  .fix-row { flex-direction: column; }
  .fix-row .btn { width: 100%; }
  .issue-row { flex-wrap: wrap; }
  .issue-row .btn-danger, .issue-row .btn-warn { margin-left: auto; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-card { min-width: 0; padding: 12px; }
  .sum-num { font-size: 17px; }
  .split-card { grid-column: 1 / -1; }
  .tab-btn { padding: 9px 10px; font-size: 12.5px; flex-shrink: 0; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-head { flex-direction: column; align-items: flex-start; }
  .tab-head .link-arrow { align-self: stretch; justify-content: center; }
  .download-grid { grid-template-columns: 1fr; }
  .dl-row { flex-wrap: wrap; }
  .dl-row .btn { width: 100%; }
}

/* ---- fixes & additions ---- */
.file-row .mkt { flex-shrink: 0; }
.file-row .file-mkt-select {
  width: 112px; flex: 0 0 112px; padding: 5px 8px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--border); border-radius: 8px; background-color: #fff; color: var(--text);
}
.file-ok.pending { color: var(--muted); }
.file-ok.bad { color: var(--red); }
.cal-grid .day.today { box-shadow: inset 0 0 0 1.5px var(--primary); border-radius: 8px; font-weight: 700; }
.days-pill.overdue { background: var(--red); color: #fff; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--primary-soft, #E8EFFC); color: var(--primary); }
@media (max-width: 640px) {
  .file-row { flex-wrap: wrap; }
  .file-name { flex-basis: calc(100% - 40px); }
  .file-parse-note { margin-left: 4px; }
}

/* ---------- policy pages (static: about / contact / terms / privacy / refund / pricing) ---------- */
.policy-top { display: flex; align-items: center; justify-content: space-between; max-width: 860px; margin: 0 auto; padding: 18px 24px; }
.policy-brand { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; color: var(--text); }
.policy-brand-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--navy-900); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.policy-brand-icon svg { width: 18px; height: 18px; }
.policy-back { font-size: 14px; font-weight: 600; white-space: nowrap; }
.policy { max-width: 760px; margin: 0 auto; padding: 12px 24px 40px; }
.policy h1 { font-size: 28px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 6px; }
.policy-updated { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.policy h2 { font-size: 18px; font-weight: 700; margin: 26px 0 8px; }
.policy p { font-size: 15px; line-height: 1.65; margin-bottom: 12px; }
.policy ul { margin: 0 0 12px; padding-left: 20px; }
.policy li { font-size: 15px; line-height: 1.65; margin-bottom: 6px; }
.policy-note { background: var(--primary-soft); border: 1px solid #c9d6ea; border-radius: 12px; padding: 13px 15px; font-size: 14px; line-height: 1.6; }
.policy table { width: 100%; border-collapse: collapse; margin: 4px 0 16px; font-size: 14.5px; }
.policy-table { overflow-x: auto; margin: 4px 0 16px; -webkit-overflow-scrolling: touch; }
.policy-table table { margin: 0; min-width: 520px; }
.policy th, .policy td { text-align: left; padding: 10px 12px; border: 1px solid var(--border); vertical-align: top; }
.policy th { background: #f8fafc; font-weight: 700; }
.policy-foot { max-width: 860px; margin: 0 auto; padding: 18px 24px 32px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13.5px; color: var(--muted); }
.policy-foot a { color: var(--muted); font-weight: 600; }
.policy-foot a:hover { color: var(--primary); }
.policy-foot span { margin-left: auto; }

/* ---------- sidebar policy links ---------- */
.sidebar-foot { padding: 0 16px 16px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sidebar-foot a { color: #94a3b8; font-size: 12px; font-weight: 600; }
.sidebar-foot a:hover { color: #fff; }
.app.sidebar-collapsed .sidebar-foot { display: none; }
.sheet-sep { height: 1px; background: var(--border-soft); margin: 6px 0; }
.sheet-note { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 12px 6px 2px; margin: 0; }
@media (max-width: 640px) {
  .policy h1 { font-size: 24px; }
  .policy-foot span { margin-left: 0; }
}

/* ---------- upgrade modal (Pro / Free) ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(4, 30, 66, .45); }
.modal-overlay[hidden] { display: none; }
.modal-card { position: relative; width: 100%; max-width: 420px; background: #fff; border-radius: 14px; padding: 24px; box-shadow: 0 20px 50px rgba(4, 30, 66, .25); }
.modal-close { position: absolute; top: 10px; right: 12px; border: none; background: transparent; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px; }
.modal-close:hover { color: var(--text); }
.modal-card h3 { font-size: 20px; margin: 0 0 4px; }
.pro-status { margin: 0 0 10px; font-size: 13.5px; font-weight: 700; color: var(--green-text); }
.pro-price { font-size: 28px; font-weight: 800; color: var(--primary); margin: 0 0 4px; }
.pro-price s { font-size: 18px; font-weight: 600; color: var(--muted); margin-right: 6px; }
.pro-offer { margin: 0 0 12px; font-size: 13.5px; font-weight: 700; color: var(--green-text); }
.pro-price span { font-size: 14px; font-weight: 600; color: var(--muted); }
.pro-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.pro-list li { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.pro-list li::before {
  content: "\2713"; width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%;
  background: var(--green-bg); color: var(--green);
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
}
.pro-code { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.pro-code label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
.pro-code-row { display: flex; gap: 8px; }
.pro-code-row input {
  flex: 1; min-width: 0; padding: 11px 12px; font-size: 14.5px; font-family: var(--font);
  border: 1.5px solid #c9d6ea; border-radius: var(--radius-sm); background: #fff; color: var(--text);
  text-transform: uppercase;
}
.pro-code-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 74, 166, .14); }
.pro-code-msg { margin: 10px 0 0; font-size: 13.5px; font-weight: 600; }
.pro-code-msg.ok { color: var(--green); }
.pro-code-msg.err { color: var(--red); }

/* ---- Auth: login screen + sidebar user box ---- */
.auth-wrap { max-width: 480px; margin: 0 auto; }
.auth-card h3 { font-size: 20px; margin-bottom: 8px; }
.auth-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }
.auth-card .otp-input { font-size: 24px; font-weight: 700; letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.auth-note { color: var(--muted); font-size: 12.5px; text-align: center; margin: 14px 0 0; }
.auth-optin { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; font-size: 13.5px; font-weight: 500; color: var(--text); cursor: pointer; }
.auth-optin input { margin-top: 2px; width: 16px; height: 16px; flex: none; accent-color: var(--primary); }

/* ---- Owner-only dashboard cards (Pro users + announcements) ---- */
/* NOTE: plain .card has NO padding in this app — the heading gets
   its inset from .card-head and every other card brings its own.
   These cards were shipping with all body content flush to the
   card edge (the counts line even clipped). So the card carries
   the 20px sides + bottom, the head drops its own side padding,
   and the table bleeds edge-to-edge like Recent Filings. */
.owner-card { margin-top: 18px; padding: 0 20px 20px; }
.owner-card .card-head { padding: 17px 0 0; }
.owner-card .table-wrap { margin: 0 -20px; }
.owner-card h3 svg { width: 19px; height: 19px; color: var(--primary); }
.owner-note { color: var(--muted); font-size: 13.5px; margin: -4px 0 12px; }
.owner-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.owner-form input, .owner-form select { padding: 9px 10px; border: 1.5px solid var(--border); border-radius: 8px; font-family: var(--font); font-size: 13.5px; background: var(--card); color: var(--text); }
.owner-form input:focus, .owner-form select:focus { outline: none; border-color: var(--primary); }
.owner-form #ownerGrantEmail { flex: 2 1 200px; }
.owner-form #ownerGrantDays, .owner-form #ownerGrantAmount { flex: 0 1 110px; }
.owner-card .field { margin-bottom: 12px; }
.owner-card .field .field-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.owner-card .field input[type="text"], .owner-card textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-family: var(--font); font-size: 14px; background: var(--card); color: var(--text); }
.owner-card .field input[type="text"]:focus, .owner-card textarea:focus { outline: none; border-color: var(--primary); }
.owner-card textarea { resize: vertical; }
.owner-card .field-hint { margin: 10px 0 0; font-size: 13.5px; font-weight: 600; }
.owner-card .field-hint.ok { color: var(--green); }
.owner-card .field-hint.err { color: var(--red); }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.auth-links .pro-link-inline { font-size: 13.5px; }
.auth-box { padding: 12px 14px; border-top: 1px solid var(--border); }
.auth-box .btn-block { width: 100%; }
.auth-box-note { color: var(--muted); font-size: 12px; margin: 8px 0 0; text-align: center; }
.auth-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.auth-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #0d6b57; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.auth-user-text { min-width: 0; }
.auth-user-text strong { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-user-text span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pro-user-line { margin: 14px 0 0; font-size: 13.5px; color: var(--text); text-align: center; }
.pro-link-inline { margin-left: 4px; padding: 0; border: none; background: transparent; font-size: inherit; font-weight: 600; font-family: var(--font); color: var(--primary); text-decoration: underline; cursor: pointer; }
.pro-link-inline:hover { color: var(--primary-dark); }
.pro-user-line.hide, #couponSection.hide { animation: proSlideOut .3s ease forwards; }
.pro-code.reveal { animation: proSlideIn .3s ease; }
.pro-back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px; padding: 2px 0; border: none; background: transparent; font-size: 13.5px; font-weight: 600; font-family: var(--font); color: var(--primary); cursor: pointer; }
.pro-back[hidden] { display: none; }
.pro-back:hover { color: var(--primary-dark); }
.pro-back svg { width: 16px; height: 16px; }
.pro-back.reveal { animation: proSlideIn .3s ease; }
.pro-user-line.reveal-back, #couponSection.reveal-back { animation: proSlideInLeft .3s ease; }
.pro-code.hide-back { animation: proSlideOutRight .3s ease forwards; }
@keyframes proSlideOut { to { transform: translateX(-16px); opacity: 0; } }
@keyframes proSlideIn { from { transform: translateX(16px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes proSlideOutRight { to { transform: translateX(16px); opacity: 0; } }
@keyframes proSlideInLeft { from { transform: translateX(-16px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .pro-user-line.hide, #couponSection.hide, .pro-code.reveal, .pro-back.reveal, .pro-user-line.reveal-back, #couponSection.reveal-back, .pro-code.hide-back { animation: none; }
}
@media (max-width: 480px) {
  .modal-card { padding: 20px; }
  .pro-code-row { flex-direction: column; }
  .pro-code-row .btn { width: 100%; }
}

/* ---------- policy pages polish ---------- */
.policy-top { position: sticky; top: 0; z-index: 10; max-width: none; padding: 14px max(24px, calc((100% - 860px)/2)); background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.policy-brand-icon { background: linear-gradient(135deg, #0b4aa6, #1d6fe0); }
.policy-back { padding: 8px 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.policy-back:hover { background: var(--primary-soft); border-color: var(--primary); }
.policy { margin-top: 32px; padding: 40px 48px 48px; background: #fff; border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.policy h1 { font-size: 36px; letter-spacing: -.02em; color: var(--navy-900); }
.policy h2 { padding-top: 20px; border-top: 1px solid var(--border-soft); color: var(--navy-900); }
.policy p, .policy li { color: #334155; }
.policy a { text-decoration: underline; text-underline-offset: 2px; }
.policy-foot { max-width: 760px; margin: 28px auto 40px; padding: 0 24px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.policy-foot a { font-weight: 600; color: #475569; } .policy-foot a:hover { color: var(--primary); }
.policy-foot span { margin-left: auto; color: var(--muted); }
@media (max-width: 600px) { .policy { margin: 16px 12px 0; padding: 24px 20px; } .policy h1 { font-size: 28px; } .policy-foot span { margin-left: 0; width: 100%; } }

/* ---------- pricing table + notes polish ---------- */
.policy-table { overflow-x: auto; margin: 8px 0 24px; border: 1px solid var(--border); border-radius: 14px; }
.policy-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.policy-table th { background: #f1f5fb; color: var(--navy-900); text-align: left; padding: 14px 16px; font-weight: 700; }
.policy-table th:nth-child(3) { background: #e8effc; color: var(--primary); }
.policy-table td { padding: 13px 16px; border-top: 1px solid var(--border-soft); color: #334155; }
.policy-table td:first-child { font-weight: 700; color: var(--navy-900); white-space: nowrap; }
.policy-note { background: var(--primary-soft); border: 1px solid #cfe0fa; border-radius: 12px; padding: 14px 16px; }
.policy-note a { font-weight: 700; }

/* ---------- app shell polish ---------- */
.sidebar { background: linear-gradient(180deg, #041e42 0%, #0a2a52 100%); }
.brand-icon { background: linear-gradient(135deg, #0b4aa6, #1d6fe0); box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.nav-item { border-radius: 10px; transition: background .2s, transform .2s; }
.nav-item:hover { transform: translateX(2px); }
.pro-card { background: linear-gradient(135deg, #0b4aa6, #1d6fe0); border-radius: 16px; box-shadow: 0 10px 24px -8px rgba(0,0,0,.4); }
.topbar { background: rgba(255,255,255,.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.page-title { letter-spacing: -.01em; color: var(--navy-900); }
.btn-primary { background: linear-gradient(135deg, #0b4aa6, #1d6fe0); box-shadow: 0 6px 16px -4px rgba(11,74,166,.4); }
.btn-primary:hover { background: linear-gradient(135deg, #0b4aa6, #1d6fe0); filter: brightness(1.07); }
.modal-card { border-radius: 20px; box-shadow: 0 30px 70px -15px rgba(4,30,66,.45); }

/* ---------- contact cards + global polish ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 8px 0 20px; }
.contact-card { display: block; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: #f7f9fd; transition: transform .2s, box-shadow .2s, border-color .2s; }
a.contact-card:hover { transform: translateY(-2px); border-color: #b9cff3; box-shadow: 0 10px 24px -10px rgba(4,30,66,.25); }
.contact-card span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.contact-card strong { font-size: 15px; color: var(--navy-900); word-break: break-word; }
.card { border-radius: 16px; transition: box-shadow .25s, border-color .25s; }
.card:hover { box-shadow: 0 12px 28px -12px rgba(4,30,66,.18); }
:focus-visible { outline: 3px solid rgba(11,74,166,.55); outline-offset: 2px; }
::selection { background: #cfe0fa; }
@media print { .policy-top, .policy-foot { display: none; } .policy { border: 0; box-shadow: none; } }


/* ==========================================================================
   REDESIGN v3 — professional UI refresh (same palette: navy #041e42,
   primary #0b4aa6, page bg cool grey-blue). CSS only: no class names or
   markup changed, so every screen keeps working. This layer overrides the
   earlier rules above.
   ========================================================================== */
:root {
  --bg: #f4f7fb;
  --border: #e1e8f2;
  --border-soft: #e9eef6;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(4, 30, 66, .04), 0 2px 8px rgba(4, 30, 66, .04);
  --shadow-md: 0 8px 24px -6px rgba(4, 30, 66, .12), 0 2px 6px rgba(4, 30, 66, .05);
  --grad: linear-gradient(135deg, #0b4aa6 0%, #1a63c9 100%);
  --ring: 0 0 0 4px rgba(11, 74, 166, .14);
}
body { font-size: 15px; letter-spacing: -.003em; background: var(--bg); }
h1, h2, h3, h4 { letter-spacing: -.02em; color: var(--navy-900); }
::selection { background: #cfe0fa; }
:focus-visible { outline: 3px solid rgba(11, 74, 166, .5); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn { border-radius: 10px; font-weight: 600; letter-spacing: -.005em; padding: 11px 18px; }
.btn-primary { background: var(--primary); box-shadow: 0 1px 2px rgba(4, 30, 66, .25), 0 4px 12px -2px rgba(11, 74, 166, .35); }
.btn-primary:hover { background: var(--primary-dark); filter: none; box-shadow: 0 1px 2px rgba(4, 30, 66, .25), 0 8px 18px -4px rgba(11, 74, 166, .45); }
.btn-outline { border: 1px solid #c4d3ea; box-shadow: 0 1px 2px rgba(4, 30, 66, .04); }
.btn-outline:hover { border-color: var(--primary); background: #f3f7fe; }
.btn-light { box-shadow: 0 1px 2px rgba(4, 30, 66, .15); }
.btn-mini { border: 1px solid #c4d3ea; border-radius: 9px; padding: 9px 14px; min-width: 0; transition: background .15s, border-color .15s; }
.btn-mini:hover { border-color: var(--primary); }
.link-arrow { border-radius: 9px; border-color: #d3e0f5; }

/* ---------- sidebar ---------- */
.sidebar { background: linear-gradient(185deg, #041e42 0%, #072a58 100%); border-right: 1px solid rgba(255, 255, 255, .04); }
.brand { padding: 22px 18px 18px; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 16.5px; letter-spacing: -.01em; }
.brand-icon { background: linear-gradient(135deg, #1a63c9, #0b4aa6); border-radius: 10px; box-shadow: 0 4px 12px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .2); }
.nav { padding: 16px 12px; gap: 3px; }
.nav-item { position: relative; padding: 10px 12px; border-radius: 10px; font-size: 14.5px; color: #b7c8de; transition: background .18s, color .18s; }
.nav-item:hover { transform: none; background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #6aa3ff; }
.app.sidebar-collapsed .nav-item.active::before { left: -10px; }
.pro-card { background: linear-gradient(145deg, #0b4aa6 0%, #1a63c9 100%); border: 1px solid rgba(255, 255, 255, .15); border-radius: 14px; box-shadow: 0 14px 28px -10px rgba(0, 0, 0, .5); padding: 18px 16px; }
.pro-card .btn-light { color: var(--primary); font-weight: 700; }
.sidebar-foot a { color: #7f93b0; }

/* ---------- topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; max-width: none; padding: 14px 32px; background: rgba(255, 255, 255, .88); border-bottom: 1px solid var(--border); }
.page-title { font-size: 19px; font-weight: 700; }
.lang-pill, .icon-btn { border-color: var(--border); box-shadow: 0 1px 2px rgba(4, 30, 66, .04); transition: border-color .15s, background .15s; }
.lang-pill { padding: 8px 14px; }
.lang-pill:hover, .icon-btn:hover { border-color: #b9cdea; background: #f7faff; }
.view { padding: 28px 32px 56px; }

/* ---------- cards ---------- */
.card { border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow); transition: none; }
.card:hover { box-shadow: var(--shadow); }
.card-head { padding: 18px 22px 0; }
.card-head h3 { font-size: 16px; font-weight: 700; }

/* ---------- dashboard ---------- */
.welcome-card { position: relative; overflow: hidden; padding: 30px 32px; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); background: linear-gradient(120deg, #ffffff 55%, #eef4fd 100%); }
.welcome-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.welcome-text h2 { font-size: 26px; letter-spacing: -.025em; }
.welcome-text p { font-size: 15px; }
.stat-grid { gap: 16px; }
.stat-card { border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); transition: border-color .2s, transform .2s, box-shadow .2s; }
.stat-card:hover { border-color: #c6d7f0; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon { border-radius: 12px; }
.stat-num { font-size: 24px; letter-spacing: -.03em; color: var(--navy-900); }
.stat-label { font-weight: 500; }
.reminder-banner { border-radius: 14px; padding: 16px 20px; }
.days-pill { letter-spacing: .01em; }

.table-wrap { padding: 8px 10px 14px; }
th { padding: 11px 14px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #f7f9fc; border-bottom: 1px solid var(--border); }
th:first-child { border-radius: 8px 0 0 8px; }
th:last-child { border-radius: 0 8px 8px 0; }
td { padding: 13px 14px; font-size: 14px; border-bottom: 1px solid var(--border-soft); }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #f8fbff; }
.status-pill { font-weight: 600; padding: 4px 11px; }
.mkt { border-radius: 7px; }
.dash-grid { gap: 16px; }
.mini-card { padding: 20px 22px; }
.mini-card h3 { font-size: 15px; font-weight: 700; }
.mini-card h3 svg { padding: 4px; width: 26px; height: 26px; border-radius: 8px; background: var(--primary-soft); }
.help-link { padding: 11px 0; transition: color .15s; }
.help-link:hover { color: var(--primary); }
.cal-grid .day.due { border-radius: 8px; box-shadow: 0 4px 10px -2px rgba(11, 74, 166, .4); }
.cal-nav button { width: 32px; height: 32px; border-radius: 8px; }

/* ---------- convert flow ---------- */
.stepper { margin: 4px 0 24px; padding: 18px 24px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.step-dot { width: 32px; height: 32px; border-width: 2px; font-size: 13.5px; transition: background .2s, border-color .2s; }
.step.active .step-dot { box-shadow: 0 0 0 5px rgba(11, 74, 166, .14); }
.step-line { height: 2px; margin-top: 16px; border-radius: 2px; }
.step-label { font-size: 12.5px; letter-spacing: -.003em; }
.convert-head h2 { font-size: 24px; letter-spacing: -.025em; }
.convert-card, .valid-card, .review-card, .download-card { padding: 28px 30px 30px; }
.convert-step-title { font-size: 18px; letter-spacing: -.02em; }
.field > label, .field-label { font-weight: 600; color: var(--navy-900); }
.field select, .field input[type="text"], .field input[type="email"], .fix-row input, .pro-code-row input { border: 1px solid #c4d3ea; border-radius: 10px; padding: 11px 13px; transition: border-color .15s, box-shadow .15s; }
.field select:hover, .field input[type="text"]:hover, .field input[type="email"]:hover { border-color: #9fb8de; }
.field select:focus, .field input[type="text"]:focus, .field input[type="email"]:focus, .fix-row input:focus, .pro-code-row input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.mkt-grid { gap: 14px; }
.mkt-card { border: 1px solid #c9d7ec; border-radius: 14px; padding: 20px 12px 18px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.mkt-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.mkt-card.selected { border: 1px solid var(--primary); background: #f5f9ff; box-shadow: 0 0 0 3px rgba(11, 74, 166, .16); }
.mkt-logo { border-radius: 13px; }
.guide-banner { border-radius: 12px; border-color: #d3e0f5; background: #f1f6fe; }
.guide-card { border-radius: 12px; border-color: var(--border); background: #fff; }
.dropzone { border: 2px dashed #aebfda; border-radius: 16px; padding: 38px 20px; background: linear-gradient(180deg, #fbfdff, #f4f8fe); }
.dropzone:hover, .dropzone:focus-visible { border-color: var(--primary); background: #f0f6ff; }
.dz-icon { width: 54px; height: 54px; padding: 11px; border-radius: 16px; background: var(--primary-soft); }
.dz-icon svg { width: 32px; height: 32px; }
.dropzone strong { font-size: 16px; color: var(--navy-900); }
.file-row { border-radius: 12px; padding: 11px 14px; box-shadow: var(--shadow); }
.convert-actions { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-soft); }

/* ---------- validation ---------- */
.ring-wrap { filter: drop-shadow(0 4px 10px rgba(4, 30, 66, .08)); }
.valid-head h3 { font-size: 20px; letter-spacing: -.025em; }
.count-chip { padding: 5px 12px; }
.why-card { border-radius: 12px; }
.issues-title { font-size: 16.5px; }
.issue-row { border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); transition: border-color .15s; }
.issue-row:hover { border-color: #c6d7f0; }
.fix-panel { border-radius: 12px; background: #f8fbff; }

/* ---------- review ---------- */
.summary-grid { gap: 14px; }
.summary-card { border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.sum-num { letter-spacing: -.025em; color: var(--navy-900); }
.tabs { gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab-btn { padding: 11px 16px; margin-bottom: -1px; font-size: 14px; border-radius: 8px 8px 0 0; border-bottom: 2px solid transparent; transition: color .15s, background .15s; }
.tab-btn:hover { background: #f3f7fd; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); background: transparent; }
.tab-head h4 { font-size: 16px; }
.tab-body tfoot td { background: #f7f9fc; font-weight: 600; }

/* ---------- download ---------- */
.success-banner { border-radius: 14px; padding: 18px 20px; }
.dl-row { border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.dl-row:hover { border-color: #b9cdea; box-shadow: var(--shadow-md); }
.dl-icon { border-radius: 12px; }
.next-card { border-radius: 14px; background: #f1f6fe; border-color: #d3e0f5; padding: 20px 22px; }

/* ---------- toast, modal, sheet ---------- */
.toast { border-radius: 12px; padding: 13px 22px; box-shadow: 0 14px 34px -8px rgba(2, 6, 23, .4); }
.modal-overlay { background: rgba(4, 30, 66, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal-card { max-width: 440px; border-radius: 20px; padding: 32px 30px 28px; }
.modal-card h3 { font-size: 22px; letter-spacing: -.025em; }
.pro-price { font-size: 34px; letter-spacing: -.035em; }
.modal-close { top: 14px; right: 16px; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
.modal-close:hover { background: #f1f5f9; }
.more-sheet { border-radius: 20px 20px 0 0; }

/* ---------- bottom nav (mobile) ---------- */
@media (max-width: 900px) {
  .topbar { padding: 12px 16px; }
  .view { padding: 18px 16px 100px; }
  .stepper { padding: 14px 12px; }
  .convert-card, .valid-card, .review-card, .download-card { padding: 20px 16px 22px; }
  .bottom-nav { box-shadow: 0 -6px 20px rgba(4, 30, 66, .06); }
  .bn-item.active { color: var(--primary); }
  .bn-item.active svg { transform: translateY(-1px); }
}

@media (max-width: 580px) {
  /* Stepper: 4 labels + dots need ~520px but only ~334px fit at 390px,
     so the last step gets clipped / pushes the page wide. Below this
     width show only the active step's label; all 4 dots + lines stay
     visible so progress is never lost. Layout properties only. */
  .stepper { overflow-x: visible; padding: 12px; }
  .step:not(.active) { gap: 0; }
  .step:not(.active) .step-label { display: none; }
  .step-line { margin: 0 8px; min-width: 10px; }
}

/* ---------- legal / policy pages ---------- */
body:has(.policy) { background: var(--bg); }
.policy-top { padding: 14px max(24px, calc((100% - 960px) / 2)); background: rgba(255, 255, 255, .9); }
.policy-brand { font-size: 17px; letter-spacing: -.01em; font-weight: 500; }
.policy-brand strong { font-weight: 800; }
.policy-brand-icon { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 4px 10px rgba(11, 74, 166, .3); }
.policy-back { border-radius: 10px; font-size: 14px; }
.policy { max-width: 800px; margin: 40px auto 0; padding: 48px 56px 56px; border-radius: 20px; border: 1px solid var(--border); box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
.policy::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--grad); }
.policy h1 { font-size: 38px; line-height: 1.12; letter-spacing: -.035em; }
.policy-updated { display: inline-block; margin: 8px 0 28px; padding: 4px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12.5px; font-weight: 600; }
.policy h2 { font-size: 20px; margin: 32px 0 10px; padding-top: 26px; letter-spacing: -.02em; }
.policy p, .policy li { font-size: 15.5px; line-height: 1.72; color: #3b4a63; }
.policy a { text-decoration-thickness: 1px; font-weight: 600; }
.policy-foot { max-width: 800px; padding: 0 8px; margin: 28px auto 48px; }
.policy-table { border-radius: 14px; }
.policy-table th { font-size: 13px; text-transform: none; letter-spacing: 0; background: #f4f7fc; }
.contact-card { border-radius: 14px; background: #f7faff; padding: 18px 20px; }
a.contact-card:hover { border-color: var(--primary); }
@media (max-width: 600px) { .policy { margin: 16px 12px 0; padding: 32px 22px 36px; } .policy h1 { font-size: 30px; } }

@media (prefers-reduced-motion: reduce) { .stat-card, .mkt-card, .issue-row, .tab-btn, .nav-item { transition: none; } .stat-card:hover, .mkt-card:hover { transform: none; } }


/* ==========================================================================
   THEME TOGGLE + DARK MODE
   Activated by <html data-theme="dark"> (set by js/theme.js). Same blue/navy
   palette on deep navy surfaces. --primary becomes a lighter blue for text and
   links; solid blue fills (buttons, active step, due date) keep a deeper blue
   so white text stays readable.
   ========================================================================== */
:root { color-scheme: light; }
.theme-toggle {
  position: relative; flex-shrink: 0; width: 38px; height: 38px; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-radius: 50%;
  box-shadow: 0 1px 2px rgba(4, 30, 66, .04);
  transition: background .15s, border-color .15s, transform .15s;
}
.theme-toggle:hover { border-color: #b9cdea; background: #f7faff; }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle .i-sun { display: block; }
html[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.policy-top .policy-back { margin-left: auto; }
.policy-top .theme-toggle { margin-left: 10px; }

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1424;
  --card: #101c31;
  --border: #223350;
  --border-soft: #1a2a44;
  --text: #e6edf7;
  --muted: #93a3bd;
  --muted-2: #6f819f;
  --primary: #6aa3ff;
  --primary-dark: #8fbbff;
  --primary-soft: #162847;
  --primary-fill: #1d63c9;
  --green-bg: rgba(34, 197, 94, .16);
  --green-soft: rgba(34, 197, 94, .09);
  --amber-bg: rgba(245, 158, 11, .18);
  --amber-soft: rgba(245, 158, 11, .09);
  --red-bg: rgba(239, 68, 68, .18);
  --green-text: #6ee7a0;
  --amber-text: #fcd34d;
  --red-text: #fca5a5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .22);
  --shadow-md: 0 12px 30px -8px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .3);
  --ring: 0 0 0 4px rgba(106, 163, 255, .22);
}
html[data-theme="dark"] body { background: var(--bg); color: var(--text); }
html[data-theme="dark"] ::selection { background: #1f4a8f; color: #fff; }
html[data-theme="dark"] :focus-visible { outline-color: rgba(106, 163, 255, .8); }

/* headings + strong text */
html[data-theme="dark"] :is(h1, h2, h3, h4, .page-title, .stat-num, .sum-num, .field > label, .field-label, .dropzone strong, .contact-card strong, .policy h1, .policy h2, .policy-table th, .policy-table td:first-child, .policy-brand, .welcome-text h2) { color: #f1f5fb; }
html[data-theme="dark"] :is(.policy p, .policy li, .policy-table td) { color: #c3cee0; }
html[data-theme="dark"] .policy-foot a { color: var(--muted); }
html[data-theme="dark"] .policy-foot a:hover { color: var(--primary); }
html[data-theme="dark"] .why-card p { color: #d6cdbd; }
html[data-theme="dark"] .success-banner strong { color: #86efac; }
html[data-theme="dark"] .success-banner div span { color: #6ee7a0; }

/* surfaces */
html[data-theme="dark"] :is(.theme-toggle, .lang-pill, .icon-btn, .cal-nav button, .btn-outline, .btn-mini, .link-arrow, .step-dot, .mkt-card, .guide-banner-icon, .guide-card, .help-card, .file-row, .file-row .file-mkt-select, .issue-row, .summary-card, .dl-row, .modal-card, .more-sheet, .bottom-nav, .stepper, .policy, .policy-back) { background: var(--card); color: var(--text); }
html[data-theme="dark"] :is(.btn-outline, .btn-mini, .link-arrow) { color: var(--primary); }
html[data-theme="dark"] :is(.theme-toggle, .lang-pill, .icon-btn, .cal-nav button, .btn-outline, .btn-mini, .link-arrow, .step-dot, .mkt-card, .suggest-chip, .file-row .file-mkt-select, .stepper) { border-color: #2c4268; }
html[data-theme="dark"] :is(.theme-toggle:hover, .lang-pill:hover, .icon-btn:hover, .btn-outline:hover, .btn-mini:hover, .link-arrow:hover, .policy-back:hover) { background: #162847; border-color: var(--primary); }
html[data-theme="dark"] .topbar { background: rgba(10, 20, 36, .88); border-bottom-color: var(--border); }
html[data-theme="dark"] .policy-top { background: rgba(10, 20, 36, .9); border-bottom-color: var(--border); }
html[data-theme="dark"] .welcome-card { background: linear-gradient(120deg, #101c31 55%, #13294a 100%); }
html[data-theme="dark"] .stat-card:hover, html[data-theme="dark"] .issue-row:hover { border-color: #34507d; }
html[data-theme="dark"] .dl-row:hover { border-color: #34507d; }

/* soft panels */
html[data-theme="dark"] :is(.guide-banner, .next-card) { background: #12233f; border-color: #223a63; }
html[data-theme="dark"] :is(.fix-panel, .contact-card) { background: #0d1a30; }
html[data-theme="dark"] a.contact-card:hover { border-color: var(--primary); }
html[data-theme="dark"] .mkt-card.selected { background: #142a4d; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(106, 163, 255, .2); }
html[data-theme="dark"] .dropzone { background: #0d1a30; border-color: #35507a; }
html[data-theme="dark"] :is(.dropzone:hover, .dropzone:focus-visible, .dropzone.drag) { background: #12233f; border-color: var(--primary); }
html[data-theme="dark"] .reminder-banner.overdue { border-color: rgba(245, 158, 11, .35); }
html[data-theme="dark"] .why-card { border-color: rgba(245, 158, 11, .3); }
html[data-theme="dark"] .issue-row.fixed { border-color: rgba(34, 197, 94, .3); }
html[data-theme="dark"] .success-banner { border-color: rgba(34, 197, 94, .3); }

/* inputs */
html[data-theme="dark"] :is(.field select, .field input[type="text"], .field input[type="email"], .fix-row input, .pro-code-row input) { background: #0c182c; color: var(--text); border-color: #2c4268; }
html[data-theme="dark"] :is(.field select:hover, .field input[type="text"]:hover, .field input[type="email"]:hover) { border-color: #4a6a9c; }
html[data-theme="dark"] :is(.field select:focus, .field input[type="text"]:focus, .field input[type="email"]:focus, .fix-row input:focus, .pro-code-row input:focus) { border-color: var(--primary); }
html[data-theme="dark"] ::placeholder { color: #6f819f; opacity: 1; }

/* tables + tabs */
html[data-theme="dark"] th { background: #0d1a30; border-bottom-color: var(--border); }
html[data-theme="dark"] tbody tr:hover { background: #142238; }
html[data-theme="dark"] .tab-body tfoot td { background: #0d1a30; border-top-color: var(--border); }
html[data-theme="dark"] .tab-btn:hover { background: #142238; color: var(--text); }
html[data-theme="dark"] :is(.policy-table th, .policy th) { background: #12233f; }
html[data-theme="dark"] .policy-table th:nth-child(3) { color: var(--primary); }
html[data-theme="dark"] .policy-note { border-color: #223a63; }

/* solid blue fills keep white text readable */
html[data-theme="dark"] :is(.btn-primary, .step.active .step-dot, .cal-grid .day.due, .mkt-check) { background: var(--primary-fill); color: #fff; }
html[data-theme="dark"] .step.active .step-dot { border-color: var(--primary); }
html[data-theme="dark"] .btn-primary:hover { background: #2a72dc; box-shadow: 0 8px 18px -4px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .btn-light { background: #fff; color: #0b4aa6; }
html[data-theme="dark"] .pro-card .btn-light { color: #0b4aa6; }
html[data-theme="dark"] .btn-warn { background: var(--amber-bg); color: var(--amber-text); border-color: rgba(245, 158, 11, .4); }
html[data-theme="dark"] .btn-warn:hover { background: rgba(245, 158, 11, .28); }
html[data-theme="dark"] :is(.stat-icon.navy, .sum-icon.navy) { background: #1a2f52; color: #9dc0f5; }
html[data-theme="dark"] .plan-line .tag { background: #1a2a44; }
html[data-theme="dark"] .suggest-chip:hover { background: #1d3358; }
html[data-theme="dark"] .step-line { background: #2a3d5c; }
html[data-theme="dark"] .cal-grid .day.dim { color: #3a4b66; }

/* sheets, toast, close buttons */
html[data-theme="dark"] .sheet-close { background: #1a2a44; color: var(--text); }
html[data-theme="dark"] .sheet-handle { background: #2a3d5c; }
html[data-theme="dark"] .sheet-link { color: var(--text); }
html[data-theme="dark"] .sheet-pro { color: var(--primary); }
html[data-theme="dark"] .bottom-nav { border-top-color: var(--border); box-shadow: 0 -6px 20px rgba(0, 0, 0, .35); }
html[data-theme="dark"] .toast { background: #1a2a44; border: 1px solid #2c4268; }
html[data-theme="dark"] .modal-overlay, html[data-theme="dark"] .sheet-backdrop { background: rgba(2, 8, 20, .7); }
html[data-theme="dark"] .modal-card { border: 1px solid var(--border); }
html[data-theme="dark"] .modal-close:hover, html[data-theme="dark"] .chev-btn:hover { background: #1a2a44; }
html[data-theme="dark"] .trash-btn:hover { background: var(--red-bg); }
html[data-theme="dark"] .sidebar { border-right-color: rgba(255, 255, 255, .06); }

/* illustrations drawn by JS (inline SVG presentation attributes) */
html[data-theme="dark"] .welcome-art svg [fill="#FFFFFF"] { fill: #16263f; }
html[data-theme="dark"] .welcome-art svg [stroke="#C9D6EA"] { stroke: #35507a; }
html[data-theme="dark"] .welcome-art svg [fill="#E8EFFC"] { fill: #13243f; }
html[data-theme="dark"] .welcome-art svg [fill="#DCE6F5"] { fill: #1a2f52; }
html[data-theme="dark"] .welcome-art svg [fill="#0F172A"] { fill: #e6edf7; }
html[data-theme="dark"] .ring-wrap svg [stroke="#E2E8F0"] { stroke: #223350; }

/* smooth switch (skipped for reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  body, .card, .topbar, .stepper, .policy, .policy-top, .modal-card {
    transition: background-color .25s ease, border-color .25s ease, color .25s ease;
  }
}


/* ---------- upgrade modal: plan picker ---------- */
.modal-card { max-height: calc(100vh - 32px); overflow-y: auto; }
.plan-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 10px; margin: 14px 0 16px; }
.plan-opt {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 18px 14px 12px; text-align: left; cursor: pointer;
  background: var(--card); color: var(--text);
  border: 1.5px solid #c9d7ec; border-radius: 12px;
  font-family: var(--font); transition: border-color .15s, box-shadow .15s, background .15s;
}
.plan-opt:hover { border-color: var(--primary); }
.plan-opt.selected { border-color: var(--primary); background: #f3f8ff; box-shadow: 0 0 0 3px rgba(11, 74, 166, .14); }
.plan-opt.selected::after {
  content: ""; position: absolute; top: 12px; right: 12px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.plan-name { font-size: 13px; font-weight: 600; color: var(--muted); }
.plan-amt { font-size: 22px; font-weight: 800; letter-spacing: -.03em; color: var(--navy-900); line-height: 1.15; }
.plan-sub { font-size: 12px; font-weight: 500; color: var(--muted); }
.plan-badge {
  position: absolute; top: -9px; left: 12px; z-index: 2; padding: 2px 9px; border-radius: 999px;
  background: var(--primary); color: #fff; border: 1px solid var(--primary);
  font-size: 11px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
}
.plan-opt.best .plan-badge { background: var(--primary); color: #fff; border-color: var(--primary); }
html[data-theme="dark"] .plan-opt { background: var(--card); border-color: #2c4268; }
html[data-theme="dark"] .plan-opt.selected { background: #142a4d; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(106, 163, 255, .2); }
html[data-theme="dark"] .plan-amt { color: #f1f5fb; }
html[data-theme="dark"] .plan-badge, html[data-theme="dark"] .plan-opt.best .plan-badge { background: var(--primary-fill); border-color: var(--primary-fill); }
html[data-theme="dark"] .plan-opt.selected::after { background-color: var(--primary-fill); }
@media (max-width: 360px) { .plan-picker { grid-template-columns: 1fr; } }
.policy-updated-note { font-size: 13px !important; color: var(--muted) !important; margin: -6px 0 16px; }


/* ==========================================================================
   TYPOGRAPHY
   - Inter with optical sizing (display cut at large sizes) + Noto Sans
     Devanagari so Hindi mode has a real matching font, not a system fallback.
   - Aligned (tabular) digits wherever numbers are compared or scanned.
   - Negative letter-spacing and tight line-height are OFF in Hindi: they
     collide Devanagari matras.
   ========================================================================== */
html { font-optical-sizing: auto; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
body { font-kerning: normal; font-feature-settings: "kern", "calt"; text-rendering: optimizeLegibility; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
td, th, .stat-num, .sum-num, .ring-num, .plan-amt, .tier-amt, .lp-tier-amt, .lp-price-num, .pro-price, .cal-grid, .days-pill, .file-size, .split-row strong, .lp-trust strong, .lp-mock-stats strong {
  font-variant-numeric: tabular-nums;
}
.stat-num, .sum-num, .plan-amt, .lp-price-num, .pro-price, .lp-trust strong { font-feature-settings: "tnum", "ss01"; }

:lang(hi) body, html:lang(hi) body { line-height: 1.65; }
html:lang(hi) *, html:lang(hi) *::before, html:lang(hi) *::after { letter-spacing: 0 !important; }
html:lang(hi) :is(h1, h2, h3, h4, .page-title, .stat-num, .welcome-text h2) { line-height: 1.35; }
html:lang(hi) :is(.btn, .tab-btn, .nav-item, .status-pill, .count-chip, .plan-name, .plan-sub, .plan-badge) { line-height: 1.5; }

/* ---------- phone polish (overrides the redesign layer where it undid small-screen padding) ---------- */
@media (max-width: 600px) {
  .summary-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .summary-grid > :last-child { grid-column: 1 / -1; }
  .summary-card { padding: 12px; gap: 10px; min-width: 0; }
  .sum-icon { width: 36px; height: 36px; flex: none; }
  .sum-icon svg { width: 18px; height: 18px; }
  .sum-num { font-size: 16px; letter-spacing: -.02em; white-space: nowrap; }
  .sum-label, .summary-card small { font-size: 12px; }
  .stat-grid { gap: 10px; }
  .stat-card { padding: 14px; }
  .welcome-card { padding: 22px 18px; }
  .welcome-text h2 { font-size: 22px; }
  .page-title { font-size: 17px; }
}

/* ---------- app palette aligned with the public pages ---------- */
html:has(.app) {
  color-scheme: light;
  --navy-900: #0f1f1a;
  --navy-800: #0c2a21;
  --navy-700: #144536;
  --primary: #0d6b57;
  --primary-dark: #0a5646;
  --primary-soft: #e3f0ea;
  --primary-fill: #0d6b57;
  --bg: #f3f5f1;
  --card: #ffffff;
  --border: #d9e0da;
  --border-soft: #e9eee9;
  --text: #0f1f1a;
  --muted: #62726a;
  --muted-2: #87958d;
  --shadow: 0 1px 2px rgba(15, 31, 26, .05), 0 8px 24px rgba(15, 60, 46, .06);
  --shadow-md: 0 8px 24px -6px rgba(15, 60, 46, .14), 0 2px 6px rgba(15, 31, 26, .05);
  --grad: linear-gradient(135deg, #0d6b57, #12805c);
  --ring: 0 0 0 4px rgba(13, 107, 87, .15);
  --font: "Hanken Grotesk", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display-font: "Bricolage Grotesque", "Hanken Grotesk", "Noto Sans Devanagari", system-ui, sans-serif;
}

html:has(.app) body:not(.lp-body) {
  background-color: var(--bg);
  background-image:
    radial-gradient(800px 500px at 100% 0, rgba(13, 107, 87, .045), transparent 70%),
    repeating-linear-gradient(to bottom, transparent 0, transparent 35px, rgba(15, 80, 62, .025) 35px, rgba(15, 80, 62, .025) 36px);
}
html:has(.app) body:not(.lp-body) :is(h1, h2, h3, h4, .page-title) { font-family: var(--display-font); }
html:has(.app) body:not(.lp-body) ::selection { background: #bfdccf; color: #0f1f1a; }
html:has(.app) body:not(.lp-body) :focus-visible { outline-color: rgba(13, 107, 87, .7); }
html:has(.app) .sidebar { background: linear-gradient(180deg, #0c2a21, #10372c); }
html:has(.app) .brand-icon { background: #ffffff; color: #0d6b57; box-shadow: none; }
html:has(.app) .nav-item.active { background: rgba(255, 255, 255, .13); }
html:has(.app) .nav-item.active::before { background: #e29b13; }
html:has(.app) .pro-card { background: linear-gradient(145deg, #0d6b57, #0c5142); border-color: rgba(255, 255, 255, .16); }
html:has(.app) .topbar { background: rgba(243, 245, 241, .9); }
html:has(.app) .btn-primary { background: #0d6b57; box-shadow: 0 4px 12px -2px rgba(13, 107, 87, .24); }
html:has(.app) .btn-primary:hover { background: #0a5646; box-shadow: 0 8px 18px -4px rgba(13, 107, 87, .3); }
html:has(.app) .btn-outline { color: #0d6b57; border-color: #c6d8ce; }
html:has(.app) .btn-outline:hover { background: #e3f0ea; border-color: #0d6b57; }
html:has(.app) .btn-light { color: #0d6b57; }
html:has(.app) .welcome-card { background: linear-gradient(120deg, #ffffff 55%, #e8f1eb 100%); }
html:has(.app) .welcome-card::before { background: linear-gradient(180deg, #0d6b57, #e29b13); }
html:has(.app) .stat-card:hover,
html:has(.app) .issue-row:hover { border-color: #bfdccf; }
html:has(.app) .mkt-card.selected { background: #f1f7f3; box-shadow: 0 0 0 3px rgba(13, 107, 87, .12); }
html:has(.app) .dropzone { background: linear-gradient(180deg, #ffffff, #f3f7f4); }
html:has(.app) :is(.guide-banner, .next-card) { background: #f0f6f2; border-color: #d5e5da; }
html:has(.app) .cal-grid .day.due { box-shadow: 0 4px 10px -2px rgba(13, 107, 87, .24); }
html:has(.app) .plan-opt.selected { background: #f1f7f3; box-shadow: 0 0 0 3px rgba(13, 107, 87, .12); }
html:has(.app) .plan-badge, html:has(.app) .plan-opt.best .plan-badge { background: #0d6b57; border-color: #0d6b57; }
html:has(.app) .theme-toggle:hover,
html:has(.app) .lang-pill:hover,
html:has(.app) .icon-btn:hover { border-color: #bfdccf; background: #f5f8f5; }

html[data-theme="dark"]:has(.app) {
  color-scheme: dark;
  --navy-900: #ffffff;
  --navy-800: #111111;
  --navy-700: #1b1b1b;
  --primary: #ffffff;
  --primary-dark: #d6d6d6;
  --primary-soft: rgba(255, 255, 255, .07);
  --primary-fill: #0d6b57;
  --bg: #000000;
  --card: #080808;
  --border: rgba(255, 255, 255, .12);
  --border-soft: rgba(255, 255, 255, .08);
  --text: #a8a8a8;
  --muted: #8a8a8a;
  --muted-2: #707070;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 12px 32px rgba(0, 0, 0, .45);
  --shadow-md: 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 48px rgba(0, 0, 0, .65);
  --ring: 0 0 0 4px rgba(255, 255, 255, .15);
}
html[data-theme="dark"]:has(.app) body:not(.lp-body) {
  background-color: #000000;
  background-image: radial-gradient(ellipse 75% 44% at 50% -8%, rgba(255, 255, 255, .12), transparent 72%);
  background-attachment: fixed;
}
html[data-theme="dark"]:has(.app) .help-portal-icon { background: #0d6b57; color: #fff; }
html[data-theme="dark"]:has(.app) body:not(.lp-body) ::selection { background: #ffffff; color: #000000; }
html[data-theme="dark"]:has(.app) body:not(.lp-body) :focus-visible { outline-color: #ffffff; }
html[data-theme="dark"]:has(.app) :is(h1, h2, h3, h4, .page-title, .stat-num, .sum-num, .field > label, .field-label, .dropzone strong, .contact-card strong, .policy h1, .policy h2, .policy-table th, .policy-table td:first-child, .policy-brand, .welcome-text h2) { color: #ffffff; }
html[data-theme="dark"]:has(.app) :is(.sidebar, .topbar, .policy-top) { background: #000000; }
html[data-theme="dark"]:has(.app) .sidebar { border-right-color: rgba(255, 255, 255, .1); }
html[data-theme="dark"]:has(.app) .brand-icon { background: #ffffff; color: #000000; box-shadow: none; }
html[data-theme="dark"]:has(.app) .nav-item.active { background: #151515; }
html[data-theme="dark"]:has(.app) .nav-item.active::before { background: #0d6b57; }
html[data-theme="dark"]:has(.app) .pro-card { background: #080808; border-color: rgba(255, 255, 255, .12); box-shadow: 0 0 0 1px rgba(255, 255, 255, .04); }
html[data-theme="dark"]:has(.app) .pro-card .btn-light { background: #ffffff; color: #0d6b57; }
html[data-theme="dark"]:has(.app) .topbar { background: rgba(0, 0, 0, .84); border-bottom-color: var(--border); }
html[data-theme="dark"]:has(.app) .welcome-card { background: radial-gradient(ellipse at 100% 0, rgba(255, 255, 255, .07), transparent 60%), #050505; }
html[data-theme="dark"]:has(.app) .welcome-card::before { background: linear-gradient(180deg, #ffffff, #555555); }
html[data-theme="dark"]:has(.app) .reminder-banner.overdue { background: #080808; border-color: var(--border); }
html[data-theme="dark"]:has(.app) .reminder-banner.overdue .reminder-icon { background: #151515; color: #ffffff; }
html[data-theme="dark"]:has(.app) :is(.theme-toggle:hover, .lang-pill:hover, .icon-btn:hover, .btn-outline:hover, .btn-mini:hover, .link-arrow:hover, .policy-back:hover) { background: #151515; border-color: #ffffff; }
html[data-theme="dark"]:has(.app) .btn-primary { background: #0d6b57; color: #ffffff; box-shadow: 0 0 0 1px rgba(13, 107, 87, .3), 0 0 30px rgba(13, 107, 87, .15); }
html[data-theme="dark"]:has(.app) .btn-primary:hover { background: #0a5646; color: #ffffff; box-shadow: 0 8px 18px -4px rgba(0, 0, 0, .55); }
html[data-theme="dark"]:has(.app) .btn-outline { color: #ffffff; border-color: rgba(255, 255, 255, .22); }
html[data-theme="dark"]:has(.app) .btn-outline:hover { color: #ffffff; }
html[data-theme="dark"]:has(.app) .btn-light { background: #ffffff; color: #0d6b57; }
html[data-theme="dark"]:has(.app) :is(.welcome-card, .card, .stat-card, .summary-card, .stepper, .policy, .modal-card, .more-sheet, .bottom-nav) { border-color: var(--border); }
html[data-theme="dark"]:has(.app) :is(.guide-banner, .next-card) { background: #080808; border-color: var(--border); }
html[data-theme="dark"]:has(.app) :is(.fix-panel, .contact-card) { background: #050505; }
html[data-theme="dark"]:has(.app) .mkt-card.selected { background: #111111; border-color: #ffffff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .1); }
html[data-theme="dark"]:has(.app) .dropzone { background: #050505; border-color: rgba(255, 255, 255, .25); }
html[data-theme="dark"]:has(.app) :is(.dropzone:hover, .dropzone:focus-visible, .dropzone.drag) { background: #0d0d0d; border-color: #ffffff; }
html:has(.app) .dropzone { --dropzone-glow: rgba(13, 107, 87, .22); }
html:has(.app) .dropzone.drag { background: #eaf5ee; border-color: #0d6b57; }
html[data-theme="dark"]:has(.app) .dropzone { --dropzone-glow: rgba(13, 107, 87, .38); }
html[data-theme="dark"]:has(.app) .dropzone.drag { background: #081a14; border-color: #0d6b57; }
html:has(.app) .dropzone.drag strong { color: #0d6b57; }
html[data-theme="dark"]:has(.app) .dropzone.drag strong { color: #bfe9d7; }
html[data-theme="dark"]:has(.app) .dropzone.drag .dz-icon { background: rgba(13, 107, 87, .16); color: #bfe9d7; }
html:has(.app) .dropzone.drop-success { border-color: #12805c; }
html[data-theme="dark"]:has(.app) .dropzone.drop-success { border-color: #12805c; background: #081a14; }
html[data-theme="dark"]:has(.app) :is(.field select, .field input[type="text"], .fix-row input, .pro-code-row input) { background: #050505; color: #ffffff; border-color: rgba(255, 255, 255, .2); }
html[data-theme="dark"]:has(.app) :is(.field select:hover, .field input[type="text"]:hover) { border-color: rgba(255, 255, 255, .4); }
html[data-theme="dark"]:has(.app) :is(.field select:focus, .field input[type="text"]:focus, .fix-row input:focus, .pro-code-row input:focus) { border-color: #ffffff; }
html[data-theme="dark"]:has(.app) th { background: #080808; }
html[data-theme="dark"]:has(.app) tbody tr:hover { background: #111111; }
html[data-theme="dark"]:has(.app) .tab-body tfoot td { background: #080808; }
html[data-theme="dark"]:has(.app) :is(.tab-btn:hover, .modal-close:hover, .chev-btn:hover) { background: #151515; }
html[data-theme="dark"]:has(.app) .modal-overlay,
html[data-theme="dark"]:has(.app) .sheet-backdrop { background: rgba(0, 0, 0, .78); }
html[data-theme="dark"]:has(.app) .sheet-close { background: #151515; }
html[data-theme="dark"]:has(.app) .sheet-handle { background: #4a4a4a; }
html[data-theme="dark"]:has(.app) .bottom-nav { border-top-color: var(--border); }
html[data-theme="dark"]:has(.app) .plan-opt { background: #080808; border-color: var(--border); }
html[data-theme="dark"]:has(.app) .plan-opt.selected { background: #111111; border-color: #ffffff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .1); }
html[data-theme="dark"]:has(.app) .plan-amt { color: #ffffff; }
html[data-theme="dark"]:has(.app) .plan-badge, html[data-theme="dark"]:has(.app) .plan-opt.best .plan-badge { background: #0d6b57; border-color: #0d6b57; }
html[data-theme="dark"]:has(.app) .plan-opt.selected::after { background-color: #0d6b57; }
html[data-theme="dark"]:has(.app) .welcome-art svg [fill="#FFFFFF"] { fill: #111111; }
html[data-theme="dark"]:has(.app) .welcome-art svg [stroke="#D9E0DA"] { stroke: #555555; }
html[data-theme="dark"]:has(.app) .welcome-art svg [fill="#E3F0EA"],
html[data-theme="dark"]:has(.app) .welcome-art svg [fill="#E6ECE7"] { fill: #1b1b1b; }
html[data-theme="dark"]:has(.app) .welcome-art svg [fill="#0F1F1A"] { fill: #e6e6e6; }
html[data-theme="dark"]:has(.app) .ring-wrap svg [stroke="#E2E8F0"] { stroke: #333333; }
@media (prefers-reduced-motion: reduce) {
  .dropzone.drag,
  .dropzone.drag .dz-icon,
  .dropzone.drag strong,
  .dropzone.drop-success,
  .dropzone.drop-success::after,
  .dropzone.drop-success .dz-icon { animation: none; transform: none; }
}
