/* ═══════════════════════════════════════════════════════════
   Lexendo Design System — v1.0 — April 2026
   Employment Tax Compliance Platform for Accounting Professionals
   ═══════════════════════════════════════════════════════════ */

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

/* ─── Variables ─────────────────────────────────────────── */
:root {
  --deep:         #0D1F35;
  --deep-2:       #14293F;
  --deep-3:       #1A3350;
  --green:        #1A6B45;
  --green-2:      #22895A;
  --green-3:      #0F5235;
  --green-light:  #E6F4ED;
  --green-mid:    rgba(26,107,69,0.15);
  --white:        #FFFFFF;
  --surface:      #F2F5F8;
  --surface-2:    #E8EDF2;
  --surface-3:    #DDE4EC;
  --text:         #1E293B;
  --text-2:       #334155;
  --muted:        #64748B;
  --muted-2:      #94A3B8;
  --border:       #CBD5E1;
  --border-2:     #E2E8F0;
  --shadow-xs:    0 1px 2px rgba(13,31,53,0.06);
  --shadow-sm:    0 1px 4px rgba(13,31,53,0.08), 0 1px 2px rgba(13,31,53,0.04);
  --shadow-md:    0 4px 16px rgba(13,31,53,0.10), 0 1px 4px rgba(13,31,53,0.06);
  --shadow-lg:    0 8px 32px rgba(13,31,53,0.12), 0 2px 8px rgba(13,31,53,0.08);

  /* RAG */
  --r:            #DC2626;
  --r-bg:         #FEF2F2;
  --r-bd:         #FECACA;
  --r-t:          #B91C1C;
  --a:            #D97706;
  --a-bg:         #FFFBEB;
  --a-bd:         #FDE68A;
  --a-t:          #92400E;
  --g:            #16A34A;
  --g-bg:         #F0FDF4;
  --g-bd:         #86EFAC;
  --g-t:          #14532D;

  /* Sidebar */
  --sb-w:         240px;
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  background: var(--surface);
  line-height: 1.5;
  height: 100%;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ─── Demo banner ────────────────────────────────────────── */
.demo-banner {
  background: var(--deep);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 7px 24px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.02em;
  position: sticky;
  top: 0;
  z-index: 200;
}
.demo-banner span { color: rgba(255,255,255,0.75); }

/* ─── Logo ───────────────────────────────────────────────── */
.lexendo-logo {
  display: flex;
  align-items: baseline;
  gap: 0;
  line-height: 1;
  user-select: none;
}
.logo-lex {
  font-size: 21px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.03em;
}
.logo-pipe {
  width: 2px;
  height: 16px;
  background: var(--green);
  border-radius: 1px;
  margin: 0 3px;
  align-self: center;
  flex-shrink: 0;
}
.logo-endo {
  font-size: 21px;
  font-weight: 300;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.04em;
}
.logo-tag {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-2);
  margin-top: 3px;
}

/* ─── App Layout ─────────────────────────────────────────── */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sb-w);
  background: var(--deep);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.sidebar-header {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.25);
  padding: 16px 20px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
}
.nav-item:hover {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.05);
  text-decoration: none;
}
.nav-item.active {
  color: #FFFFFF;
  border-left-color: var(--green);
  background: var(--green-mid);
}
.nav-item svg { flex-shrink: 0; opacity: 0.7; }
.nav-item.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(220,38,38,0.2);
  color: #FCA5A5;
}
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.sidebar-user-firm {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 2px;
}
.sidebar-user-email {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}
.sidebar-sign-out {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: color 0.15s;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
}
.sidebar-sign-out:hover { color: rgba(255,255,255,0.65); }

/* ─── Main area ──────────────────────────────────────────── */
.main {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.page-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border-2);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.page-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.page-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 1px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-content {
  padding: 28px 32px;
  flex: 1;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn svg { flex-shrink: 0; }
.btn-primary {
  background: var(--green);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--green-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-secondary {
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--green); color: var(--green); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
}
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-danger {
  background: var(--r-bg);
  color: var(--r-t);
  border: 1px solid var(--r-bd);
}
.btn-danger:hover { background: #FEE2E2; }
.btn-lg {
  padding: 13px 26px;
  font-size: 15px;
  border-radius: 8px;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}
.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 7px;
  justify-content: center;
}

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-sm);
}
.card-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.card-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.card-body { padding: 20px 24px; }

/* ─── Stats row ──────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--border-2);
  border-top: 3px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
}
.stat-card.red   { border-top-color: var(--r); }
.stat-card.amber { border-top-color: var(--a); }
.stat-card.green { border-top-color: var(--g); }
.stat-card.neutral { border-top-color: var(--green); }
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 8px;
}
.stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat-number.red   { color: var(--r-t); }
.stat-number.amber { color: var(--a-t); }
.stat-number.green { color: var(--g-t); }
.stat-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* ─── RAG badges ─────────────────────────────────────────── */
.rag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.rag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rag.red   { background: var(--r-bg); color: var(--r-t); }
.rag.red   .rag-dot { background: var(--r); }
.rag.amber { background: var(--a-bg); color: var(--a-t); }
.rag.amber .rag-dot { background: var(--a); }
.rag.green { background: var(--g-bg); color: var(--g-t); }
.rag.green .rag-dot { background: var(--g); }

/* ─── Table ──────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-sm);
  background: var(--white);
}
.table-toolbar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.table-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 12px;
  min-width: 240px;
}
.table-search input {
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text);
  width: 100%;
}
.table-search input::placeholder { color: var(--muted); }
.table-search svg { color: var(--muted); flex-shrink: 0; }
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table thead th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border-2);
  white-space: nowrap;
}
.data-table thead th:first-child { padding-left: 20px; }
.data-table thead th:last-child { padding-right: 20px; text-align: right; }
.data-table tbody tr {
  border-bottom: 1px solid var(--border-2);
  cursor: pointer;
  transition: background 0.1s;
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface); }
.data-table tbody td {
  padding: 13px 16px;
  font-size: 13.5px;
  vertical-align: middle;
}
.data-table tbody td:first-child { padding-left: 20px; }
.data-table tbody td:last-child { padding-right: 20px; }
.td-client-name {
  font-weight: 600;
  color: var(--text);
}
.td-client-sector {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.score-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.score-bar-bg {
  flex: 1;
  height: 5px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}
.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}
.score-bar-fill.red   { background: var(--r); }
.score-bar-fill.amber { background: var(--a); }
.score-bar-fill.green { background: var(--g); }
.score-pct {
  font-size: 13px;
  font-weight: 700;
  min-width: 36px;
}
.score-pct.red   { color: var(--r-t); }
.score-pct.amber { color: var(--a-t); }
.score-pct.green { color: var(--g-t); }
.table-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.table-action-btn:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.table-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border-radius: 0 0 10px 10px;
}

/* ─── HMRC Widget ────────────────────────────────────────── */
.hmrc-widget {
  background: var(--deep);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}
.hmrc-head {
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.hmrc-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hmrc-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-2);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hmrc-title {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
}
.hmrc-subtitle {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 1px;
}
.hmrc-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-2);
  background: var(--green-mid);
  border: 1px solid rgba(26,107,69,0.3);
  padding: 3px 8px;
  border-radius: 4px;
}
.hmrc-body {
  padding: 16px 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 800px) { .hmrc-body { grid-template-columns: 1fr; } }
.hmrc-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(185,28,28,0.12);
  border: 1px solid rgba(220,38,38,0.25);
  border-radius: 8px;
  padding: 12px 14px;
}
.hmrc-alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.hmrc-alert-text {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
}
.hmrc-alert-text strong { color: #FFFFFF; }
.hmrc-table { width: 100%; }
.hmrc-table th {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.3);
  padding: 0 0 8px 0;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.hmrc-table th:not(:first-child) { text-align: right; }
.hmrc-table td {
  font-size: 12.5px;
  color: rgba(255,255,255,0.65);
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.hmrc-table td:not(:first-child) { text-align: right; }
.hmrc-table tr:last-child td { border-bottom: none; }
.hmrc-trend-up { color: #FCA5A5; font-weight: 600; font-size: 11px; }
.hmrc-footer {
  padding: 10px 22px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hmrc-footer-text {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
}
.hmrc-footer-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--green-2);
  cursor: pointer;
  background: none;
  border: none;
}
.hmrc-footer-link:hover { text-decoration: underline; }

/* ─── Report components ──────────────────────────────────── */
.report-topbar {
  background: var(--deep);
  padding: 20px 32px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.report-topbar-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.report-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-2);
  margin-bottom: 5px;
}
.report-client {
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.report-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.report-meta-item {
  font-size: 12.5px;
  color: rgba(255,255,255,0.45);
}
.report-meta-item span { color: rgba(255,255,255,0.8); }
.report-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Score section */
.score-block {
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-sm);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
}
.score-svg { display: block; flex-shrink: 0; }
.score-info { flex: 1; min-width: 220px; }
.score-rag-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.score-rag-badge.red   { background: var(--r-bg); color: var(--r-t); border: 1px solid var(--r-bd); }
.score-rag-badge.amber { background: var(--a-bg); color: var(--a-t); border: 1px solid var(--a-bd); }
.score-rag-badge.green { background: var(--g-bg); color: var(--g-t); border: 1px solid var(--g-bd); }
.score-heading {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.score-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 440px;
}

/* Section breakdown */
.breakdown-card {
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.breakdown-row {
  display: grid;
  grid-template-columns: 200px 1fr 120px;
  align-items: center;
  padding: 14px 24px;
  gap: 16px;
  border-bottom: 1px solid var(--border-2);
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-name { font-size: 13.5px; font-weight: 500; color: var(--text); }
.breakdown-bar-bg {
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}
.breakdown-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.breakdown-bar-fill.red   { background: var(--r); }
.breakdown-bar-fill.amber { background: var(--a); }
.breakdown-bar-fill.green { background: var(--g); }
.breakdown-bar-fill.neutral { background: var(--a); }

/* Flag cards */
.flag-card {
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 12px;
}
.flag-card:last-child { margin-bottom: 0; }
.flag-head {
  display: grid;
  grid-template-columns: 4px 40px 1fr;
  gap: 14px;
  padding: 16px 20px 16px 0;
  align-items: flex-start;
}
.flag-stripe { border-radius: 2px; align-self: stretch; }
.flag-stripe.red   { background: var(--r); }
.flag-stripe.amber { background: var(--a); }
.flag-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.flag-icon.red   { background: var(--r-bg); }
.flag-icon.amber { background: var(--a-bg); }
.flag-body {}
.flag-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.flag-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.flag-action {
  background: var(--surface);
  border-top: 1px solid var(--border-2);
  padding: 12px 20px 12px 58px;
}
.flag-action-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--green);
  margin-bottom: 4px;
}
.flag-action-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
}

/* ─── Feature panels ─────────────────────────────────────── */
.panel {
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}
.panel-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.panel-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.panel-body { padding: 20px 22px; }

/* Toggle switch */
.toggle-group {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
}
.toggle-option {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
}
.toggle-option.active {
  background: var(--white);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
  border-radius: 7px;
  margin: 2px;
}

/* Form inputs */
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.field-input {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26,107,69,0.1);
}
.field-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748B' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}
.field-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field-group { margin-bottom: 16px; }
.field-group:last-child { margin-bottom: 0; }

/* ─── HMRC per-client section ────────────────────────────── */
.hmrc-per-client {
  background: var(--deep);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}
.hpc-head {
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 10px;
}
.hpc-head h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
  flex: 1;
}
.hpc-disclaimer {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
}
.hpc-body { padding: 16px 22px; }
.hpc-flag {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.hpc-flag:last-child { border-bottom: none; }
.hpc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.hpc-dot.red   { background: var(--r); }
.hpc-dot.amber { background: var(--a); }
.hpc-text {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}

/* ─── Email scheduler ────────────────────────────────────── */
.scheduler-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.scheduler-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
}
.scheduler-status.inactive {
  background: var(--surface-2);
  color: var(--muted);
}
.scheduler-status.active {
  background: var(--g-bg);
  color: var(--g-t);
  border: 1px solid var(--g-bd);
}

/* ─── Upload zone ────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-zone:hover {
  border-color: var(--green);
  background: var(--green-light);
}
.upload-zone.dragging {
  border-color: var(--green);
  background: var(--green-light);
}
.upload-icon { font-size: 28px; margin-bottom: 10px; }
.upload-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.upload-desc { font-size: 13px; color: var(--muted); }
.upload-link { color: var(--green); font-weight: 500; }

/* ─── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--deep);
  color: #FFFFFF;
  padding: 14px 20px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-icon { font-size: 16px; }
.toast.success { border-left: 4px solid var(--green); }
.toast.error   { border-left: 4px solid var(--r); }

/* ─── Section headers ────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ─── Divider ────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border-2);
  margin: 20px 0;
}

/* ─── Report content spacing ─────────────────────────────── */
.report-section { margin-bottom: 20px; }

/* ─── Print ──────────────────────────────────────────────── */
@media print {
  .sidebar, .demo-banner, .topbar-actions, .report-actions-row,
  .panel.no-print, .btn-print, .btn-back { display: none !important; }
  .app { height: auto; }
  .main { overflow: visible; }
  body { background: #fff; }
  .report-topbar { background: var(--deep) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hmrc-widget, .hmrc-per-client { background: var(--deep) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

/* ─── Animations ─────────────────────────────────────────── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeSlideIn 0.3s ease; }

/* ─── Login page specific ────────────────────────────────── */
body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--surface);
}
.login-split {
  display: flex;
  width: 100%;
  min-height: 100vh;
}
.login-left {
  flex: 1;
  background: var(--deep);
  padding: 60px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
}
.login-right {
  width: 480px;
  flex-shrink: 0;
  background: var(--white);
  padding: 60px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 900px) {
  .login-left { display: none; }
  .login-right { width: 100%; }
}
.login-left-content { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 400px; }
.login-headline {
  font-size: 32px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-top: 48px;
  margin-bottom: 18px;
}
.login-headline em {
  font-style: normal;
  color: var(--green-2);
}
.login-features { list-style: none; margin-top: 32px; }
.login-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 14px;
  line-height: 1.5;
}
.login-features li::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-mid);
  border: 1px solid var(--green);
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' stroke='%2322895A' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 2px;
}
.login-form-header {
  margin-bottom: 32px;
}
.login-form-header h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}
.login-form-header p {
  font-size: 14px;
  color: var(--muted);
}
.login-submit {
  width: 100%;
  padding: 13px;
  background: var(--green);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 8px;
  letter-spacing: 0.01em;
}
.login-submit:hover { background: var(--green-2); transform: translateY(-1px); }
.login-submit:active { transform: translateY(0); }
.login-footer-text {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 24px;
}
.login-footer-text a { color: var(--green); }
.login-left-footer {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
}
.login-left-footer a { color: rgba(255,255,255,0.4); }
.powered-by {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 28px;
}
.powered-by a { color: var(--text-2); font-weight: 500; }
.password-wrap {
  position: relative;
}
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 2px;
}
.password-toggle:hover { color: var(--text); }

/* ═══════════════════════════════════════════════════════════
   LEXENDO v2 — ADDITIONS: Logo · Animations · Lock · New Components
   ═══════════════════════════════════════════════════════════ */

/* ─── Logo v3 — Split Wordmark + Growth Line ─────────────── */
.lexendo-wordmark {
  display: flex;
  flex-direction: column;
  gap: 3px;
  user-select: none;
  line-height: 1;
}
.wordmark-lex {
  font-size: 20px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.025em;
}
.wordmark-endo {
  font-size: 20px;
  font-weight: 400;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.01em;
}
.wordmark-line {
  display: block;
}
.wordmark-tag {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: rgba(255,255,255,0.35);
  margin-top: 1px;
}
/* Login panel — larger version on dark background */
.login-wordmark .wordmark-lex  { font-size: 30px; }
.login-wordmark .wordmark-endo { font-size: 30px; }
.login-wordmark .wordmark-tag  { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 3px; }

/* ─── Animations ─────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Page-entry animation utilities */
.anim-fade-up   { animation: fadeInUp 0.45s cubic-bezier(0.4,0,0.2,1) both; }
.anim-fade-in   { animation: fadeIn 0.35s ease both; }
.anim-scale-in  { animation: scaleIn 0.35s cubic-bezier(0.4,0,0.2,1) both; }
.anim-slide-left{ animation: slideInLeft 0.4s cubic-bezier(0.4,0,0.2,1) both; }

/* Stagger delays */
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.10s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.20s; }
.delay-5 { animation-delay: 0.25s; }
.delay-6 { animation-delay: 0.30s; }
.delay-7 { animation-delay: 0.35s; }
.delay-8 { animation-delay: 0.40s; }

/* Sidebar nav stagger */
.sidebar-header { animation: slideInLeft 0.4s cubic-bezier(0.4,0,0.2,1) both; }
.sidebar-nav .nav-section-label:nth-child(1)  { animation: fadeIn 0.3s ease 0.1s both; }
.sidebar-nav .nav-item:nth-child(1)  { animation: slideInLeft 0.35s ease 0.12s both; }
.sidebar-nav .nav-item:nth-child(2)  { animation: slideInLeft 0.35s ease 0.15s both; }
.sidebar-nav .nav-item:nth-child(3)  { animation: slideInLeft 0.35s ease 0.18s both; }
.sidebar-nav .nav-item:nth-child(4)  { animation: slideInLeft 0.35s ease 0.21s both; }
.sidebar-nav .nav-item:nth-child(5)  { animation: slideInLeft 0.35s ease 0.24s both; }
.sidebar-nav .nav-item:nth-child(6)  { animation: slideInLeft 0.35s ease 0.27s both; }
.sidebar-nav .nav-item:nth-child(7)  { animation: slideInLeft 0.35s ease 0.30s both; }
.sidebar-nav .nav-item:nth-child(8)  { animation: slideInLeft 0.35s ease 0.33s both; }
.sidebar-nav .nav-item:nth-child(9)  { animation: slideInLeft 0.35s ease 0.36s both; }

/* Stats cards stagger */
.stats-row .stat-card:nth-child(1) { animation: fadeInUp 0.4s ease 0.08s both; }
.stats-row .stat-card:nth-child(2) { animation: fadeInUp 0.4s ease 0.14s both; }
.stats-row .stat-card:nth-child(3) { animation: fadeInUp 0.4s ease 0.20s both; }
.stats-row .stat-card:nth-child(4) { animation: fadeInUp 0.4s ease 0.26s both; }

/* Top bar, content */
.page-topbar { animation: fadeIn 0.3s ease both; }
.hmrc-widget { animation: fadeInUp 0.5s ease 0.18s both; }
.table-wrap  { animation: fadeInUp 0.5s ease 0.22s both; }

/* ─── Nav lock badge (PRO / ENT) ─────────────────────────── */
.nav-lock-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  background: rgba(217,119,6,0.18);
  color: #FBBF24;
  border: 1px solid rgba(217,119,6,0.25);
  flex-shrink: 0;
}

/* ─── Feature gate / lock overlay ────────────────────────── */
.feature-gate {
  position: relative;
  min-height: 320px;
}
.gate-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: 12px;
  background: rgba(13,31,53,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.3s ease both;
  text-align: center;
  padding: 40px;
}
.gate-overlay.hidden { display: none; }
.gate-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(217,119,6,0.2);
  border: 1px solid rgba(251,191,36,0.35);
  color: #FBBF24;
}
.gate-icon {
  font-size: 36px;
  line-height: 1;
}
.gate-title {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}
.gate-desc {
  font-size: 13.5px;
  color: rgba(255,255,255,0.55);
  max-width: 360px;
  line-height: 1.6;
}
.gate-unlock-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--green);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 16px rgba(26,107,69,0.4);
}
.gate-unlock-btn:hover {
  background: var(--green-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,107,69,0.5);
}
.gate-preview-blur {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
  opacity: 0.6;
}
.feature-gate.unlocked .gate-overlay { display: none; }
.feature-gate.unlocked .gate-preview-blur {
  filter: none;
  pointer-events: all;
  opacity: 1;
  animation: fadeIn 0.5s ease both;
}

/* ─── Tier / status badges ────────────────────────────────── */
.tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.tier-badge.pro {
  background: rgba(217,119,6,0.12);
  color: #B45309;
  border: 1px solid rgba(217,119,6,0.25);
}
.tier-badge.ent {
  background: rgba(99,102,241,0.1);
  color: #4F46E5;
  border: 1px solid rgba(99,102,241,0.2);
}
.tier-badge.core {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.status-pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-pill.sent      { background: var(--g-bg); color: var(--g-t); }
.status-pill.sent::before { background: var(--g); }
.status-pill.draft     { background: var(--surface-2); color: var(--muted); }
.status-pill.draft::before { background: var(--muted-2); }
.status-pill.pending   { background: var(--a-bg); color: var(--a-t); }
.status-pill.pending::before { background: var(--a); }
.status-pill.failed    { background: var(--r-bg); color: var(--r-t); }
.status-pill.failed::before { background: var(--r); }
.status-pill.scheduled { background: #EEF2FF; color: #4338CA; }
.status-pill.scheduled::before { background: #6366F1; }
.status-pill.overdue   { background: var(--r-bg); color: var(--r-t); }
.status-pill.overdue::before { background: var(--r); }
.status-pill.completed { background: var(--g-bg); color: var(--g-t); }
.status-pill.completed::before { background: var(--g); }

/* ─── Timeline / activity list ───────────────────────────── */
.timeline-list { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-2);
  transition: background 0.1s;
  cursor: pointer;
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item:hover { background: var(--surface); }
.timeline-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.timeline-icon.blue { background: #EEF2FF; }
.timeline-icon.green { background: var(--g-bg); }
.timeline-icon.amber { background: var(--a-bg); }
.timeline-icon.red   { background: var(--r-bg); }
.timeline-body {}
.timeline-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.timeline-sub   { font-size: 12px; color: var(--muted); line-height: 1.4; }
.timeline-right { text-align: right; flex-shrink: 0; }
.timeline-date  { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ─── Settings sections ──────────────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 768px) { .settings-grid { grid-template-columns: 1fr; } }
.settings-nav { position: sticky; top: 20px; }
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
}
.settings-nav-item:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.settings-nav-item.active { background: var(--green-light); color: var(--green); font-weight: 600; }
.settings-panel { display: flex; flex-direction: column; gap: 20px; }

/* ─── Logo uploader ──────────────────────────────────────── */
.logo-upload-area {
  width: 80px;
  height: 80px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--surface);
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.logo-upload-area:hover { border-color: var(--green); background: var(--green-light); color: var(--green); }

/* ─── Progress / exposure bar ────────────────────────────── */
.exposure-bar {
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}
.exposure-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--a) 0%, var(--r) 100%);
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Advisory engagement card (Critical Risk redesign) ─── */
.advisory-card {
  background: linear-gradient(135deg, #0D1F35 0%, #14293F 100%);
  border-radius: 12px;
  border: 1px solid rgba(220,38,38,0.3);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(220,38,38,0.15), var(--shadow-md);
  margin-bottom: 20px;
  animation: fadeInUp 0.5s ease both;
}
.advisory-head {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.advisory-head-left { display: flex; align-items: center; gap: 10px; }
.advisory-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--r);
  animation: pulseRed 1.8s infinite;
}
@keyframes pulseRed {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
  50%       { opacity: 0.7; box-shadow: 0 0 0 5px rgba(220,38,38,0); }
}
.advisory-head-title {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
}
.advisory-head-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 1px;
}
.advisory-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 5px;
  background: rgba(220,38,38,0.2);
  border: 1px solid rgba(220,38,38,0.35);
  color: #FCA5A5;
}
.advisory-body {
  padding: 0;
}
.advisory-exposure-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
@media (max-width: 700px) { .advisory-exposure-grid { grid-template-columns: 1fr; } }
.advisory-metric {
  padding: 20px 22px;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.advisory-metric:last-child { border-right: none; }
.advisory-metric-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 6px;
}
.advisory-metric-val {
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.03em;
  line-height: 1;
}
.advisory-metric-val.red   { color: #FCA5A5; }
.advisory-metric-val.amber { color: #FCD34D; }
.advisory-metric-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
}

.advisory-timeline-section {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.advisory-timeline-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 12px;
}
.advisory-timeline-track {
  position: relative;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin: 16px 0;
}
.advisory-timeline-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--g) 0%, var(--a) 60%, var(--r) 100%);
  border-radius: 2px;
}
.advisory-timeline-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--deep);
  background: var(--a);
}
.advisory-milestone-row {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}
.advisory-milestone {
  text-align: center;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  line-height: 1.4;
}
.advisory-milestone strong {
  display: block;
  color: rgba(255,255,255,0.65);
  font-weight: 600;
  font-size: 11px;
}

.advisory-actions {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.advisory-action-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--green);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.advisory-action-primary:hover { background: var(--green-2); transform: translateY(-1px); }
.advisory-action-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.advisory-action-secondary:hover { background: rgba(255,255,255,0.14); color: #FFFFFF; }
.advisory-pending-label {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-left: auto;
  font-style: italic;
}

/* ─── Email queue items ──────────────────────────────────── */
.email-queue-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-2);
  transition: background 0.1s;
}
.email-queue-item:last-child { border-bottom: none; }
.email-queue-item:hover { background: var(--surface); }
.email-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--green-mid);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.email-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.email-meta  { font-size: 12px; color: var(--muted); }
.email-right { text-align: right; }
.email-date  { font-size: 11.5px; color: var(--muted); white-space: nowrap; margin-bottom: 4px; }

/* ─── IR35 screener form ─────────────────────────────────── */
.screener-section {
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 16px;
}
.screener-section-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-2);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 10px;
}
.screener-section-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--green);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.screener-section-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.screener-body { padding: 20px; }
.screener-q {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-2);
}
.screener-q:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.screener-q-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.5;
}
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2);
  transition: all 0.15s;
}
.radio-option:hover { border-color: var(--green); background: var(--green-light); }
.radio-option input[type=radio] { accent-color: var(--green); cursor: pointer; }

/* ─── Correspondence tracker ──────────────────────────────── */
.corr-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-2);
  cursor: pointer;
  transition: background 0.1s;
}
.corr-item:last-child { border-bottom: none; }
.corr-item:hover { background: var(--surface); }
.corr-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.corr-type   { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 3px; }
.corr-title  { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.corr-client { font-size: 12px; color: var(--muted); }
.corr-right  { text-align: right; }
.corr-date   { font-size: 11.5px; color: var(--muted); white-space: nowrap; margin-bottom: 4px; }
.corr-days   { font-size: 11px; color: var(--r-t); font-weight: 600; }
