/* ==========================================================================
   Veridy.ca — Dashboard SaaS Styles
   Complément au design system (style.css) — spécifique au dashboard
   ========================================================================== */

/* ===== Layout shell ===== */
/* ===== THÈME SOMBRE — cabinet d'avocats (app.html uniquement) ===== */
.app {
  /* Palette Institutionnelle — mode sombre */
  --bg-main: #0b1220;
  --bg-card: #111a2c;
  --bg-subtle: #16213a;
  --bg-accent-light: #1a2742;

  --border-color: #22304d;
  --border-hover: #33456b;
  --border-focus: #3b82f6;

  --text-primary: #e8edf7;
  --text-secondary: #b6c2d9;
  --text-muted: #8593ad;
  --text-light: #5f6f8d;

  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: #16233f;

  --secondary: #38bdf8;

  --success: #34d399;
  --success-bg: #0c221a;
  --success-border: #14532d;

  --warning: #fbbf24;
  --warning-bg: #271d05;
  --warning-border: #713f12;

  --danger: #f87171;
  --danger-bg: #2a1214;
  --danger-border: #7f1d1d;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

.app {
  display: flex;
  min-height: 100vh;
  background: var(--bg-main);
}

/* ===== Sidebar ===== */
.dash-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0d1526 0%, #111a2c 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.dash-sidebar::-webkit-scrollbar { width: 4px; }
.dash-sidebar::-webkit-scrollbar-track { background: transparent; }
.dash-sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }

/* Logo area */
.dash-logo {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-logo svg { width: 36px; height: 36px; }
.dash-logo .logo-text { display: flex; flex-direction: column; }
.dash-logo .logo-text strong { color: var(--text-primary); font-size: 18px; font-weight: 700; }
.dash-logo .logo-text small { color: var(--text-muted); font-size: 10px; }

/* Score badge */
.dash-score-badge {
  margin: 0 20px 8px;
  padding: 12px 16px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.dash-score-badge .ring-mini {
  position: relative;
  width: 36px; height: 36px;
  flex-shrink: 0;
}
.dash-score-badge .ring-mini svg { transform: rotate(-90deg); }
.dash-score-badge .ring-mini .pct {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px; font-weight: 700;
}
.dash-score-badge .score-info { display: flex; flex-direction: column; }
.dash-score-badge .score-info .label { color: var(--text-muted); font-size: 9px; font-weight: 600; letter-spacing: 1px; }
.dash-score-badge .score-info .value { color: var(--text-primary); font-size: 13px; font-weight: 600; }

/* Nav sections */
.dash-nav-section { margin-top: 12px; }
.dash-nav-section .section-label {
  padding: 8px 24px;
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Nav items */
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px 9px 12px;
  margin: 0 12px;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.dash-nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.dash-nav-item.active {
  background: rgba(30, 64, 175, 0.15);
  color: #60a5fa;
}
.dash-nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px; top: 0; bottom: 0;
  width: 3px;
  background: #3b82f6;
  border-radius: 0 2px 2px 0;
}
.dash-nav-item .nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.dash-nav-item .nav-num {
  width: 20px; text-align: center;
  color: var(--text-secondary); font-size: 10px; flex-shrink: 0;
}
.dash-nav-item .nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
}
.dash-nav-item .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-left: auto;
}
.dot-ok { background: #059669; }
.dot-warn { background: #f59e0b; }
.dot-bad { background: #dc2626; }

/* Module nav item locked */
.dash-nav-item.locked { color: var(--text-muted); cursor: not-allowed; opacity: 0.6; }
.dash-nav-item.locked:hover { background: transparent; }

/* Sidebar separator */
.dash-sep { height: 1px; background: #334155; margin: 12px 20px; }

/* Help bar */
.dash-help {
  margin: auto 20px 16px;
  padding: 16px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
}
.dash-help .help-icon { font-size: 18px; }
.dash-help .help-label { color: var(--text-muted); font-size: 9px; }
.dash-help .help-cta { color: var(--text-primary); font-size: 11px; font-weight: 600; cursor: pointer; }
.dash-help .help-sub { color: var(--text-muted); font-size: 8px; margin-top: 2px; }

/* User block */
.dash-user {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #334155;
}
.dash-user .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #1e40af;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.dash-user .user-info { display: flex; flex-direction: column; overflow: hidden; }
.dash-user .user-info .name { color: #cbd5e1; font-size: 11px; font-weight: 600; white-space: nowrap; }
.dash-user .user-info .company { color: var(--text-muted); font-size: 9px; white-space: nowrap; }

/* ===== Main area ===== */
.dash-main {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top bar */
.dash-topbar {
  height: 64px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.dash-topbar .breadcrumb { color: var(--text-muted); font-size: 13px; }
.dash-topbar .breadcrumb span { color: var(--text-primary); font-weight: 600; }
.dash-topbar .topbar-right { display: flex; align-items: center; gap: 16px; }
.dash-topbar .notif {
  position: relative;
  cursor: pointer;
  padding: 8px;
}
.dash-topbar .notif .count {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--danger);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.dash-topbar .version { color: var(--text-light); font-size: 11px; }

/* Mobile sidebar toggle */
.dash-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

/* ===== Content area ===== */
.dash-content { padding: 24px; flex: 1; }

/* Views (SPA-style) */
.dash-view { display: none; }
.dash-view.active { display: block; }

/* ===== Greeting ===== */
.dash-greeting h1 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.dash-greeting p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 24px;
}

/* ===== KPI Cards ===== */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.kpi-card .accent-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.kpi-card .kpi-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.kpi-card .kpi-value {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.kpi-card .kpi-sub { color: var(--text-muted); font-size: 10px; margin-top: 4px; }
.kpi-card .kpi-trend { color: var(--success); font-size: 10px; font-weight: 600; margin-top: 6px; }

/* Score ring inside KPI */
.kpi-card.with-ring { display: flex; align-items: center; gap: 16px; }
.score-ring-wrap { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.score-ring-wrap svg { transform: rotate(-90deg); }
.score-ring-wrap .ring-text {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.score-ring-wrap .ring-text .pct { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.score-ring-wrap .ring-text .grade { font-size: 10px; font-weight: 700; }

/* Mini badges inside KPI */
.kpi-badges { display: flex; gap: 6px; margin-top: 8px; }
.kpi-badge {
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 600;
}
.kpi-badge.urgent { background: var(--danger-bg); color: var(--danger); }
.kpi-badge.warn { background: var(--warning-bg); color: var(--warning); }

/* Progress bar */
.kpi-progress { margin-top: 10px; }
.kpi-progress .bar-bg {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 4px;
  overflow: hidden;
}
.kpi-progress .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #059669, #10b981);
  border-radius: 4px;
  transition: width 1s ease;
}
.kpi-countdown {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 7px;
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 9px;
  font-weight: 700;
  margin-top: 6px;
}

/* ===== Two-column layout ===== */
.dash-col-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.dash-col-2.uneven { grid-template-columns: 1.6fr 1fr; }

/* ===== Cards (generic) ===== */
.dash-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-md);
}
.dash-card h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.dash-card .card-sub { color: var(--text-muted); font-size: 11px; margin-bottom: 16px; }

/* ===== Next steps ===== */
.next-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-primary);
  transition: all 0.15s;
}
.next-step:hover { filter: brightness(0.97); }
.next-step.urgent { background: var(--danger-bg); }
.next-step.important { background: var(--warning-bg); }
.next-step.bonus { background: var(--success-bg); }
.next-step .step-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.next-step.urgent .step-tag { background: var(--danger); color: #fff; }
.next-step.important .step-tag { background: var(--warning); color: #fff; }
.next-step.bonus .step-tag { background: var(--success); color: #fff; }
.next-step .step-btn {
  margin-left: auto;
  padding: 4px 14px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  border: none;
}
.next-step.urgent .step-btn { background: var(--danger); }
.next-step.important .step-btn { background: var(--warning); }
.next-step.bonus .step-btn { background: var(--success); }

/* ===== Chart placeholder ===== */
.chart-wrap { padding: 8px 0; }
.chart-wrap svg { width: 100%; height: auto; }

/* ===== Activity timeline ===== */
.activity-item {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  position: relative;
}
.activity-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 16px;
  bottom: 0;
  width: 1px;
  background: var(--border-color);
}
.activity-item .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  z-index: 1;
  border: 2px solid var(--bg-card);
}
.activity-item .dot.blue { background: var(--primary); }
.activity-item .dot.green { background: var(--success); }
.activity-item .dot.orange { background: var(--warning); }
.activity-item .act-text { color: var(--text-primary); font-size: 11px; }
.activity-item .act-date { color: var(--text-light); font-size: 9px; margin-top: 2px; }

/* ===== Modules grid ===== */
.modules-section { margin-top: 8px; }
.modules-section h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.modules-section .section-sub { color: var(--text-muted); font-size: 11px; margin-bottom: 16px; }
.modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.module-card {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 14px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.module-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.module-card .mod-accent {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
}
.module-card .mod-num { color: var(--text-light); font-size: 9px; font-weight: 600; }
.module-card .mod-title { font-size: 12px; font-weight: 700; color: var(--text-primary); margin: 2px 0; }
.module-card .mod-art { color: var(--text-muted); font-size: 9px; }
.module-card .mod-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 7px;
  font-size: 8px;
  font-weight: 700;
  margin-top: 6px;
}
.mod-badge.ok { background: var(--success-bg); color: var(--success); }
.mod-badge.warn { background: var(--warning-bg); color: var(--warning); }
.mod-badge.bad { background: var(--danger-bg); color: var(--danger); }

.module-card.locked { opacity: 0.5; cursor: not-allowed; border-style: dashed; }
.module-card.locked:hover { transform: none; box-shadow: none; }

/* Upgrade CTA card */
.upgrade-card {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.upgrade-card .upg-title { color: #fff; font-size: 14px; font-weight: 700; }
.upgrade-card .upg-sub { color: #bfdbfe; font-size: 10px; margin-top: 4px; }
.upgrade-card .upg-btn {
  margin-left: auto;
  padding: 7px 18px;
  background: var(--bg-card);
  border-radius: 14px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

/* ===== Module detail page ===== */
.module-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.module-header h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}
.module-header .back-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
}
.module-header .back-btn:hover { background: var(--bg-subtle); }

.module-status-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.status-badge-lg {
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}
.status-badge-lg.warn { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }

.progress-bar-lg {
  flex: 1;
  min-width: 200px;
}
.progress-bar-lg .pbar-bg {
  height: 10px;
  background: var(--bg-subtle);
  border-radius: 5px;
  overflow: hidden;
}
.progress-bar-lg .pbar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--warning), #fbbf24);
  border-radius: 5px;
  transition: width 1.5s ease;
}
.progress-bar-lg .pbar-label {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-muted);
}

/* Law quote box */
.law-quote {
  background: var(--bg-accent-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.law-quote .law-label {
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}
.law-quote .law-text {
  color: var(--text-secondary);
  font-size: 13px;
  font-style: italic;
  line-height: 1.6;
}

/* AI section */
.ai-section {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
}
.ai-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.ai-section .detected-list {
  list-style: none;
  padding: 0;
}
.ai-section .detected-list li {
  padding: 6px 0;
  font-size: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-section .detected-list li::before {
  content: '•';
  color: var(--danger);
  font-weight: 700;
  font-size: 16px;
}
.ai-section .ai-rec {
  background: var(--bg-accent-light);
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 12px;
  font-style: italic;
}

/* Checklist */
.checklist { list-style: none; padding: 0; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-primary);
}
.checklist li:last-child { border-bottom: none; }
.checklist .ck {
  width: 20px; height: 20px;
  border: 2px solid var(--border-hover);
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.checklist .ck.checked {
  background: var(--success);
  border-color: var(--success);
}
.checklist .ck.checked::after {
  content: '✓';
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

/* Expert validation box */
.expert-box {
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.expert-box .expert-icon { font-size: 32px; }
.expert-box .expert-info { flex: 1; }
.expert-box .expert-info .label { color: var(--text-muted); font-size: 11px; }
.expert-box .expert-info .value { color: var(--text-primary); font-size: 13px; font-weight: 600; margin-top: 2px; }

/* Module footer buttons */
.module-footer {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* ===== Settings ===== */
.settings-section { margin-bottom: 24px; }
.settings-section h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-card);
  font-family: var(--font-sans);
  transition: border-color 0.15s;
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,64,175,0.1); }

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row .t-label { font-size: 13px; color: var(--text-primary); }
.toggle-row .t-sub { font-size: 10px; color: var(--text-muted); }
.toggle {
  width: 44px; height: 24px;
  background: var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle.on { background: var(--primary); }
.toggle::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  background: var(--bg-card);
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle.on::after { transform: translateX(20px); }

/* ===== Billing ===== */
.billing-current {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.plan-card {
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a8a 100%);
  border-radius: 12px;
  padding: 24px;
  color: #fff;
}
.plan-card .plan-name {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
.plan-card .plan-price { font-size: 28px; font-weight: 700; }
.plan-card .plan-renew { color: #bfdbfe; font-size: 11px; margin-top: 4px; }
.plan-card .plan-features { list-style: none; padding: 0; margin: 16px 0; }
.plan-card .plan-features li {
  padding: 4px 0;
  font-size: 12px;
  color: #dbeafe;
  display: flex; align-items: center; gap: 8px;
}
.plan-card .plan-features li::before { content: '✓'; color: #60a5fa; font-weight: 700; }

.payment-card, .usage-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.invoice-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.invoice-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}
.invoice-table td {
  padding: 12px;
  font-size: 12px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}
.invoice-table .status-paid {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 10px;
  font-weight: 600;
}

/* ===== Onboarding ===== */
.onboarding-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px;
}
.onboarding-header { text-align: center; margin-bottom: 32px; }
.onboarding-header h1 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 16px 0 8px;
}
.onboarding-header p { color: var(--text-muted); font-size: 14px; }

.onboarding-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
}
.ob-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}
.ob-step .circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 2px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  z-index: 2;
}
.ob-step.active .circle { background: var(--primary); border-color: var(--primary); color: #fff; }
.ob-step.done .circle { background: var(--success); border-color: var(--success); color: #fff; }
.ob-step .step-text { font-size: 10px; color: var(--text-muted); font-weight: 600; }
.ob-step.active .step-text { color: var(--primary); }
.ob-connector {
  width: 60px; height: 3px;
  background: var(--border-color);
  margin-bottom: 24px;
}
.ob-connector.done { background: var(--success); }

.onboarding-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.onboarding-card h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}
.radio-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.radio-option {
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
  text-align: center;
}
.radio-option:hover { border-color: var(--primary); }
.radio-option.selected { border-color: var(--primary); background: var(--bg-accent-light); color: var(--primary); font-weight: 600; }

.ob-footer { display: flex; justify-content: space-between; margin-top: 24px; }

/* ===== Buttons ===== */
.btn-primary-lg {
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.15s;
}
.btn-primary-lg:hover { background: var(--primary-hover); }
.btn-secondary-lg {
  padding: 10px 24px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
}
.btn-secondary-lg:hover { border-color: var(--border-hover); }
.btn-danger {
  padding: 8px 16px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* ===== Onboarding ===== */
.onboarding-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px;
}
.onboarding-header { text-align: center; margin-bottom: 32px; }
.onboarding-header .ob-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 16px; }
.onboarding-header .ob-logo svg { width: 40px; height: 40px; }
.onboarding-header .ob-logo strong { color: var(--text-primary); font-size: 22px; font-weight: 700; }
.onboarding-header h1 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.onboarding-header p { color: var(--text-muted); font-size: 14px; }

.onboarding-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}
.ob-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.ob-step .circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 2px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  color: var(--text-muted);
  z-index: 2;
  transition: all 0.3s;
}
.ob-step.active .circle { background: var(--primary); border-color: var(--primary); color: #fff; }
.ob-step.done .circle { background: var(--success); border-color: var(--success); color: #fff; }
.ob-step .step-text { font-size: 10px; color: var(--text-muted); font-weight: 600; }
.ob-step.active .step-text { color: var(--primary); }
.ob-connector { width: 50px; height: 3px; background: var(--border-color); margin-bottom: 22px; }
.ob-connector.done { background: var(--success); }

.onboarding-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.ob-step-view { display: none; }
.ob-step-view.active { display: block; }
.onboarding-card h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* Radio group for employee count */
.radio-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.radio-option {
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  text-align: center;
  transition: all 0.15s;
  background: var(--bg-card);
  color: var(--text-primary);
}
.radio-option:hover { border-color: var(--primary); }
.radio-option.selected { border-color: var(--primary); background: var(--bg-accent-light); color: var(--primary); font-weight: 600; }

/* Scan animation */
.ob-scan-area { text-align: center; padding: 32px 0; }
.ob-scan-spinner {
  width: 64px; height: 64px;
  margin: 0 auto 24px;
  border-radius: 50%;
  border: 4px solid var(--bg-subtle);
  border-top-color: var(--primary);
  animation: ob-spin 1s linear infinite;
}
@keyframes ob-spin { to { transform: rotate(360deg); } }
.ob-scan-status { color: var(--text-secondary); font-size: 14px; margin-bottom: 16px; }
.ob-scan-log {
  text-align: left;
  background: var(--bg-subtle);
  border-radius: 10px;
  padding: 16px;
  font-size: 11px;
  font-family: monospace;
  color: var(--text-muted);
  max-height: 200px;
  overflow-y: auto;
  margin-top: 16px;
}
.ob-scan-log .log-entry { padding: 2px 0; }
.ob-scan-log .log-entry .ts { color: var(--text-light); margin-right: 8px; }

/* Result step */
.ob-result-grade {
  text-align: center;
  margin-bottom: 24px;
}
.ob-result-grade .grade-circle {
  width: 120px; height: 120px;
  margin: 0 auto 16px;
  position: relative;
}
.ob-result-grade .grade-circle svg { transform: rotate(-90deg); }
.ob-result-grade .grade-circle .gc-text {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.ob-result-grade .gc-text .gc-pct { font-size: 28px; font-weight: 700; color: var(--text-primary); }
.ob-result-grade .gc-text .gc-grade { font-size: 16px; font-weight: 700; }

.ob-result-modules {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 24px 0;
}
.ob-result-module {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  background: var(--bg-subtle);
}
.ob-result-module .rm-icon { font-size: 16px; }
.ob-result-module .rm-status { margin-left: auto; font-size: 14px; }
.ob-result-module.rm-ok .rm-status { color: var(--success); }
.ob-result-module.rm-warn .rm-status { color: var(--warning); }
.ob-result-module.rm-bad .rm-status { color: var(--danger); }

.ob-footer { display: flex; justify-content: space-between; margin-top: 24px; }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .modules-grid { grid-template-columns: repeat(3, 1fr); }
  .upgrade-card { grid-column: span 3; }
  .billing-current { grid-template-columns: 1fr; }
  .dash-col-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .dash-sidebar { transform: translateX(-100%); }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-main { margin-left: 0; }
  .dash-mobile-toggle { display: block; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .modules-grid { grid-template-columns: repeat(2, 1fr); }
  .upgrade-card { grid-column: span 2; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .kpi-row { grid-template-columns: 1fr; }
  .modules-grid { grid-template-columns: 1fr; }
  .upgrade-card { grid-column: span 1; }
  .dash-content { padding: 16px; }
  .radio-group { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════
   EFVP WIZARD (module 3) — v5
   ══════════════════════════════════════════════════════════════════ */
.efvp-steps { display:flex; align-items:center; gap:8px; margin-bottom:24px; }
.efvp-step {
  width:34px; height:34px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center;
  font-size:0.9rem; font-weight:700; border:2px solid var(--border-color); color:var(--text-muted); background:var(--bg-card);
}
.efvp-step.active { border-color:var(--primary); color:var(--primary); background:rgba(59,130,246,0.08); }
.efvp-step.done { border-color:var(--success); color:var(--success); background:var(--success-bg); }
.efvp-step-sep { flex:1; height:2px; background:#e2e8f0; border-radius:1px; }

.efvp-option {
  display:flex; align-items:flex-start; gap:10px; padding:12px 14px; border:1.5px solid #e2e8f0;
  border-radius:10px; margin-bottom:8px; cursor:pointer; transition:all .15s; background:var(--bg-card);
}
.efvp-option:hover { border-color:#93c5fd; background:#f8fafd; }
.efvp-option input { margin-top:3px; accent-color:var(--primary); }
.efvp-option input:checked + span { font-weight:600; color:var(--primary); }

.efvp-label { display:block; font-weight:600; margin:8px 0 12px; }
.efvp-subtitle { color:var(--text-tertiary); font-size:0.9rem; margin:2px 0 8px; }
.efvp-input {
  width:100%; box-sizing:border-box; padding:11px 14px; border:1.5px solid #e2e8f0; border-radius:10px;
  font-size:1rem; font-family:inherit;
}
.efvp-input:focus { outline:none; border-color:var(--primary); }
.efvp-nav { display:flex; justify-content:space-between; margin-top:24px; gap:12px; }

.efvp-verdict h3 { margin-bottom:14px; }
.verdict-list { list-style:none; padding:0; }
.verdict-list li {
  padding:12px 14px; border-radius:8px; margin-bottom:8px; font-size:0.95rem;
  display:flex; align-items:center; gap:10px;
}
.verdict-list li.v-on { background:var(--danger-bg); color:#b91c1c; border-left:4px solid #dc2626; }
.verdict-list li.v-off { background:#f0fdf4; color:#15803d; border-left:4px solid #16a34a; }
.efvp-note { font-size:0.85rem; color:var(--text-tertiary); background:var(--bg-subtle); padding:12px 14px; border-radius:8px; }

.wizard-cta-box {
  background:linear-gradient(135deg, rgba(30,64,175,0.06), rgba(124,58,237,0.06));
  border:1.5px solid rgba(30,64,175,0.25); border-radius:12px; padding:18px 20px;
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
}
.wizard-cta-text { font-weight:600; }

/* ══════════════════════════════════════════════════════════════════
   FLUX DE DÉCISIONS EN DIRECT (module 6) — v6
   ══════════════════════════════════════════════════════════════════ */
.feed-screen { margin: 26px 0; padding: 22px; background: #0f172a; border-radius: 14px; color: var(--border-color); }
.feed-title { color: #fff; font-size: 1.15rem; margin: 0 0 6px; }
.feed-live { display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 999px; background: #14532d; color: #4ade80; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.feed-live::before { content: "● "; color: #4ade80; animation: feedpulse 1.6s infinite; }
@keyframes feedpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.feed-sub { color: var(--text-muted); font-size: 0.88rem; margin: 0 0 16px; }
.feed-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.fstat { background: #1e293b; border: 1px solid #334155; border-radius: 10px; padding: 10px 16px; min-width: 130px; }
.fstat strong { display: block; color: #38bdf8; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.fstat span { color: var(--text-muted); font-size: 0.75rem; }
.feed-controls { margin-bottom: 12px; }
.feed-table { background: #0b1220; border: 1px solid #1e293b; border-radius: 10px; min-height: 120px; overflow: hidden; }
.feed-row { display: grid; grid-template-columns: 64px 1.6fr 1.1fr 1.3fr 0.9fr 110px 90px; gap: 10px; padding: 9px 14px; border-bottom: 1px solid #1e293b; font-size: 0.78rem; align-items: center; animation: feedin 0.4s ease; }
@keyframes feedin { from { background: #1e3a5f; } to { background: transparent; } }
.feed-row:last-child { border-bottom: none; }
.feed-time { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.feed-sys strong { color: #e2e8f0; display: block; font-size: 0.8rem; }
.feed-chain { display:block; font-size:0.72rem; color:#6366f1; font-weight:500; margin-top:1px; }
.feed-dep-warn { color:#dc2626; font-weight:700; font-size:0.7rem; }
.feed-model { color: var(--text-muted); font-size: 0.7rem; }
.feed-outcome { color: #cbd5e1; }
.feed-factors { color: var(--text-muted); font-size: 0.72rem; }
.feed-trigger { color: var(--text-muted); }
.feed-tag { font-weight: 700; font-size: 0.7rem; padding: 3px 8px; border-radius: 6px; text-align: center; }
.tag-121 { background: rgba(153, 27, 27, 0.35); color: #fca5a5; border: 1px solid #991b1b; }
.tag-ok { background: rgba(20, 83, 45, 0.35); color: #4ade80; border: 1px solid #166534; }
.tag-warn { background: rgba(120, 53, 15, 0.35); color: #fcd34d; border: 1px solid #92400e; }
.feed-hash { color: var(--text-secondary); font-family: ui-monospace, monospace; font-size: 0.7rem; }
.feed-empty { padding: 40px; text-align: center; color: var(--text-muted); }
.feed-note { color: var(--text-muted); font-size: 0.75rem; margin-top: 12px; }

/* Fil rouge impossibilité humaine */
.module-impossible { margin: 14px 0; padding: 14px 18px; background: linear-gradient(135deg, var(--warning-bg), #2d2308); border-left: 4px solid #f59e0b; border-radius: 8px; color: #78350f; font-size: 0.92rem; font-weight: 500; }

@media (max-width: 900px) {
  .feed-row { grid-template-columns: 1fr 1fr; font-size: 0.75rem; }
  .feed-time, .feed-hash { display: none; }
}

/* Bandeau live overview */
.live-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; padding: 12px 18px; background: #0f172a; border-radius: 10px; color: #e2e8f0; font-size: 0.85rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; animation: feedpulse 1.6s infinite; }


/* ============================================================
   MOBILE RESPONSIVE ENHANCEMENTS (app.html & dashboard)
   ============================================================ */
@media (max-width: 768px) {
  .dash-content {
    padding: 12px !important;
  }
  .dash-greeting h1 {
    font-size: 1.35rem !important;
  }
  .dash-greeting p {
    font-size: 0.82rem !important;
  }
  .kpi-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .kpi-card {
    padding: 12px !important;
  }
  .kpi-card .value {
    font-size: 1.3rem !important;
  }
  .modules-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .dash-sidebar {
    width: 280px !important;
    box-shadow: 0 0 30px rgba(0,0,0,0.5) !important;
  }
  .efvp-steps {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .efvp-step {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.8rem !important;
  }
  .efvp-nav {
    flex-direction: column-reverse !important;
    gap: 8px !important;
  }
  .efvp-nav button, .efvp-nav a {
    width: 100% !important;
    text-align: center !important;
  }
  .module-detail {
    padding: 16px !important;
  }
  .wizard-cta-box {
    flex-direction: column !important;
    align-items: stroke !important;
    text-align: center !important;
  }
  .wizard-cta-box button {
    width: 100% !important;
  }
}


/* ============================================================
   MOBILE RESPONSIVE OVERHAUL & SIDEBAR OVERLAY FIX
   ============================================================ */
.dash-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 99;
}
.dash-sidebar-overlay.active {
  display: block;
}

@media (max-width: 900px) {
  .dash-main {
    margin-left: 0 !important;
    width: 100% !important;
  }
  .dash-topbar {
    padding: 12px 16px !important;
  }
  .dash-mobile-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--bg-accent-light);
    border-radius: 8px;
    padding: 6px 10px;
    border: 1px solid #bfdbfe;
  }
  .dash-sidebar {
    position: fixed !important;
    top: 0; left: 0; bottom: 0;
    width: 280px !important;
    z-index: 1000 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 10px 0 25px rgba(0,0,0,0.3) !important;
  }
  .dash-sidebar.open {
    transform: translateX(0) !important;
  }
  /* Close button inside mobile sidebar header */
  .dash-sidebar-close {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 32px; height: 32px;
    border-radius: 6px;
    cursor: pointer;
  }
}

@media (max-width: 640px) {
  .dash-content {
    padding: 12px !important;
  }
  .dash-greeting h1 {
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
  }
  .dash-greeting p {
    font-size: 0.8rem !important;
  }
  .kpi-row {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .modules-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .module-card {
    padding: 16px !important;
  }
  .live-banner {
    font-size: 0.78rem !important;
    padding: 10px 12px !important;
  }
  .efvp-steps {
    justify-content: space-between !important;
  }
  .efvp-step-sep {
    display: none !important;
  }
  .wizard-cta-box {
    padding: 14px !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .wizard-cta-box button {
    width: 100% !important;
    margin-top: 10px !important;
  }
}


/* ============================================================
   TOAST NOTIFICATIONS & PLATFORM AUDIT POLISH
   ============================================================ */
.dash-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #3b82f6;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.4), 0 0 15px rgba(59,130,246,0.3);
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.dash-toast.toast-pdf {
  border-color: #10b981;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.4), 0 0 15px rgba(16,185,129,0.3);
}

@media (max-width: 640px) {
  .dash-toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    font-size: 0.82rem;
    padding: 12px 14px;
  }
}

/* ===== OVERVIEW v2: grille agents + timeline CAI ===== */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.agent-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.agent-card .agent-ic { font-size: 22px; }
.agent-card .agent-name { font-weight: 600; font-size: 13px; color: var(--text-primary); margin-top: 6px; line-height: 1.35; }
.agent-card .agent-meta { font-size: 10.5px; color: var(--text-muted); margin-top: 3px; }
.agent-card .agent-row2 { margin-top: 8px; }
.agent-pill {
  display: inline-block;
  font-size: 9.5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 4px;
  padding: 2px 7px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-flag { font-size: 9px; color: var(--danger); font-weight: 700; }
.agent-card.script { border-left: 3px solid var(--secondary); }
.agent-card.mem { border-left: 3px solid #8b5cf6; }
.agent-card.rpsafe { border-left: 3px solid var(--success); }

/* Timeline CAI */
.cai-timeline { margin-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.cai-step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 14px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  font-size: 12.5px; color: var(--text-primary);
}
.cai-step.done { opacity: 0.95; }
.cai-step.todo { opacity: 0.75; border-style: dashed; }
.cai-dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}
.cai-step.done .cai-dot { background: var(--success-bg); color: var(--success); border: 1px solid var(--success); }
.cai-step.todo .cai-dot { background: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border-color); }


/* ============================================================
   EXPLICIT STATUS DOTS & TOOLTIPS FOR SIDEBAR MODULES
   ============================================================ */
.dash-nav-item .dot {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dot-ok {
  background: #10b981 !important;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}
.dot-warn {
  background: #f59e0b !important;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}
.dot-bad {
  background: #ef4444 !important;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

/* Tooltip on hover over dot */
.dash-nav-item .dot::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: #0f172a;
  color: #f8fafc;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border: 1px solid #334155;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 100;
}

.dash-nav-item:hover .dot::after {
  opacity: 1;
}


/* ============================================================
   EXECUTIVE MONOCHROME / TON-SUR-TON STATUS BADGES
   ============================================================ */
.dash-nav-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0.8;
  transition: all 0.2s ease;
}

/* Ton-sur-ton executive palette (no bright green/red/yellow) */
.dot-ok {
  background: #94a3b8 !important; /* Subtle Slate */
  box-shadow: none !important;
}
.dot-warn {
  background: #64748b !important; /* Medium Slate */
  box-shadow: none !important;
}
.dot-bad {
  background: #475569 !important; /* Darker Slate accent */
  box-shadow: none !important;
}

.dash-nav-item:hover .dot {
  opacity: 1;
  background: #cbd5e1 !important;
  transform: scale(1.2);
}

.dash-nav-item.active .dot {
  background: #38bdf8 !important; /* Electric Cyan match active theme */
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5) !important;
}


/* COMPLETELY HIDE SIDEBAR COLORED DOTS IN MODULE NAV ITEMS */
.dash-nav-item .dot {
  display: none !important;
}


/* ============================================================
   ENHANCED LIVE DECISION FEED ANIMATION & GLOW EFFECTS
   ============================================================ */
@keyframes feedin {
  0% {
    opacity: 0;
    transform: translateY(-8px);
    background: rgba(56, 189, 248, 0.18);
  }
  50% {
    background: rgba(16, 185, 129, 0.15);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    background: transparent;
  }
}

.feed-row {
  animation: feedin 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
  transition: background 0.3s ease;
}

.feed-row:hover {
  background: rgba(30, 41, 59, 0.6) !important;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981 !important;
  box-shadow: 0 0 10px #10b981, 0 0 20px #10b981 !important;
  animation: feedpulse 1.4s infinite !important;
}


/* NOOB FRIENDLY LIVE FEED EXPLANATION BANNER */
.noob-explain-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border: 1px solid #3b82f6;
  border-radius: 12px;
  padding: 14px 20px;
  margin-bottom: 16px;
  color: #f8fafc;
}
.noob-explain-banner .ic { font-size: 1.6rem; flex-shrink: 0; }
.noob-explain-banner .txt { font-size: 0.88rem; line-height: 1.5; color: #cbd5e1; }
.noob-explain-banner strong { color: #38bdf8; }


/* NEUTRAL EXPLICIT FEED ROW STYLES (NO RED HIGHLIGHTS) */
.feed-row.tag-121 {
  background: transparent !important;
  border-left: 3px solid #38bdf8 !important;
}
.feed-row.tag-ok {
  background: transparent !important;
  border-left: 3px solid #10b981 !important;
}
.feed-row.tag-warn {
  background: transparent !important;
  border-left: 3px solid #f59e0b !important;
}
.tag-121 {
  background: rgba(30, 41, 59, 0.8) !important;
  color: #38bdf8 !important;
  border: 1px solid #334155 !important;
}
