:root {
  --bg: #080f19;
  --surface: #111827;
  --surface-strong: #0f1724;
  --surface-soft: #0c1422;
  --border: rgba(148, 163, 184, 0.14);
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #6366f1;
  --primary-strong: #4f46e5;
  --accent: #22d3ee;
  --success: #22c55e;
  --warning: #f59e0b;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 10px;
  --grid-gap: 18px;
}

body[data-theme="dark"] {
  --bg: #080f19;
  --surface: #111827;
  --surface-strong: #0f1724;
  --surface-soft: #0c1422;
  --border: rgba(145, 163, 255, 0.12);
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #6366f1;
  --primary-strong: #4f46e5;
  --accent: #22d3ee;
  --success: #22c55e;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

body[data-theme="light"] {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-strong: #f8fafc;
  --surface-soft: #eef2f7;
  --border: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --accent: #06b6d4;
  --success: #16a34a;
  --warning: #d97706;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at top center, rgba(99, 102, 241, 0.12), transparent 32%),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.08), transparent 26%),
    var(--bg);
  color: var(--text);
}
.hidden { display: none !important; }
.app-shell { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; gap: 10px; }
.brand-panel {
  padding: 18px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border-right: 0;
}
.brand-copy { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  font-size: 28px; font-weight: 800; color: white;
  background: linear-gradient(135deg, var(--primary), #8b5cf6); box-shadow: 0 16px 40px rgba(99, 102, 241, 0.28);
}
.brand-mark.small {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: none;
}
.brand-panel h1 { margin: 16px 0 8px; font-size: 26px; letter-spacing: -0.02em; }
.tagline { font-size: 14px; line-height: 1.45; max-width: none; margin: 0; color: var(--muted); }
.subtag { color: var(--muted); max-width: 170px; font-size: 12px; line-height: 1.55; }
.theme-toggle { margin-top: 0; }
.workspace { padding: 10px 20px 20px; }
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)), var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: var(--shadow); backdrop-filter: blur(18px);
}
.panel.nested { border-radius: var(--radius-lg); box-shadow: none; background: var(--surface-strong); }
.elevated { max-width: 480px; margin: 40px auto; }
.auth-panel { padding: 28px; }
.panel-header h2, .hero h2, .panel-title-row h3 { margin: 0; font-size: 26px; }
.panel-header p, .hero p, .muted { margin: 6px 0 0; color: var(--muted); }
.auth-form { display: grid; gap: 14px; margin-top: 22px; }
.auth-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.auth-actions > * { flex: 1 1 180px; }
.auth-switch { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); }
.auth-link { white-space: nowrap; }
.auth-status { min-height: 22px; text-align: center; }
.success-text { color: var(--success); }
label { display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
input, select, textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 14px; background: var(--surface-soft); color: var(--text);
}
textarea {
  resize: vertical;
  min-height: 120px;
  font: inherit;
}
button { border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 600; cursor: pointer; transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease; }
button:hover { transform: translateY(-1px); }
.primary-btn, .upload-btn span { background: linear-gradient(135deg, var(--primary), #8b5cf6); color: white; box-shadow: 0 12px 28px rgba(99,102,241,0.25); }
.ghost-btn, .theme-toggle, .link-btn { background: transparent; border: 1px solid var(--border); color: #cbd5e1; }
.link-btn { padding: 0; border: 0; }
body[data-theme="light"] .ghost-btn,
body[data-theme="light"] .theme-toggle,
body[data-theme="light"] .link-btn {
  color: #475569;
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(255,255,255,0.72);
}
body[data-theme="light"] .ghost-btn:hover,
body[data-theme="light"] .theme-toggle:hover,
body[data-theme="light"] .link-btn:hover {
  color: #0f172a;
  background: rgba(255,255,255,0.92);
}
.topbar {
  display: flex; justify-content: space-between; align-items: center; padding: 18px 14px 24px; margin-bottom: 16px;
  background: transparent;
  border: 0;
  box-shadow: none;
  position: relative;
  z-index: 40;
}
.topbar-title { display: flex; align-items: center; gap: 16px; width: 100%; min-width: 0; flex: 1 1 auto; }
.logo-chip { display: none; }
.search-input {
  width: min(560px, 100%);
  max-width: 560px;
  min-width: 300px;
  height: 50px;
  border-radius: 999px;
  padding-inline: 20px;
  font-size: 15px;
}
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-shrink: 0; flex-wrap: wrap; }
.topbar-actions > * { flex: 0 0 auto; }
.upload-btn { display: inline-flex; align-items: center; width: auto; flex: 0 0 auto; }
.upload-btn span,
.ghost-btn,
.theme-toggle,
.icon-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}
.upload-btn span { min-width: 0; width: auto; }
.upload-action {
  min-width: 108px;
  width: auto;
  padding-inline: 14px;
  gap: 8px;
}
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-inline: 18px;
}
.btn-glyph {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,0.12);
  color: inherit;
  font-size: 14px;
  font-weight: 700;
}
.icon-btn {
  width: 56px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 18px;
}
body[data-theme="light"] .icon-btn {
  color: #64748b;
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(255,255,255,0.72);
}
.icon-btn.is-active {
  background: rgba(99,102,241,0.12);
  color: #c7d2fe;
  border-color: rgba(99,102,241,0.2);
}
body[data-theme="light"] .icon-btn.is-active {
  color: #2563eb;
  border-color: rgba(37,99,235,0.18);
  background: rgba(37,99,235,0.10);
}
.icon-svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notification-wrap {
  position: relative;
  z-index: 60;
}
.notifications-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(17,24,39,0.98), rgba(15,23,36,0.98));
  box-shadow: 0 22px 50px rgba(0,0,0,0.35);
  display: grid;
  gap: 10px;
  z-index: 80;
  overflow: hidden;
}
.notifications-panel strong {
  font-size: 15px;
  color: var(--text);
}
.notification-item {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
body[data-theme="light"] .notifications-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  box-shadow: 0 22px 40px rgba(15,23,42,0.12);
}
body[data-theme="light"] .notification-item {
  background: rgba(15,23,42,0.03);
  border: 1px solid rgba(15,23,42,0.06);
  color: #475569;
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), #8b5cf6); color: white; font-weight: 700;
}
.avatar.small { width: 38px; height: 38px; font-size: 12px; }
.layout-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 28px; padding: 16px; box-shadow: var(--shadow); }
.sidebar { padding: 14px; display: flex; flex-direction: column; justify-content: space-between; position: sticky; top: 20px; min-height: calc(100vh - 120px); border-right: 1px solid var(--border); }
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px 18px;
  margin-bottom: 8px;
}
.nav-group { display: grid; gap: 8px; }
.nav-label { font-size: 11px; text-transform: uppercase; color: var(--muted); margin: 8px 0 4px; }
.nav-item {
  background: transparent;
  text-align: left;
  color: var(--text);
  border: 1px solid transparent;
  min-height: 44px;
  display: flex;
  align-items: center;
  line-height: 1.2;
  padding: 10px 12px;
  border-radius: 12px;
}
.nav-item.active, .nav-item:hover { background: rgba(99,102,241,0.14); border-color: rgba(99,102,241,0.12); color: #c7d2fe; }
.workspace-chip {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  color: #cbd5e1;
  border: 1px solid var(--border);
  font-size: 13px;
}
.user-chip {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--border);
}
.user-chip span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.content-view { display: grid; gap: 22px; min-width: 0; max-width: none; padding: 8px 12px 12px 0; }
.hero { padding: 8px 4px 4px; display: flex; justify-content: space-between; align-items: flex-start; background: transparent; border: 0; box-shadow: none; gap: 20px; }
.hero h2 { font-size: 36px; line-height: 1.02; letter-spacing: -0.04em; font-weight: 700; }
.hero-status { display: flex; align-items: center; gap: 10px; color: var(--muted); padding-top: 12px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.kpi-card { padding: 16px 18px; display: grid; gap: 10px; min-height: 124px; position: relative; overflow: hidden; }
.kpi-card::before {
  content: "";
  position: absolute;
  inset: auto 14px 12px auto;
  width: 52px;
  height: 24px;
  border-radius: 999px;
  opacity: 0.55;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14));
}
.kpi-card:nth-child(1) { box-shadow: inset 0 0 0 1px rgba(59,130,246,0.18); }
.kpi-card:nth-child(2) { box-shadow: inset 0 0 0 1px rgba(168,85,247,0.18); }
.kpi-card:nth-child(3) { box-shadow: inset 0 0 0 1px rgba(34,197,94,0.18); }
.kpi-card:nth-child(4) { box-shadow: inset 0 0 0 1px rgba(245,158,11,0.18); }
.kpi-card span { color: #cbd5e1; font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.kpi-card strong { font-size: 34px; line-height: 1; font-weight: 700; }
.kpi-card small { color: var(--muted); }
body[data-theme="light"] .kpi-card span {
  color: #64748b;
}
body[data-theme="light"] .kpi-card small {
  color: #64748b;
}
.dashboard-main, .dashboard-bottom, .meeting-grid, .trace-grid, .workflow-grid, .settings-grid { display: grid; gap: 18px; align-items: stretch; }
.dashboard-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dashboard-bottom { grid-template-columns: minmax(0, 1fr); }
.chart-panel, .meeting-detail, .trace-layout, .workflow-layout, .admin-layout, .upload-layout, .live-layout { padding: 18px; }
.chart-panel { min-height: 310px; }
.dashboard-bottom > .panel {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  overflow: hidden;
}
.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.panel-title-row > :first-child { min-width: 0; flex: 1 1 240px; }
.panel-title-row h3 {
  font-size: clamp(24px, 2vw, 28px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}
.panel-title-row .link-btn,
.panel-title-row .ghost-btn,
.panel-title-row .primary-btn {
  flex-shrink: 0;
}
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.panel-title-row .link-btn {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: #cbd5e1;
  background: rgba(255,255,255,0.02);
}
body[data-theme="light"] .panel-title-row .link-btn {
  color: #64748b;
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(255,255,255,0.82);
}
body[data-theme="light"] .panel-title-row .link-btn:hover {
  color: #0f172a;
}
.dashboard-card-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  width: 100%;
}
.donut-wrap { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: center; }
.donut-chart {
  width: 158px; height: 158px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  background:
    radial-gradient(circle at center, #101827 0 44%, transparent 45%),
    conic-gradient(#2563eb 0 38%, #4f46e5 38% 68%, #7c3aed 68% 100%);
}
.donut-chart.is-empty {
  background:
    radial-gradient(circle at center, var(--surface-strong) 0 44%, transparent 45%),
    linear-gradient(135deg, rgba(69,104,255,0.08), rgba(127,224,228,0.08));
  border: 1px dashed var(--border);
}
.donut-chart span { font-size: 34px; font-weight: 700; }
.donut-chart small { display: block; text-align: center; color: var(--muted); margin-top: -6px; }
.legend-list, .component-list ul { list-style: none; padding: 0; margin: 0; }
.legend-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.legend-list.empty-list li { border-bottom: 0; padding: 0; }
.line-chart {
  min-height: 220px;
  border-radius: var(--radius-md);
  background: transparent;
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
}
.line-chart::before,
.line-chart::after { display: none; }
.line-chart.empty-chart { display: grid; place-items: center; background: transparent; }
.meeting-list {
  display: grid;
  gap: 14px;
  min-height: 220px;
  align-content: start;
  width: 100%;
}
.meeting-item {
  display: grid; grid-template-columns: 72px minmax(280px, 1.8fr) minmax(150px, 0.8fr) minmax(130px, 0.7fr) auto; gap: 18px; padding: 16px 18px;
  border-radius: 18px; background: rgba(255,255,255,0.03); cursor: pointer;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.05);
  color: var(--text);
  text-align: left;
}
.meeting-date {
  min-height: 64px;
  border-radius: 16px; background: rgba(99,102,241,0.1); display: grid; place-items: center; color: #e2e8f0; font-weight: 700; font-size: 13px; line-height: 1.15; padding: 10px 0;
}
body[data-theme="light"] .meeting-date {
  background: linear-gradient(180deg, rgba(99,102,241,0.08), rgba(99,102,241,0.14));
  color: #475569;
  border: 1px solid rgba(99,102,241,0.12);
}
.meeting-meta { min-width: 0; }
.meeting-meta strong, .trace-item strong { display: block; margin-bottom: 8px; line-height: 1.3; color: var(--text); font-size: 16px; font-weight: 700; }
.meeting-meta .muted {
  color: var(--muted);
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.meeting-sentiment,
.meeting-impact {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.meeting-sentiment strong,
.meeting-impact strong {
  color: var(--text);
  font-size: 18px;
  margin: 0;
}
.meeting-pill {
  align-self: center; justify-self: end; padding: 10px 14px; border-radius: 999px; background: rgba(99,102,241,0.16);
  color: #c7d2fe; font-size: 12px; font-weight: 700;
  border: 1px solid rgba(99,102,241,0.18);
}
body[data-theme="light"] .meeting-pill {
  background: rgba(37,99,235,0.1);
  color: #2563eb;
}
body[data-theme="light"] .meeting-meta .muted,
body[data-theme="light"] .meeting-sentiment,
body[data-theme="light"] .meeting-impact {
  color: #64748b;
}
.workflow-snapshot, .workflow-canvas {
  min-height: 260px; display: grid; place-items: center; background: radial-gradient(circle at top, rgba(31,79,201,0.08), transparent 32%), var(--surface-soft);
  border-radius: var(--radius-md);
  width: 100%;
}
.live-control-grid, .live-grid {
  display: grid;
  gap: var(--grid-gap);
}
.live-control-grid { grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); }
.live-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.live-control-panel, .live-overview-panel {
  display: grid;
  gap: 12px;
}
.live-overview-panel .speaker-row,
.summary-box .speaker-row,
.speaker-summary .speaker-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.live-overview-panel .speaker-row:last-child { border-bottom: 0; }
.live-card-list {
  display: grid;
  gap: 10px;
}
.live-card-item {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--border);
}
.live-card-item strong {
  display: block;
  margin-bottom: 6px;
}
.live-card-item small {
  color: var(--muted);
}
.chat-layout,
.chat-control-grid {
  display: grid;
  gap: var(--grid-gap);
}
.chat-control-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.chat-suggestions .ghost-btn { padding: 10px 14px; }
.export-retention-note {
  max-width: 760px;
  margin-top: 10px;
}
.chat-history {
  min-height: 320px;
  max-height: 540px;
  overflow-y: auto;
  align-content: start;
}
.chat-message {
  display: grid;
  gap: 8px;
  max-width: 88%;
  padding: 16px 18px;
  border-radius: 18px;
}
.chat-message.is-user {
  justify-self: end;
  background: linear-gradient(135deg, rgba(69,104,255,0.14), rgba(69,104,255,0.2));
  border: 1px solid rgba(69,104,255,0.16);
}
.chat-message.is-assistant {
  justify-self: start;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}
.chat-message-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.chat-message-body {
  line-height: 1.6;
  overflow-wrap: anywhere;
}
textarea#chatQuestionInput {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  background: var(--surface-soft);
  color: var(--text);
  min-height: 120px;
  resize: vertical;
}
.workflow-nodes { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.workflow-node { padding: 10px 16px; border-radius: 14px; background: var(--surface-strong); border: 1px solid var(--border); }
.empty-state {
  min-height: 100%;
  width: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
  padding: 24px;
  overflow-wrap: anywhere;
}
.dashboard-bottom .empty-state {
  align-content: center;
}
.tabs { display: none; }
.tab { background: transparent; border-bottom: 2px solid transparent; border-radius: 0; padding-inline: 0; color: var(--muted); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.meeting-grid { grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); }
.media-card {
  padding: 16px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.media-card.is-empty {
  justify-content: center;
}
.cover-image { width: 100%; border-radius: 18px; aspect-ratio: 16/9; object-fit: cover; background: var(--surface-soft); }
.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}
.speaker-summary {
  padding: 16px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}
.speaker-summary h4 {
  margin: 0 0 16px;
}
.speaker-summary.is-empty #speakerSummary {
  flex: 1 1 auto;
  display: flex;
}
.speaker-summary.is-empty .empty-state {
  min-height: 100%;
}
.speaker-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.bar { height: 6px; border-radius: 999px; background: rgba(69,104,255,0.12); overflow: hidden; margin-top: 8px; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.transcript-list {
  display: grid;
  gap: 10px;
  min-height: 140px;
}
.transcript-row { padding: 14px; border-radius: var(--radius-md); background: var(--surface-soft); display: grid; grid-template-columns: 120px 180px 1fr; gap: 12px; }
.cv-feature-panel {
  padding: 18px;
  display: grid;
  gap: 16px;
}
.cv-feature-content {
  display: grid;
  gap: 16px;
}
.cv-highlight-grid,
.cv-summary-grid,
.cv-lane-grid {
  display: grid;
  gap: 12px;
}
.cv-highlight-grid,
.cv-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.cv-lane-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.cv-stat-card,
.cv-lane-card,
.cv-timeline-card,
.cv-notes-card,
.cv-content-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 14px;
}
.cv-stat-card {
  display: grid;
  gap: 6px;
}
.cv-stat-card span,
.cv-timeline-meta span,
.cv-lane-head span,
.cv-chip-row strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cv-stat-card strong {
  font-size: 28px;
  line-height: 1;
}
.cv-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cv-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(40, 88, 216, 0.1);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}
.cv-chip.is-muted {
  background: rgba(127, 138, 184, 0.12);
  color: var(--muted);
}
.cv-lane-card,
.cv-timeline-card {
  display: grid;
  gap: 12px;
}
.cv-content-card {
  display: grid;
  gap: 12px;
}
.cv-content-list {
  display: grid;
  gap: 10px;
}
.cv-content-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  padding: 12px;
}
.cv-content-item p {
  margin: 0;
  line-height: 1.55;
}
.cv-lane-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.cv-lane-list,
.cv-note-list {
  display: grid;
  gap: 10px;
}
.cv-lane-item {
  display: grid;
  gap: 8px;
}
.cv-lane-item strong,
.cv-note-list strong {
  display: block;
  line-height: 1.3;
}
.cv-mini-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(69,104,255,0.12);
  overflow: hidden;
}
.cv-mini-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.cv-timeline-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.cv-frame-list {
  display: grid;
  gap: 10px;
}
.cv-frame-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  padding: 12px;
}
.cv-frame-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.cv-frame-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(69,104,255,0.08);
  overflow: hidden;
}
.cv-frame-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.cv-frame-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cv-note-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.trace-grid { grid-template-columns: 1.4fr 0.6fr; }
.trace-timeline { display: grid; gap: 14px; }
.trace-item { display: grid; grid-template-columns: 76px 12px 1fr; gap: 16px; align-items: start; }
.trace-item .line { width: 2px; min-height: 72px; background: rgba(69,104,255,0.22); position: relative; }
.trace-item .line::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); position: absolute; left: -5px; top: 0; }
.trace-card { background: var(--surface-soft); border-radius: var(--radius-md); padding: 14px; }
.timeline-entry {
  display: grid;
  grid-template-columns: 84px 14px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 10px 0;
}
.timeline-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  background: #6366f1;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
}
.timeline-dot.action { background: #a855f7; box-shadow: 0 0 0 4px rgba(168,85,247,0.12); }
.timeline-dot.risk { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,0.12); }
.timeline-dot.follow-up { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,0.12); }
.timeline-content {
  display: grid;
  gap: 4px;
}
.timeline-content strong {
  margin: 0;
  font-size: 14px;
}
.timeline-content p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.timeline-tag {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
}
.timeline-tag.strategic { background: rgba(59,130,246,0.14); color: #93c5fd; }
.timeline-tag.action { background: rgba(168,85,247,0.14); color: #d8b4fe; }
.timeline-tag.risk { background: rgba(245,158,11,0.14); color: #fcd34d; }
.timeline-tag.follow-up { background: rgba(34,197,94,0.14); color: #86efac; }
.workflow-grid { grid-template-columns: 200px minmax(0, 1fr) 240px; }
.live-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.property-card,
.summary-box,
.speaker-summary,
.media-card,
.component-list {
  padding: 16px;
}
.live-quick-actions { margin-bottom: 12px; }
#liveTranscriptList {
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}
#liveCopilotAnswer {
  min-height: 220px;
  white-space: pre-wrap;
  line-height: 1.55;
}
.floating-live-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  padding: 14px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  box-shadow: 0 18px 36px rgba(24, 32, 54, 0.22);
}
body.popup-live-copilot {
  background:
    radial-gradient(circle at top right, rgba(40, 88, 216, 0.12), transparent 24%),
    var(--bg);
}
body.popup-live-copilot .brand-panel,
body.popup-live-copilot .topbar,
body.popup-live-copilot .sidebar,
body.popup-live-copilot #dashboardView,
body.popup-live-copilot #meetingsView,
body.popup-live-copilot #traceView,
body.popup-live-copilot #workflowView,
body.popup-live-copilot #analyzeView,
body.popup-live-copilot #adminView,
body.popup-live-copilot .floating-live-launcher {
  display: none !important;
}
body.popup-live-copilot .app-shell,
body.popup-live-copilot .layout-grid {
  display: block;
}
body.popup-live-copilot .workspace {
  padding: 12px;
}
body.popup-live-copilot #appView {
  display: block !important;
}
body.popup-live-copilot #liveView {
  display: grid !important;
  gap: 12px;
}
body.popup-live-copilot .live-grid {
  grid-template-columns: 1fr;
}
body.popup-live-copilot .panel,
body.popup-live-copilot .panel.nested {
  border-radius: 14px;
}
body.popup-live-copilot #liveTranscriptList {
  max-height: 320px;
}
body.popup-live-copilot #liveCopilotAnswer {
  min-height: 180px;
}
.component-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.property-card, .summary-box { padding: 16px; }
.upload-layout, .admin-layout { padding: 20px; }
.upload-zone {
  display: grid; place-items: center; gap: 8px; min-height: 220px; border: 1.5px dashed rgba(40,88,216,0.35);
  border-radius: var(--radius-lg); color: var(--primary); background: rgba(40,88,216,0.05); cursor: pointer;
}
.upload-zone strong { font-size: 22px; color: var(--text); }
.upload-zone span { color: var(--muted); }
.analysis-range-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.range-note {
  margin-top: 12px;
}
.model-pill {
  align-self: start;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(18, 156, 143, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.upload-status { margin-top: 14px; color: var(--muted); }
.settings-grid { grid-template-columns: 1fr 1fr; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; }
.ghost-btn:disabled,
.ghost-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(10, 16, 30, 0.42);
  backdrop-filter: blur(6px);
}
.processing-card {
  width: min(360px, calc(100vw - 32px));
  padding: 26px;
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}
.processing-card span { color: var(--muted); line-height: 1.45; }
.loader-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(40,88,216,0.16);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}
.is-processing .upload-btn span {
  opacity: 0.65;
  cursor: wait;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1400px) {
  .app-shell { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-main, .dashboard-bottom, .meeting-grid, .trace-grid, .workflow-grid, .settings-grid, .live-control-grid, .live-grid { grid-template-columns: 1fr; }
  .chat-control-grid { grid-template-columns: 1fr; }
  .layout-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .meeting-item { grid-template-columns: 72px minmax(0, 1fr) 140px 120px auto; }
  .search-input { max-width: none; }
}
@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .topbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .topbar-title { flex-direction: column; align-items: stretch; }
  .topbar-actions { justify-content: flex-start; flex-wrap: wrap; }
  .kpi-grid { grid-template-columns: 1fr; }
  .workspace { padding: 12px; }
  .topbar { padding: 12px; }
  .donut-wrap { grid-template-columns: 1fr; }
  .meeting-item { grid-template-columns: 1fr; align-items: start; gap: 14px; }
  .meeting-date,
  .meeting-pill { justify-self: start; }
  .sidebar { min-height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .transcript-row { grid-template-columns: 1fr; }
  .chat-message { max-width: 100%; }
  .cv-frame-head,
  .cv-lane-head,
  .cv-timeline-meta { flex-direction: column; align-items: flex-start; }
  .auth-switch { flex-direction: column; }
}
