/* vDPO — Design System */

:root {
  --bg:           #f7f7f5;
  --bg-card:      #ffffff;
  --bg-tertiary:  #f0efe9;
  --bg-hover:     #e8e6e0;
  --accent:       #cc785c;
  --accent-hover: #b86647;
  --accent-light: #faf0ec;
  --text:         #1a1a1a;
  --text-2:       #6b6b6b;
  --text-3:       #9b9b9b;
  --border:       #e5e3dc;
  --border-strong:#ccc9be;
  --success:      #2d7a50;
  --success-light:#edf7f2;
  --warning:      #c47b1a;
  --warning-light:#fef3e2;
  --danger:       #b03030;
  --danger-light: #fdeaea;
  --info:         #1e4a8a;
  --info-light:   #e8eef8;
  --sidebar-bg:   #f0efe9;
  --sidebar-active-bg: #e8e6e0;
  --radius:       8px;
  --radius-sm:    6px;
  --radius-xs:    4px;
  --shadow:       0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── TOPBAR ── */
.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  height: 52px;
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 0 20px;
  max-width: 1600px;
  margin: 0 auto;
}
.topbar-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.topbar-logo .logo-v { color: var(--accent); }
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-user {
  font-size: 13px;
  color: var(--text-2);
}
.topbar-icon {
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.topbar-icon:hover { background: var(--bg-tertiary); color: var(--text); }
.topbar-logout:hover { color: var(--danger); }
.language-switcher { display: flex; align-items: center; }
.language-select {
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-2);
  font-size: 12px;
  padding: 0 8px;
}

/* ── CLIENT SWITCHER ── */
.client-switcher { position: relative; flex: 1; max-width: 360px; }
.client-switcher-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: border-color 0.15s;
}
.client-switcher-btn:hover { border-color: var(--border-strong); }
.client-name { font-weight: 600; flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-sector { font-size: 11px; color: var(--text-3); text-transform: capitalize; flex-shrink: 0; }
.client-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: none;
  z-index: 300;
  max-height: 320px;
  overflow-y: auto;
}
.client-menu.open { display: block; }
.client-menu-item {
  display: block;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.client-menu-item:last-child { border-bottom: none; }
.client-menu-item:hover, .client-menu-item.active { background: var(--bg-hover); }
.client-menu-name { display: block; font-size: 13px; font-weight: 500; }
.client-menu-sector { font-size: 11px; color: var(--text-3); text-transform: capitalize; }
.client-menu-add { color: var(--accent); font-size: 13px; font-weight: 500; }

/* ── APP LAYOUT ── */
.app-layout { display: flex; min-height: calc(100vh - 52px); }
.main-content { flex: 1; min-width: 0; padding: 28px 32px; }

/* ── SIDEBAR ── */
.sidebar {
  width: 320px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  height: calc(100vh - 52px);
  position: sticky;
  top: 52px;
  overflow-y: auto;
}
.sidebar-inner { padding: 12px 0; }
.sidebar-volume { margin-bottom: 4px; }
.sidebar-volume-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 10px 16px 4px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  text-decoration: none;
  color: var(--text);
  font-size: 13.5px;
  transition: background 0.1s, color 0.1s;
}
.sidebar-item:hover { background: var(--bg-hover); color: var(--text); }
.sidebar-item.active {
  background: var(--sidebar-active-bg);
  color: var(--text);
  font-weight: 400;
}
.sidebar-num {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 11px;
  color: var(--text-3);
  flex-shrink: 0;
  width: 20px;
}
.sidebar-label { flex: 1; line-height: 1.3; font-weight: 400; }
.sidebar-score {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}
.sidebar-score.success { background: var(--success-light); color: var(--success); }
.sidebar-score.warning { background: var(--warning-light); color: var(--warning); }
.sidebar-score.danger  { background: var(--danger-light);  color: var(--danger); }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-body { padding: 20px; }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title { font-size: 14px; font-weight: 600; }

/* ── STAT CARDS ── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin-bottom: 8px; }
.stat-value { font-size: 32px; font-weight: 700; line-height: 1; color: var(--text); }
.stat-value.success { color: var(--success); }
.stat-value.warning { color: var(--warning); }
.stat-value.danger  { color: var(--danger); }
.stat-sub { font-size: 12px; color: var(--text-2); margin-top: 4px; }

/* ── PAGE HEADER ── */
.page-header { margin-bottom: 24px; }
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.page-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* ── GRIDS ── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* ── COUNTRY CHECKLIST ── */
.country-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.country-checklist-vertical {
  grid-template-columns: 1fr;
  max-width: 420px;
  gap: 6px;
}
.country-check-option {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 10px 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.country-check-option:hover {
  border-color: var(--border-strong);
  background: var(--bg-tertiary);
}
.country-check-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(204, 120, 92, 0.12);
}
.country-check-option input {
  flex: 0 0 auto;
}
.country-check-flag {
  font-size: 18px;
  line-height: 1;
}
.country-check-option-plain {
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 6px 0;
  box-shadow: none;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  font-size: 14px;
  font-weight: 560;
  line-height: 1.35;
}
.country-check-option-plain input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}
.country-check-option-plain:hover,
.country-check-option-plain:has(input:checked) {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.country-law-summary {
  min-width: 0;
  display: grid;
  gap: 8px;
}
.country-law-summary strong {
  color: #565850;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}
.country-law-option {
  align-items: flex-start;
  width: 100%;
  min-height: 88px;
  border: 1px solid #d9dcd5;
  border-radius: 14px;
  background: #fff;
  padding: 18px 20px;
  gap: 16px;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.country-law-option .country-check-flag {
  margin-top: 4px;
}
.country-law-option:hover {
  border-color: #bec2b8;
  background: #fbfbf8;
}
.country-law-option:has(input:checked) {
  border-color: #b9df8e;
  background: #fbfdf7;
  box-shadow: none;
}
.country-law-option input {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  margin-top: 2px;
  border: 1.5px solid #bfc2bd;
  border-radius: 9px;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.country-law-option input:checked {
  background: #3b7818;
  border-color: #3b7818;
}
.country-law-option input:checked::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  width: 8px;
  height: 15px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  border-radius: 1px;
  transform: rotate(42deg);
}
.country-law-option-empty {
  cursor: default;
}
.country-law-list {
  display: grid;
  gap: 4px;
}
.country-law-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #151619;
  font-size: 17px;
  font-weight: 720;
  line-height: 1.25;
}
.country-law-name.muted {
  color: var(--text-3);
  font-size: 14px;
  font-weight: 600;
}
.country-law-link {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid #d9dcd5;
  border-radius: 9px;
  background: #fff;
  color: var(--accent);
  text-decoration: none;
}
.country-law-link:hover {
  background: var(--accent-light);
  border-color: #e7c6b9;
}
.country-save-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── CLIENT CARDS ── */
.client-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.client-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.client-card-add {
  border: 2px dashed var(--border-strong);
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-3);
  min-height: 160px;
  font-size: 13px;
  font-weight: 500;
}
.client-card-add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.client-card-add svg { opacity: 0.5; }
.client-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.client-card-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.client-card-meta { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.client-ring { flex-shrink: 0; }
.sector-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: var(--bg-tertiary);
  color: var(--text-2);
  margin-top: 4px;
}
.volume-bars { display: flex; gap: 3px; margin-top: 12px; }
.vol-bar-wrap { flex: 1; }
.vol-bar-label { font-size: 9px; color: var(--text-3); margin-bottom: 2px; }
.vol-bar-track { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.vol-bar-fill { height: 100%; border-radius: 2px; background: var(--accent); }
.vol-bar-fill.success { background: var(--success); }
.vol-bar-fill.warning { background: var(--warning); }
.vol-bar-fill.danger  { background: var(--danger); }
.client-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.client-last-activity { font-size: 11px; color: var(--text-3); }

/* ── CIRCULAR PROGRESS ── */
.ring-svg { transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--border); }
.ring-fill  { fill: none; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.ring-fill.success { stroke: var(--success); }
.ring-fill.warning { stroke: var(--warning); }
.ring-fill.danger  { stroke: var(--danger); }
.ring-wrapper { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.ring-label { position: absolute; text-align: center; }
.ring-label .ring-pct { font-size: 15px; font-weight: 700; display: block; line-height: 1; }
.ring-label .ring-sub { font-size: 9px; color: var(--text-3); display: block; margin-top: 1px; }

/* ── TABS ── */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── CHECKLIST ── */
.checklist-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.checklist-counter { font-size: 13px; color: var(--text-2); }
.checklist-counter strong { color: var(--text); }
.progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 20px; }
.progress-fill { height: 100%; background: var(--success); border-radius: 3px; transition: width 0.4s ease; }
.checklist-items { display: flex; flex-direction: column; gap: 2px; }
.checklist-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.15s;
}
.checklist-item:hover { border-color: var(--border-strong); }
.checklist-item.checked { background: var(--success-light); border-color: #b8dcc6; }
.checklist-item-top { display: flex; align-items: flex-start; gap: 10px; }
.checklist-cb {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}
.checklist-cb:checked {
  background: var(--success);
  border-color: var(--success);
}
.checklist-cb:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(40deg);
}
.checklist-text { flex: 1; }
.checklist-title { font-size: 13px; font-weight: 600; color: var(--text); }
.checklist-desc { font-size: 12px; color: var(--text-2); margin-top: 2px; line-height: 1.5; }
.badge-critical {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  background: var(--danger-light);
  color: var(--danger);
  margin-left: 6px;
  vertical-align: middle;
}
.checklist-item-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.note-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 12px;
  transition: color 0.15s;
}
.note-toggle:hover { color: var(--text-2); }
.note-area {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.note-area.open { display: block; }
.note-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s;
}
.note-textarea:focus { outline: none; border-color: var(--accent); }

/* ── CALLOUT BOXES ── */
.callout {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.6;
  border-left: 3px solid;
}
.callout-amber { background: var(--warning-light); border-color: var(--warning); }
.callout-blue  { background: var(--info-light);    border-color: var(--info); }
.callout-green { background: var(--success-light); border-color: var(--success); }
.callout-red   { background: var(--danger-light);  border-color: var(--danger); }
.callout-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.callout-amber .callout-label { color: var(--warning); }
.callout-blue  .callout-label { color: var(--info); }
.callout-green .callout-label { color: var(--success); }
.callout-red   .callout-label { color: var(--danger); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { background: var(--bg-card); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── FORMS ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: var(--bg-card);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.form-error { font-size: 11px; color: var(--danger); margin-top: 4px; }

/* ── TABLES ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  padding: 8px 12px;
  border-bottom: 1.5px solid var(--border);
  background: var(--bg-tertiary);
  white-space: nowrap;
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-tertiary); }

/* ── SCORE BADGES ── */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}
.score-badge.success { background: var(--success-light); color: var(--success); }
.score-badge.warning { background: var(--warning-light); color: var(--warning); }
.score-badge.danger  { background: var(--danger-light);  color: var(--danger); }

/* ── TOOL OUTPUT ── */
.tool-output-wrap {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
}
.tool-output-wrap h4 { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.tool-result table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12px; }
.tool-result table th, .tool-result table td { padding: 7px 10px; border: 1px solid var(--border); }
.tool-result table th { background: var(--bg-hover); font-weight: 600; }

/* ── PREVIOUS RUNS ── */
.prev-runs { margin-top: 24px; }
.prev-runs-toggle { background: none; border: none; color: var(--text-2); font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.prev-runs-toggle:hover { color: var(--text); }
.prev-run-item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-top: 8px; }
.prev-run-date { font-size: 11px; color: var(--text-3); margin-bottom: 6px; }

/* ── TIMELINE ── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.timeline-item:last-child { border-bottom: none; }
.timeline-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.timeline-icon.checklist { background: var(--success-light); color: var(--success); }
.timeline-icon.tool { background: var(--info-light); color: var(--info); }
.timeline-content { flex: 1; }
.timeline-label { color: var(--text); font-weight: 500; }
.timeline-time { font-size: 11px; color: var(--text-3); margin-top: 1px; }

/* ── LEARN TAB ── */
.learn-content { max-width: 760px; }
.learn-content h2 { font-size: 18px; font-weight: 700; margin: 24px 0 10px; letter-spacing: -0.2px; }
.learn-content h3 { font-size: 15px; font-weight: 600; margin: 20px 0 8px; }
.learn-content p { font-size: 13.5px; color: var(--text-2); margin-bottom: 12px; line-height: 1.7; }
.learn-content ul, .learn-content ol { padding-left: 20px; margin-bottom: 12px; }
.learn-content li { font-size: 13.5px; color: var(--text-2); margin-bottom: 5px; line-height: 1.6; }
.learn-content strong { color: var(--text); font-weight: 600; }
.core-problem-box {
  background: var(--accent-light);
  border: 1px solid #e8c4b4;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.core-problem-box .eyebrow { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 4px; }
.core-problem-box .problem-text { font-size: 16px; font-weight: 600; color: var(--text); }
.mark-read-wrap { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }

/* ── ALERTS ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  border: 1px solid;
  margin-bottom: 16px;
}
.alert-success { background: var(--success-light); border-color: #b8dcc6; color: var(--success); }
.alert-error   { background: var(--danger-light);  border-color: #e8b4b4; color: var(--danger); }
.alert-info    { background: var(--info-light);    border-color: #b8ccec; color: var(--info); }
.alert-warning { background: var(--warning-light); border-color: #e8c87a; color: var(--warning); }

/* ── BREADCRUMB ── */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--border-strong); }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-3); }
.empty-state-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.empty-state-sub { font-size: 13px; }

/* ── SPINNER ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 15px; font-weight: 600; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-3); font-size: 18px; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { padding: 20px 16px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

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