/* ─── Design Tokens ──────────────────────────────────────────────────────────── */
:root {
  --bg:          #FFFFFF;
  --bg-subtle:   #F8F9FA;
  --navy:        #1B3A6B;
  --navy-dark:   #142d54;
  --action:      #2563EB;
  --action-hover:#1d4ed8;
  --success:     #16A34A;
  --warning:     #D97706;
  --danger:      #DC2626;
  --text-primary:#111827;
  --text-secondary:#6B7280;
  --border:      #E5E7EB;
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --radius:      8px;
  --radius-lg:   12px;
  --font:        'Inter', system-ui, sans-serif;

  /* Trade accent — overridden at runtime from the active vertical's brand.
     Defaults to the action blue so the app renders correctly before /api/trades resolves. */
  --trade-accent:      #2563EB;
  --trade-accent-soft: #eff6ff;

  /* Executive accent colors — all within navy/blue palette */
  --ceo-accent:  #1B3A6B;
  --cfo-accent:  #1e4d8c;
  --cmo-accent:  #2563EB;
  --coo-accent:  #1d4ed8;
  --cto-accent:  #3b82f6;
  --cso-accent:  #0369a1;
  --hr-accent:   #0c4a6e;
}

/* ─── Progress Bar ───────────────────────────────────────────────────────────── */
#page-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--action), #60a5fa);
  z-index: 9999;
  transition: width .3s ease, opacity .4s ease;
  pointer-events: none;
}
#page-progress.done { opacity: 0; }
#page-progress { opacity: 1; }

/* ─── Skeleton ───────────────────────────────────────────────────────────────── */
@keyframes skeleton-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 600px 100%;
  animation: skeleton-shimmer 1.4s infinite linear;
  border-radius: 6px;
}
.skeleton-line       { height: 14px; margin-bottom: 8px; }
.skeleton-line.short { width: 40%; }
.skeleton-line.med   { width: 65%; }
.skeleton-line.full  { width: 100%; }
.skeleton-title      { height: 22px; width: 55%; margin-bottom: 12px; }
.skeleton-avatar     { width: 130px; height: 160px; border-radius: 0; flex-shrink: 0; }
.skeleton-card       { height: 160px; border-radius: var(--radius-lg); }
.skeleton-bubble     { height: 56px; border-radius: 12px; margin-bottom: 12px; }
.skeleton-bubble.short { width: 55%; }
.skeleton-bubble.med   { width: 75%; }

/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); color: var(--text-primary); background: var(--bg); line-height: 1.5; }
a { color: var(--action); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button { cursor: pointer; font-family: var(--font); }

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────────── */
.sidebar {
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-logo .product-name {
  /* Wordmark is three words now — sized and tightened to wrap cleanly
     inside the 240px sidebar rather than overflow it. */
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.2px;
  color: #fff;
}
.sidebar-logo .company-name {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  padding: 20px 20px 6px;
}
.sidebar nav { flex: 1; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,.75);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(255,255,255,.1); color: #fff; border-left-color: #fff; }
.nav-item .nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
}
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 12px;
  color: rgba(255,255,255,.4);
}
.sidebar-footer a { color: rgba(255,255,255,.55); }
.sidebar-footer a:hover { color: #fff; }

/* ─── Main Content ───────────────────────────────────────────────────────────── */
.main-content {
  background: var(--bg-subtle);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}
.page-header .subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.page-body { padding: 28px 32px; flex: 1; }

/* ─── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card-sm { padding: 16px; }
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  border: none;
  transition: background .15s, opacity .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover { background: var(--action-hover); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); }
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--bg-subtle); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ─── Forms ──────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg);
  transition: border-color .15s;
  appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--action);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* Multi-select checkboxes */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: 13px;
}
.checkbox-item:hover { border-color: var(--action); background: #eff6ff; }
.checkbox-item input[type="checkbox"] { accent-color: var(--action); }
.checkbox-item.checked { border-color: var(--action); background: #eff6ff; }

/* ─── Executive Portrait Card ────────────────────────────────────────────────── */
.exec-card {
  display: flex;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: #fff;
  min-height: 160px;
}

/* Portrait column */
.exec-card-portrait {
  width: 130px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: rgba(0,0,0,.25);
}
.exec-card-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}
.exec-card-portrait .exec-initials-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: rgba(255,255,255,.7);
}
/* subtle gradient overlay so portrait bleeds into info panel */
.exec-card-portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 70%, rgba(27,58,107,.6) 100%);
  pointer-events: none;
}

/* Info column */
.exec-card-info {
  flex: 1;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.exec-card-role-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 4px;
}
/* Scoped to dark portrait card — white text only here */
.exec-card-info .exec-name  { font-size: 20px; font-weight: 700; line-height: 1.2; color: #fff; }
.exec-card-info .exec-title { font-size: 13px; color: rgba(255,255,255,.7); margin-top: 2px; }
.exec-card-info .exec-tagline { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 8px; font-style: italic; line-height: 1.4; }

/* Default (light background) — used on dashboard cards, etc. */
.exec-name    { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.exec-title   { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.exec-tagline { font-size: 11px; color: var(--text-secondary); margin-top: 3px; font-style: italic; }

/* Legacy avatar — used in sidebar nav etc, keep intact */
.exec-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* ─── Chat Interface ─────────────────────────────────────────────────────────── */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 480px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  overflow: hidden;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-message {
  display: flex;
  gap: 10px;
  max-width: 88%;
}
.chat-message.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-message .msg-avatar {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  margin-top: 2px;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}
.chat-message.user .msg-avatar { background: var(--text-secondary); }
.msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.chat-message.assistant .msg-bubble {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-top-left-radius: 4px;
}
.chat-message.user .msg-bubble {
  background: var(--action);
  color: #fff;
  border-top-right-radius: 4px;
}
.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.chat-input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  resize: none;
  outline: none;
  transition: border-color .15s;
  max-height: 120px;
}
.chat-input:focus { border-color: var(--action); }
.chat-voice-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.chat-voice-btn:hover { background: var(--border); }
.chat-voice-btn.recording { background: #fee2e2; border-color: var(--danger); }

/* Voice loop states */
.chat-voice-btn.listening {
  background: #fee2e2;
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220,38,38,.15);
  animation: voice-pulse 1.2s ease-in-out infinite;
}
.chat-voice-btn.loop-ready {
  background: #eff6ff;
  border-color: var(--action);
}
.chat-voice-btn.processing {
  background: var(--bg-subtle);
  border-color: var(--border);
  opacity: 0.6;
  cursor: not-allowed;
}

@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(220,38,38,.2); }
  50%       { box-shadow: 0 0 0 7px rgba(220,38,38,.08); }
}

/* Voice status indicator */
.voice-indicator {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--text-secondary);
  min-height: 16px;
  margin-bottom: 4px;
  padding-left: 2px;
  transition: color .2s;
}
.voice-indicator.listening { color: var(--danger); }
.voice-indicator.processing { color: var(--text-secondary); }
.voice-indicator.loop { color: var(--action); }
.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 8px 12px;
}
.typing-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: typing-bounce 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

/* ─── Data Panel ─────────────────────────────────────────────────────────────── */
.data-panel { display: flex; flex-direction: column; gap: 8px; }
.kpi-row {
  /* NOT flex. `.kpi-row .kpi-main` (below) is the flex row that lays out
     label/value side by side — .kpi-row itself just stacks .kpi-main above
     .kpi-note vertically. Both rules used to flex the same way, back when a
     row was only ever label+value with nothing else in it; adding the note
     field introduced a second child without updating this one, so every row
     with a note got its two children (.kpi-main and .kpi-note) squeezed
     side-by-side into two slivers instead of stacked — which is what made
     labels and figures wrap letter by letter. */
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.kpi-row:last-child { border-bottom: none; }
.kpi-label { font-size: 13px; color: var(--text-secondary); }
.kpi-value { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.kpi-trend { font-size: 11px; margin-left: 6px; }
.kpi-trend.up { color: var(--danger); }
.kpi-trend.down { color: var(--success); }
.kpi-trend.stable { color: var(--text-secondary); }
.kpi-source { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* ─── Dashboard Grid ─────────────────────────────────────────────────────────── */
.exec-grid {
  display: grid;
  /* Every trade has exactly seven roles (CEO, CFO, CMO, COO, CTO, CSO, HR) —
     that's fixed by the manager registry, not something that varies by
     account. Fixed at 7 columns so they always sit in one row on desktop,
     rather than auto-fill wrapping the 7th card onto its own line whenever
     the window isn't quite wide enough for six 220px cards plus a seventh.
     Mobile still collapses to 1 column below 860px, see media query. */
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
  margin-top: 16px;
}

/* Portrait card — photo fills entire card, info overlays bottom with gradient */
.exec-nav-card {
  display: block;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  aspect-ratio: 2 / 3;
  background: var(--navy-dark);
  transition: transform .18s, box-shadow .18s;
}
.exec-nav-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
  text-decoration: none;
}

/* Photo — fills card */
.exec-nav-card-photo {
  position: absolute;
  inset: 0;
}
.exec-nav-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  transition: transform .35s ease;
}
.exec-nav-card:hover .exec-nav-card-photo img { transform: scale(1.04); }

.exec-nav-card-photo .exec-initials-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  font-weight: 700;
  color: rgba(255,255,255,.4);
}

/* Gradient overlay — transparent top → rich navy bottom */
.exec-nav-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 30%,
    rgba(15, 30, 60, 0.55) 60%,
    rgba(15, 30, 60, 0.92) 85%,
    rgba(15, 30, 60, 0.97) 100%
  );
  pointer-events: none;
}

/* Info — sits on top of gradient overlay */
.exec-nav-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 16px 16px;
  z-index: 1;
}
.exec-nav-card-role {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 4px;
}
.exec-nav-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.exec-nav-card-tagline {
  font-size: 11px;
  color: rgba(255,255,255,.6);
  margin-top: 4px;
  font-style: italic;
  line-height: 1.35;
}

/* ─── Board Meeting ──────────────────────────────────────────────────────────── */
.board-response {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
}
.board-response-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}
.board-response-body {
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  background: var(--bg);
}

/* ─── Alert / Toast ──────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  margin-bottom: 16px;
}
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ─── Loading Spinner ────────────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--action);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Auth Pages ─────────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  padding: 24px;
}
.auth-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}
.auth-tagline { font-size: 13px; color: var(--text-secondary); margin-bottom: 28px; }

/* ─── Onboarding Stepper ─────────────────────────────────────────────────────── */
.onboarding-page {
  min-height: 100vh;
  background: var(--bg-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px;
}
.onboarding-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 600px;
}
.onboarding-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--border);
}
.onboarding-header h1 { font-size: 20px; font-weight: 700; }
.onboarding-header p { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.progress-bar {
  height: 3px;
  background: var(--border);
  margin: 16px 0 0;
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--action);
  border-radius: 2px;
  transition: width .3s ease;
}
.onboarding-body { padding: 28px 32px; }
.onboarding-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ─── Utilities ──────────────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-secondary { color: var(--text-secondary); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .page-body { padding: 20px 16px; }
  .page-header { padding: 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .exec-grid { grid-template-columns: 1fr; }
  .onboarding-box { max-width: 100%; }
  .auth-box { padding: 28px 20px; }
}

/* ─── KPI panel provenance ─────────────────────────────────────────────────── */
.kpi-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 8px; padding: 0 2px;
  font-size: 11px; color: var(--text-secondary);
}
.kpi-meta.warn { color: var(--warning); }
.kpi-refresh { font-size: 11px; color: var(--action); text-decoration: none; }
.kpi-refresh:hover { text-decoration: underline; }
.kpi-sources { margin-top: 6px; font-size: 11px; }
.kpi-sources summary {
  cursor: pointer; color: var(--text-secondary); padding: 2px;
  list-style: none; user-select: none;
}
.kpi-sources summary::-webkit-details-marker { display: none; }
.kpi-sources summary::before { content: '▸ '; }
.kpi-sources[open] summary::before { content: '▾ '; }
.kpi-sources a {
  display: block; color: var(--action); text-decoration: none;
  padding: 3px 0 3px 12px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.kpi-sources a:hover { text-decoration: underline; }

/* KPI note — secondary figures and caveats, kept off the headline value */
.kpi-row .kpi-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kpi-note {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-secondary);
  padding-left: 8px;
  border-left: 2px solid var(--border);
}
/* break-word, not anywhere — anywhere breaks mid-word even when there's
   room to wrap at a space, which is what made ordinary values look
   fragmented before the row-layout fix above gave this column its width
   back. break-word only kicks in when a word truly can't fit. */
.kpi-value { white-space: normal; overflow-wrap: break-word; }
