:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --surface-strong: #e2e8f0;
  --ink: #0f172a;
  --ink-soft: #334155;
  --ink-faint: #64748b;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --brand: #2563eb;
  --brand-soft: #eff6ff;
  --brand-line: #bfdbfe;
  --ok: #16a34a;
  --warn: #d97706;
  --serious: #ea580c;
  --critical: #dc2626;
  --tier-a: #1d4ed8;
  --tier-b: #2563eb;
  --tier-c: #0284c7;
  --tier-d: #475569;
  --tier-x: #64748b;
  --shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --radius: 6px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0c11;
  --surface: #14161d;
  --surface-soft: #1b1e27;
  --surface-strong: #232734;
  --ink: #f2f3f7;
  --ink-soft: #a9aebe;
  --ink-faint: #757a8a;
  --line: #262a35;
  --line-soft: #1e2129;
  --brand: #5865f2;
  --brand-soft: #1c2043;
  --brand-line: #333b7a;
  --ok: #1ca864;
  --warn: #f5a623;
  --serious: #eb7d38;
  --critical: #d9485f;
  --tier-a: #1c5cab;
  --tier-b: #2a78d6;
  --tier-c: #5598e7;
  --tier-d: #86b6ef;
  --tier-x: #6b7080;
  --shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6), 0 2px 8px -2px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
}

body {
  font-size: 13px;
  line-height: 1.5;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  background: var(--bg);
  width: 100%;
}

/* ── Jira-style Sidebar Navigation ────────────────────────────── */
.sidebar {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  height: 100vh;
  position: sticky;
  top: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  z-index: 25;
  overflow-y: auto;
}

.sidebar-header {
  padding: 4px 6px 16px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 12px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #4f46e5);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-name {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sidebar-brand-desc {
  font-size: 11px;
  color: var(--ink-faint);
  font-weight: 500;
}

.sidebar-nav-section {
  display: flex;
  flex-direction: column;
}

.sidebar-section-title {
  font-family: "Archivo", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 14px 8px 6px;
}

.sidebar-section-title:first-child {
  padding-top: 2px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tab.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.tab.nav-item:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.tab.nav-item.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
  border-color: var(--brand-line);
}

.nav-icon {
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  opacity: 0.85;
}

.tab.nav-item.active .nav-icon {
  opacity: 1;
}

.nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.count,
.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--ink-soft);
  font-size: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab.nav-item.active .count,
.tab.nav-item.active .nav-badge {
  background: var(--brand-line);
  color: var(--brand);
}

.sidebar-spacer {
  flex: 1;
  min-height: 16px;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.sidebar-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.sidebar-user {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
}

.user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.user-role {
  font-size: 10px;
  color: var(--ink-faint);
  line-height: 1.1;
}

.main-container {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 52px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.page-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.breadcrumb-root {
  color: var(--ink-faint);
  font-weight: 500;
}

.breadcrumb-sep {
  color: var(--line);
  font-size: 12px;
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 600;
  font-family: "Archivo", sans-serif;
  letter-spacing: -0.01em;
}

.main-content {
  flex: 1;
  min-width: 0;
}

@media (max-width: 860px) {
  .app-shell {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.6);
}

.status-text {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.action-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.action-btn:hover {
  background: var(--surface-soft);
}

.action-btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

.action-btn.primary:hover {
  filter: brightness(1.04);
}

.ghost-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  border-radius: var(--radius);
  padding: 6px 8px;
}

.ghost-btn:hover {
  background: var(--surface-soft);
}

main {
  flex: 1;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.content-wrap {
  max-width: 1680px;
  margin: 0 auto;
  padding: 18px;
}

.narrow {
  max-width: 960px;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 14px;
}

.kpi-card {
  padding: 16px 18px;
  border-right: 1px solid var(--line-soft);
}

.kpi-card:last-child {
  border-right: 0;
}

.kpi-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.04em;
  margin-bottom: 2px;
}

.kpi-value small {
  font-size: 14px;
  color: var(--ink-faint);
  font-weight: 600;
}

.kpi-sub {
  font-size: 11px;
  color: var(--ink-faint);
}

.kpi-sub strong {
  color: var(--ink-soft);
}

.meter {
  margin-top: 8px;
  width: 100%;
  height: 4px;
  background: var(--surface-strong);
  border-radius: 999px;
  overflow: hidden;
}

.meter > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #7d8ef5);
  border-radius: inherit;
}

.two-col {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-header h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.panel-body {
  padding: 14px;
}

.nopad {
  padding: 0;
}

.eyebrow {
  font-family: "Archivo", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.mt-20 {
  margin-top: 20px;
}

.stackbar {
  display: flex;
  width: 100%;
  height: 24px;
  border-radius: 5px;
  overflow: hidden;
  gap: 2px;
  background: var(--surface-soft);
}

.stackbar > span {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
}

.tier-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.tier-table th,
.tier-table td {
  padding: 6px 0;
  border-top: 1px solid var(--line-soft);
  text-align: left;
  font-size: 12px;
}

.tier-table th {
  color: var(--ink-faint);
  font-family: "Archivo", sans-serif;
  letter-spacing: 0.08em;
  font-size: 10px;
  text-transform: uppercase;
}

.tier-table td:last-child,
.tier-table th:last-child {
  text-align: right;
}

.tier-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}

.color-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
}

.score-box {
  margin-top: 18px;
}

.histogram {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  height: 90px;
  margin-top: 8px;
  padding-top: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.hist-bar {
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  gap: 4px;
  height: 100%;
}

.hist-bar span {
  color: var(--ink-faint);
  font-size: 10px;
  font-family: "IBM Plex Mono", monospace;
}

.hist-bar i {
  display: block;
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #8aa9f9, var(--brand));
  opacity: 0.9;
}

.data-bars {
  margin-top: 8px;
}

.source-row {
  display: grid;
  grid-template-columns: 120px 1fr 40px;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
}

.source-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
}

.source-marker {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
}

.source-track {
  position: relative;
  height: 9px;
  background: var(--surface-soft);
  border-radius: 0 4px 4px 0;
  overflow: hidden;
}

.source-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.source-value {
  text-align: right;
  font-size: 11px;
  font-family: "IBM Plex Mono", monospace;
}

.hygiene-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hygiene-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
}

.hygiene-item:first-child {
  border-top: 0;
}

.hygiene-icon {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: white;
  font-size: 10px;
  font-weight: 700;
  font-family: "IBM Plex Mono", monospace;
}

.hygiene-text {
  flex: 1;
  font-size: 12px;
  color: var(--ink-soft);
}

.hygiene-count {
  font-size: 11px;
  font-family: "IBM Plex Mono", monospace;
  color: var(--ink-faint);
}

.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  margin-top: 4px;
}

.search-box {
  position: relative;
  min-width: 220px;
  flex: 1;
  max-width: 360px;
}

.search-box svg {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 13px;
  height: 13px;
  transform: translateY(-50%);
  stroke: var(--ink-faint);
  fill: none;
  stroke-width: 2.4;
}

.search-box input,
.filters select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 7px 10px 7px 30px;
  font-size: 12.5px;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-box input:focus,
.filters select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.filters select {
  padding-left: 10px;
  min-width: 120px;
}

.chip-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.chip.active {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand);
  font-weight: 600;
}

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #eef5ff;
  border: 1px solid #bfdbfe;
  border-top: 0;
  color: #1e3a8a;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: inset 0 1px 2px rgba(37, 99, 235, 0.05);
}

.bulk-bar select {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #93c5fd;
  background: #ffffff;
  color: #1e293b;
}

.bulk-bar .btn {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: auto;
}

.lead-grid {
  width: 100%;
  min-width: 1200px;
  border-collapse: separate;
  border-spacing: 0;
}

.lead-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-soft);
  color: var(--ink-soft);
  text-align: left;
  font-size: 10.5px;
  font-family: "Archivo", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 9px 10px;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}

.lead-grid tbody td {
  padding: 10px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.lead-grid tbody tr:hover td {
  background: var(--surface-soft);
}

.lead-grid tbody tr.selected td {
  background: var(--brand-soft);
}

.lead-name {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--ink);
}

.lead-email {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--ink-faint);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-block {
  font-size: 12px;
  color: var(--ink);
}

.company-block small {
  display: block;
  margin-top: 2px;
  font-family: "IBM Plex Mono", monospace;
  color: var(--ink-faint);
  font-size: 10px;
}

.owner-select,
.stage-select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 4px;
  padding: 5px 6px;
  color: var(--ink);
  font-size: 11.5px;
  transition: all 0.15s ease;
}

.owner-select:hover,
.stage-select:hover {
  border-color: var(--brand);
  background: var(--surface-soft);
}

.score-cell {
  display: flex;
  align-items: center;
  gap: 7px;
}

.score-cell strong {
  width: 26px;
  text-align: right;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: var(--ink);
}

.score-meter {
  width: 48px;
  height: 6px;
  background: var(--surface-soft);
  border-radius: 999px;
  overflow: hidden;
}

.score-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #6a8cf8);
}

.tier-pill,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  white-space: nowrap;
}

.status-badge {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-clean { background: #dcfce7; border-color: #86efac; color: #15803d; }
.status-warn { background: #fef3c7; border-color: #fcd34d; color: #b45309; }
.status-suspect { background: #ffedd5; border-color: #fdba74; color: #c2410c; }
.status-fail { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }

[data-theme="dark"] .status-clean { background: rgba(28,168,100,0.12); border-color: rgba(28,168,100,0.4); color: var(--ok); }
[data-theme="dark"] .status-warn { background: rgba(245,166,35,0.12); border-color: rgba(245,166,35,0.5); color: #f5a623; }
[data-theme="dark"] .status-suspect { background: rgba(235,125,56,0.12); border-color: rgba(235,125,56,0.6); color: #eb7d38; }
[data-theme="dark"] .status-fail { background: rgba(217,73,95,0.12); border-color: rgba(217,73,95,0.4); color: var(--critical); }

.mono {
  font-family: "IBM Plex Mono", monospace;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100%);
  z-index: 70;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(102%);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 16px;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
  z-index: 5;
}

.close-btn:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(11, 12, 17, 0.45);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.scrim.show {
  opacity: 1;
  pointer-events: auto;
}

#drawerContent {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.drawer-header {
  padding: 14px 44px 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  position: relative;
}

.drawer-header .who h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

.drawer-header .who .role {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.drawer-header .who .em {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 4px;
  word-break: break-all;
}

.drawer-header .dscore {
  margin-left: auto;
  text-align: right;
  flex: none;
}

.drawer-header .dscore .n {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.drawer-header .dscore .l {
  font-size: 10px;
  color: var(--ink-faint);
  font-family: "Archivo", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 3px;
}

.dbody {
  overflow-y: auto;
  padding: 0 16px 28px;
  flex: 1;
}

.sect {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.sect:last-child {
  border-bottom: none;
}

.sect > .eyebrow {
  margin-bottom: 9px;
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-family: "Archivo", sans-serif;
}

.brk {
  display: grid;
  grid-template-columns: 118px 1fr 52px;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  font-size: 12px;
}

.brk .lab {
  color: var(--ink-soft);
}

.brk .track {
  height: 6px;
  background: var(--surface-soft);
  border-radius: 3px;
  overflow: hidden;
}

.brk .track i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--brand);
}

.brk .pts {
  text-align: right;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  color: var(--ink-faint);
}

.brk .pts b {
  color: var(--ink);
  font-weight: 600;
}

.why {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--ink-faint);
  margin: -2px 0 4px 0;
  padding-left: 0;
}

.flag {
  display: flex;
  gap: 9px;
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
}

.flag:first-of-type {
  border-top: none;
}

.flag .ic {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  flex: none;
  font-family: "IBM Plex Mono", monospace;
  margin-top: 2px;
}

.flag .tx b {
  display: block;
  font-weight: 600;
  font-size: 12px;
  color: var(--ink);
}

.flag .tx span {
  color: var(--ink-faint);
  font-size: 11.5px;
}

.flag .code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: var(--ink-faint);
  margin-left: auto;
  flex: none;
  background: var(--surface-soft);
  border-radius: 3px;
  padding: 1px 5px;
  height: fit-content;
}

.kv {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 4px 10px;
  font-size: 12px;
  margin: 0;
}

.kv dt {
  color: var(--ink-faint);
}

.kv dd {
  margin: 0;
  color: var(--ink);
}

.play {
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 11px 12px;
}

.play h4 {
  font-size: 12.5px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ink);
}

.play p {
  margin: 0 0 7px;
  font-size: 11.5px;
  color: var(--ink-soft);
}

.play ul {
  margin: 0;
  padding-left: 16px;
  font-size: 11.5px;
  color: var(--ink-soft);
}

.play ul li {
  margin-bottom: 2px;
}

.draft-type-toggle {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.draft-type-btn {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.14s ease;
  font-family: inherit;
}

.draft-type-btn:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.draft-type-btn.active {
  background: var(--surface);
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.draft-variant-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  margin-bottom: 9px;
}

.draft-variant-btn {
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.12s ease;
  font-family: inherit;
}

.draft-variant-btn:hover {
  background: var(--surface-soft);
  border-color: var(--line);
}

.draft-variant-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  font-weight: 600;
}

.draftbox {
  margin-top: 6px;
}

.draftbox .subj {
  width: 100%;
  margin-bottom: 6px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.draftbox textarea {
  width: 100%;
  min-height: 160px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 12.5px;
  line-height: 1.6;
  resize: vertical;
  color: var(--ink);
  font-family: inherit;
}

.draftmeta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 7px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--ink-faint);
}

.fieldrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-family: "Archivo", sans-serif;
  margin-bottom: 4px;
}

.field select,
.field input,
.field textarea {
  width: 100%;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 12.5px;
  color: var(--ink);
  font-family: inherit;
}

.field select:focus,
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
}

.field textarea {
  min-height: 68px;
  resize: vertical;
}

.tierpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}

.tierpill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.toast-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast-notice.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.drop, .dropzone {
  margin-top: 18px;
  border: 1.5px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 34px 20px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.drop.hot, .dropzone.hot {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.drop h3, .dropzone h3 {
  font-size: 15px;
  margin: 0 0 6px;
  color: var(--ink);
}

.drop p, .dropzone p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 12px;
}

.maptable {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.maptable th {
  text-align: left;
  font-family: "Archivo", sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-faint);
  padding: 0 8px 7px 0;
}

.maptable td {
  padding: 6px 8px 6px 0;
  border-top: 1px solid var(--line-soft);
  vertical-align: middle;
}

.maptable select {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  font-size: 12px;
  color: var(--ink);
}

.maptable select:focus {
  outline: none;
  border-color: var(--brand);
}

.maptable .samp {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--ink-faint);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note {
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 9px;
  line-height: 1.5;
}

.modelgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 18px 0;
}

@media (max-width: 980px) {
  .two-col,
  .modelgrid,
  .model-grid {
    grid-template-columns: 1fr;
  }

  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters {
    align-items: flex-start;
  }
}

.wrow {
  display: grid;
  grid-template-columns: 1fr 118px 54px;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
}

.wrow:first-of-type {
  border-top: none;
}

.wrow .n {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
}

.wrow .n small {
  display: block;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 400;
  margin-top: 2px;
}

.wrow input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
  cursor: pointer;
}

.wrow input[type="number"] {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  text-align: right;
}

.total-bar {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--ink-soft);
  flex-wrap: wrap;
}

.total-number {
  font-family: "Archivo", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.total-note {
  font-size: 11.5px;
  color: var(--ink-faint);
}

.panel-footer-note {
  padding: 10px 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--ink-faint);
}

.listedit {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dict-group {
  display: flex;
  flex-direction: column;
}

.dict-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-faint);
  font-family: "Archivo", sans-serif;
  margin-bottom: 6px;
}

.dict-sub {
  color: var(--ink-faint);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 10px;
}

.listedit textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.15s ease;
}

.listedit textarea:focus {
  outline: none;
  border-color: var(--brand);
}

.model-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  transition: background 0.12s ease, border-color 0.12s ease;
  cursor: pointer;
}

.btn:hover {
  background: var(--surface-soft);
  border-color: var(--line);
}

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  font-weight: 600;
}

.btn.primary:hover {
  filter: brightness(1.1);
}

.model-note {
  font-size: 12px;
  color: var(--ink-soft);
}

.model-note.saving {
  color: var(--brand);
}

.model-note.success {
  color: var(--ok);
}

.model-note.error {
  color: var(--critical);
}

.docs {
  max-width: 860px;
  margin: 0 auto;
}

.docs h2 {
  font-size: 18px;
  margin: 20px 0 8px;
  color: var(--ink);
}

.docs h3 {
  font-size: 13px;
  margin: 16px 0 6px;
  color: var(--ink);
}

.docs p,
.docs li {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.docs code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  background: var(--surface-soft);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--ink);
}

.docs ol,
.docs ul {
  padding-left: 20px;
}

/* Pagination Bar */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 12.5px;
  color: var(--ink-soft);
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-info strong {
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
}

.pagination-badge {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11px;
  font-family: "IBM Plex Mono", monospace;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-faint);
  margin-left: 4px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.page-btn:hover:not(:disabled):not(.active) {
  background: var(--surface-strong);
  border-color: var(--brand-line);
  color: var(--ink);
}

.page-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  font-weight: 600;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-ellipsis {
  padding: 0 4px;
  color: var(--ink-faint);
  user-select: none;
}

/* Source Origin Tags */
.source-badge-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}

.source-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.source-tag.tag-web {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.source-tag.tag-csv {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

[data-theme="dark"] .source-tag.tag-web {
  background: rgba(28, 168, 100, 0.14);
  color: #2bd685;
  border: 1px solid rgba(28, 168, 100, 0.35);
}

[data-theme="dark"] .source-tag.tag-csv {
  background: rgba(138, 92, 246, 0.16);
  color: #c4b5fd;
  border: 1px solid rgba(138, 92, 246, 0.4);
}

.source-tag .source-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.source-sub {
  font-size: 11px;
  color: var(--ink-faint);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}



/* ── Live stat bar ─────────────────────────────────────────────────────────── */
.live-stat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 4px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px 5px 9px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-family: inherit;
  color: var(--ink-soft);
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: none;
}
.stat-pill[style*="cursor:pointer"]:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(47,122,224,0.15);
  color: var(--ink);
}
.stat-pill .stat-icon { font-size: 13px; }
.stat-pill .stat-value { font-weight: 700; font-size: 14px; color: var(--ink); }
.stat-pill .stat-label { font-size: 11px; color: var(--ink-faint); }

.stat-pill.stat-hot {
  border-color: rgba(239,68,68,0.4);
  background: rgba(239,68,68,0.07);
}
.stat-pill.stat-hot .stat-value { color: #ef4444; }

.stat-pill.stat-warm {
  border-color: rgba(245,158,11,0.4);
  background: rgba(245,158,11,0.07);
}
.stat-pill.stat-warm .stat-value { color: #d97706; }

.stat-pill.stat-warn {
  border-color: rgba(245,158,11,0.4);
  background: rgba(245,158,11,0.06);
}
.stat-pill.stat-warn .stat-value { color: #b45309; }

/* ── Activity timeline & notes in drawer ───────────────────────────────────── */
.activity-item {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  font-size: 14px;
  margin-top: 1px;
}
.activity-body { flex: 1; min-width: 0; }
.activity-text { color: var(--ink); line-height: 1.5; word-break: break-word; }
.activity-meta { color: var(--ink-faint); font-size: 11px; margin-top: 2px; }

.note-item {
  background: rgba(47,122,224,0.05);
  border-radius: var(--radius);
  padding: 7px 9px;
  border: 1px solid rgba(47,122,224,0.12) !important;
  margin-bottom: 4px;
}

/* ── Critical / Disqualify button ──────────────────────────────────────────── */
.btn.critical, button.btn.sm.critical {
  background: rgba(217,72,95,0.1);
  border: 1px solid rgba(217,72,95,0.35);
  color: #d9485f;
}
.btn.critical:hover, button.btn.sm.critical:hover {
  background: rgba(217,72,95,0.18);
  border-color: #d9485f;
}

/* ── View Switcher & Kanban Board ─────────────────────────────────────────── */
.view-toggle {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s ease;
}

.view-toggle:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.view-toggle.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

.kanban-wrap {
  display: grid;
  grid-template-columns: repeat(6, minmax(260px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding: 16px 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  min-height: 520px;
}

.kanban-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  max-height: 750px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.kanban-col-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-soft);
  border-radius: 8px 8px 0 0;
}

.kanban-col-title {
  font-weight: 700;
  font-size: 12px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kanban-col-badge {
  background: var(--surface-strong);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
}

.kanban-card-list {
  padding: 10px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.kanban-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
}

.kanban-card-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 2px;
}

.kanban-card-sub {
  font-size: 11px;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line-soft);
}

.kanban-advance-btn {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}

.kanban-advance-btn:hover {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

/* ── Authentication & User Pill (LD-15) ────────────────────────── */
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 11.5px;
  color: var(--ink);
}

.user-pill .user-avatar {
  font-size: 12px;
}

.user-pill .user-name {
  font-weight: 600;
  color: var(--ink);
}

.btn-logout {
  background: transparent;
  border: none;
  color: #dc2626;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  transition: all 0.15s ease;
  margin-left: 2px;
}

.btn-logout:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px var(--line);
  animation: authCardPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authCardPop {
  0% {
    transform: scale(0.96) translateY(8px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.auth-brand {
  text-align: center;
  margin-bottom: 24px;
}

.auth-brand-badge {
  display: inline-block;
  padding: 3px 9px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--brand);
  margin-bottom: 8px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 12.5px;
  color: var(--ink-faint);
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-error-banner {
  padding: 9px 12px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  font-size: 12px;
  color: #b91c1c;
  font-weight: 500;
}

.auth-error-banner.hidden {
  display: none;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.auth-field input {
  padding: 10px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.btn-auth-submit {
  margin-top: 6px;
  padding: 11px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  border-radius: 6px;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-auth-submit:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
}

.btn-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 10.5px;
  color: #64748b;
}

/* ── Theme Toggle Button ─────────────────────────────────────────── */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s ease;
  user-select: none;
}

.theme-toggle-btn:hover {
  background: var(--surface-soft);
  border-color: var(--brand);
}

.theme-toggle-icon {
  font-size: 13px;
  line-height: 1;
}

.sync-health-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 500;
}

.btn-export-all {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  background: #059669 !important;
  color: #ffffff !important;
  border: none !important;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.btn-export-all:hover {
  background: #047857 !important;
}
