/* CertTrack — enterprise certification lifecycle management */
:root {
  /* Warm neutral grays */
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-2: #fafaf7;
  --surface-3: #f1efea;
  --border: #e6e3dc;
  --border-strong: #d4d0c7;
  --text: #1f1d1a;
  --text-2: #4a4742;
  --text-3: #7a766f;
  --text-4: #9c988f;

  /* Primary accent — deep teal */
  --primary: #01696f;
  --primary-hover: #015257;
  --primary-tint: #e6f0f1;
  --primary-tint-2: #d1e3e4;

  /* Status colors */
  --green: #1e7a4a;
  --green-bg: #e3f2e9;
  --amber: #a8650b;
  --amber-bg: #fbecd0;
  --red: #b3261e;
  --red-bg: #fbe2e0;
  --blue: #1d5fa3;
  --blue-bg: #e3edf8;

  --radius: 6px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(20, 18, 14, 0.04), 0 1px 1px rgba(20, 18, 14, 0.03);
  --shadow-md: 0 4px 12px rgba(20, 18, 14, 0.06), 0 1px 2px rgba(20, 18, 14, 0.04);
  --shadow-lg: 0 12px 32px rgba(20, 18, 14, 0.12);
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }

/* ============== Layout ============== */
.app {
  display: grid;
  grid-template-columns: 224px 1fr;
  grid-template-rows: 52px 1fr;
  height: 100vh;
  overflow: hidden;
}
.sidebar { grid-row: 1 / 3; grid-column: 1; background: #14211f; color: #d8dad7; display: flex; flex-direction: column; }
.topbar { grid-row: 1; grid-column: 2; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 20px; gap: 16px; }
.main { grid-row: 2; grid-column: 2; overflow: auto; background: var(--bg); }

/* ============== Sidebar ============== */
.brand {
  padding: 14px 16px 14px 18px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand-mark {
  width: 26px; height: 26px;
  background: var(--primary);
  border-radius: 6px;
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 13px;
  letter-spacing: -0.02em;
}
.brand-name { font-weight: 600; font-size: 14px; color: #f3f4f1; letter-spacing: -0.01em; }
.brand-sub { font-size: 11px; color: #8a8d87; margin-top: -1px; }

.nav { padding: 10px 8px; display: flex; flex-direction: column; gap: 1px; flex: 1; overflow-y: auto; }
.nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: #6c6f6a; padding: 12px 10px 6px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: 5px;
  color: #b8bab6;
  font-size: 13px;
  cursor: pointer;
  position: relative;
  text-align: left;
  width: 100%;
}
.nav-item:hover { background: rgba(255,255,255,0.04); color: #e8eae6; }
.nav-item.active {
  background: var(--primary);
  color: white;
}
.nav-item.active .nav-count { color: rgba(255,255,255,0.85); }
.nav-item svg { flex-shrink: 0; }
.nav-count { margin-left: auto; font-size: 11px; color: #7a7d77; font-variant-numeric: tabular-nums; }

.sidebar-foot {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
}
.avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #4a8b8e, #01696f); display: grid; place-items: center; color: white; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.user-name { font-size: 12px; color: #e8eae6; font-weight: 500; }
.user-role { font-size: 10px; color: #8a8d87; }

/* ============== Topbar ============== */
.topbar-search {
  flex: 1; max-width: 520px;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-3);
  border: 1px solid transparent;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--text-3);
}
.topbar-search:focus-within { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px var(--primary-tint); }
.topbar-search input { background: transparent; border: none; outline: none; flex: 1; font-size: 13px; color: var(--text); }
.topbar-search kbd { font-family: 'Inter'; font-size: 10px; color: var(--text-3); background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; color: var(--text-2); position: relative; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .dot { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: #d83a3a; border: 1.5px solid var(--surface); }
.role-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: 14px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface);
}
.role-pill:hover { background: var(--surface-3); }
.role-pill .avatar { width: 20px; height: 20px; font-size: 9px; }
.role-pill .caret { color: var(--text-4); }

/* ============== Page ============== */
.page { padding: 24px 32px 80px; max-width: 1440px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.breadcrumb { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { margin: 0 6px; color: var(--text-4); }
.page-title { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin: 0; color: var(--text); }
.page-subtitle { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.page-actions { display: flex; align-items: center; gap: 8px; }

/* ============== Buttons ============== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  height: 32px;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-bg); border-color: #efb8b3; }
.btn-sm { height: 26px; padding: 3px 8px; font-size: 12px; }
.btn-icon { width: 28px; padding: 0; justify-content: center; }

/* ============== Cards ============== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title { font-size: 13px; font-weight: 600; color: var(--text); margin: 0; letter-spacing: -0.005em; }
.card-sub { font-size: 11px; color: var(--text-3); }
.card-body { padding: 16px; }
.card-foot { padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12px; color: var(--text-3); display: flex; justify-content: space-between; align-items: center; }

/* ============== KPI ============== */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}
.kpi-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }
.kpi-value { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin-top: 8px; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi-delta { font-size: 11px; color: var(--text-3); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.kpi-delta .up { color: var(--green); }
.kpi-delta .down { color: var(--red); }

/* ============== Badges ============== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
  line-height: 1.5;
  white-space: nowrap;
}
.badge .b-dot { width: 6px; height: 6px; border-radius: 50%; }
.badge.active { background: var(--green-bg); color: var(--green); }
.badge.active .b-dot { background: var(--green); }
.badge.expiring { background: var(--amber-bg); color: var(--amber); }
.badge.expiring .b-dot { background: #d68f1f; }
.badge.expired,
.badge.overdue { background: var(--red-bg); color: var(--red); }
.badge.expired .b-dot,
.badge.overdue .b-dot { background: var(--red); }
.badge.missing { background: var(--surface-3); color: var(--text-3); border: 1px dashed var(--border-strong); }
.badge.missing .b-dot { background: var(--text-4); }
.badge.info { background: var(--blue-bg); color: var(--blue); }
.badge.info .b-dot { background: var(--blue); }
.badge.muted { background: var(--surface-3); color: var(--text-2); }
.badge.muted .b-dot { background: var(--text-3); }

/* ============== Tables ============== */
.table-wrap { overflow: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl thead th {
  position: sticky; top: 0;
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  z-index: 1;
  white-space: nowrap;
}
.tbl tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:hover .row-actions { opacity: 1; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; opacity: 0.45; transition: opacity 0.1s; }
.row-actions .btn-icon { color: var(--text-3); }
.row-actions .btn-icon:hover { color: var(--text); background: var(--surface-3); }

/* ============== Filters / chips ============== */
.filter-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  background: var(--surface);
}
.search-input {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 6px;
  width: 240px;
  color: var(--text-3);
}
.search-input:focus-within { border-color: var(--primary); background: white; }
.search-input input { background: transparent; border: none; outline: none; flex: 1; font-size: 13px; color: var(--text); }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
}
.chip:hover { background: var(--surface-3); }
.chip.active { background: var(--primary-tint); border-color: var(--primary-tint-2); color: var(--primary); font-weight: 500; }
.chip .x { color: var(--text-4); margin-left: 2px; }
.chip-divider { width: 1px; height: 16px; background: var(--border); margin: 0 4px; }

/* ============== Section header (within page) ============== */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 0 10px; }
.section-title { font-size: 13px; font-weight: 600; color: var(--text); margin: 0; }
.section-meta { font-size: 12px; color: var(--text-3); }

/* ============== Empty / placeholder ============== */
.empty { padding: 32px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ============== Modal ============== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20, 18, 14, 0.5); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 100; padding: 24px; animation: fadeIn 0.15s ease; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.18s cubic-bezier(.2,.8,.3,1.1);
}
.modal-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.modal-body { padding: 0; overflow: auto; flex: 1; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 8px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes scanLine { 0% { transform: translateY(0); } 100% { transform: translateY(100%); } }
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0.2; } }

/* ============== Misc ============== */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.hstack { display: flex; align-items: center; gap: 8px; }
.vstack { display: flex; flex-direction: column; gap: 8px; }
.spacer { flex: 1; }
.muted { color: var(--text-3); }
.label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 16px; font-size: 13px; }
.kv dt { color: var(--text-3); font-weight: 400; }
.kv dd { margin: 0; color: var(--text); }
.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; font-size: 12px; }

/* Bar chart */
.bar-chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; padding: 12px 4px 4px; height: 180px; align-items: end; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.bar-col .bar-stack { width: 100%; max-width: 32px; display: flex; flex-direction: column; justify-content: end; gap: 2px; height: calc(100% - 28px); }
.bar { width: 100%; border-radius: 2px; min-height: 2px; }
.bar.b-red { background: #e58a83; }
.bar.b-amber { background: #e6b56a; }
.bar.b-green { background: #6fa988; }
.bar-col .month { font-size: 10px; color: var(--text-3); margin-top: 4px; }
.bar-col .count { font-size: 11px; color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; min-height: 14px; }
.chart-legend { display: flex; gap: 16px; padding: 8px 16px 0; font-size: 11px; color: var(--text-3); }
.chart-legend .swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 5px; vertical-align: -1px; }

/* Alert row */
.alert-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.alert-row:last-child { border-bottom: none; }
.alert-row:hover { background: var(--surface-2); }
.alert-marker { width: 4px; align-self: stretch; border-radius: 2px; margin: -2px 0; }
.alert-marker.r { background: var(--red); }
.alert-marker.a { background: #d68f1f; }
.alert-marker.g { background: var(--green); }
.alert-meta { flex: 1; min-width: 0; }
.alert-line1 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.alert-line2 { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.alert-days { font-size: 12px; font-variant-numeric: tabular-nums; padding: 2px 8px; border-radius: 4px; font-weight: 500; }
.alert-days.r { color: var(--red); background: var(--red-bg); }
.alert-days.a { color: var(--amber); background: var(--amber-bg); }
.alert-days.g { color: var(--green); background: var(--green-bg); }

/* Activity */
.activity-row { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.activity-row:last-child { border-bottom: none; }
.activity-icon { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; flex-shrink: 0; font-size: 11px; }
.activity-text { font-size: 12px; color: var(--text); flex: 1; line-height: 1.5; }
.activity-text b { font-weight: 600; }
.activity-time { font-size: 11px; color: var(--text-4); white-space: nowrap; }

/* Product card grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.product-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 14px 12px; cursor: pointer; transition: border-color 0.1s, transform 0.1s; }
.product-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.product-card .sku { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-3); }
.product-card .pname { font-size: 14px; font-weight: 600; margin: 2px 0 4px; letter-spacing: -0.005em; }
.product-card .pdesc { font-size: 12px; color: var(--text-3); margin-bottom: 10px; min-height: 30px; }
.product-card .cert-row { display: flex; flex-wrap: wrap; gap: 4px; }

/* Family group */
.family-group { margin-bottom: 24px; }
.family-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.family-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.family-meta { font-size: 12px; color: var(--text-3); }

/* Cert matrix */
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.matrix th { background: var(--surface-2); padding: 8px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); border-bottom: 1px solid var(--border); text-align: left; font-weight: 500; }
.matrix td { padding: 11px 12px; border-bottom: 1px solid var(--border); }
.matrix tr:last-child td { border-bottom: none; }
.matrix .cert-type { font-weight: 500; }
.matrix .cert-id { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-2); }

/* Sample image placeholder */
.sample-img {
  width: 56px; height: 40px;
  background: repeating-linear-gradient(45deg, #f1efea, #f1efea 4px, #e6e3dc 4px, #e6e3dc 8px);
  border-radius: 4px;
  display: grid; place-items: center;
  font-size: 9px;
  color: var(--text-4);
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid var(--border);
}

/* Cert PDF preview */
.pdf-preview {
  background: repeating-linear-gradient(0deg, #f5f3ee, #f5f3ee 18px, #ecebe5 18px, #ecebe5 19px);
  border: 1px solid var(--border);
  border-radius: 6px;
  aspect-ratio: 8.5 / 11;
  padding: 14px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  color: var(--text-4);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.pdf-preview::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--border-strong);
  border-radius: 4px;
}
.pdf-preview .pdf-label { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-3); background: var(--surface-2); padding: 2px 8px; border-radius: 3px; }

/* Scanner viewfinder */
.viewfinder {
  background: #0a0d0c;
  border-radius: 8px;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}
.viewfinder::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(60,80,75,0.3), transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(40,60,55,0.3), transparent 60%),
    linear-gradient(180deg, #0e1413, #1a1f1d);
}
.viewfinder::after {
  content: '';
  position: absolute;
  left: 12%; right: 12%;
  top: 18%; bottom: 18%;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 6px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.25);
}
.vf-corners { position: absolute; left: 12%; right: 12%; top: 18%; bottom: 18%; pointer-events: none; }
.vf-corners > div { position: absolute; width: 18px; height: 18px; border: 3px solid var(--primary); }
.vf-corners > div:nth-child(1) { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.vf-corners > div:nth-child(2) { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.vf-corners > div:nth-child(3) { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.vf-corners > div:nth-child(4) { bottom: -2px; right: -2px; border-left: none; border-top: none; }
.scan-line {
  position: absolute;
  left: 12%; right: 12%;
  top: 18%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  box-shadow: 0 0 14px var(--primary), 0 0 6px var(--primary);
  animation: scanLine 1.8s ease-in-out infinite alternate;
  z-index: 2;
}
.vf-overlay-text {
  position: absolute;
  bottom: 14px; left: 14px;
  color: rgba(255,255,255,0.85);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  display: flex; align-items: center; gap: 8px;
}
.vf-rec-dot { width: 8px; height: 8px; border-radius: 50%; background: #d83a3a; animation: blink 1s infinite; }
.vf-tag-readout {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.15);
  color: #e8e9e6;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 6px 10px;
  border-radius: 4px;
}

/* Scan list */
.scan-list { display: flex; flex-direction: column; gap: 1px; }
.scan-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--surface); border-radius: 4px; border: 1px solid var(--border); animation: scaleIn 0.2s ease; }
.scan-item .scan-tag { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-2); }
.scan-item .scan-name { font-size: 12px; color: var(--text); margin-left: 4px; flex: 1; }

/* Submissions log */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 1px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 14px; }
.timeline-item::before {
  content: '';
  position: absolute; left: -16px; top: 4px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-strong);
}
.timeline-item.done::before { background: var(--green); border-color: var(--green); }
.timeline-item.now::before { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.timeline-title { font-size: 13px; font-weight: 500; }
.timeline-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* Mini sparkline */
.mini-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mini-stat { background: var(--surface-2); padding: 8px 10px; border-radius: 5px; border: 1px solid var(--border); }
.mini-stat .ms-label { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.mini-stat .ms-value { font-size: 16px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
