/* ── DESIGN TOKENS ──────────────────────────────────────────────────────────── */
:root {
  --navy:        #0D2137;
  --navy-mid:    #0D3A4A;
  --navy-light:  #1A4A5E;
  --teal:        #0A7E8C;
  --teal-lt:     #12A4B4;
  --teal-xlt:    #5ECFDB;
  --gold:        #F4A830;
  --gold-lt:     #FAC84A;
  --white:       #FFFFFF;
  --ice:         #CADCFC;
  --muted:       #7A92A3;
  --border:      rgba(10, 126, 140, 0.25);
  --border-gold: rgba(244, 168, 48, 0.3);
  --surface:     rgba(13, 58, 74, 0.6);
  --surface-lt:  rgba(26, 74, 94, 0.4);

  --font-sans: "DM Sans", sans-serif;
  --font-mono: "DM Mono", monospace;
}

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

body {
  font-family:      var(--font-sans);
  background-color: var(--navy);
  color:            var(--white);
  font-size:        14px;
  line-height:      1.5;
  min-height:       100vh;
  overflow-x:       hidden;
}

/* Subtle grid texture on body */
body::before {
  content:    "";
  position:   fixed;
  inset:      0;
  background-image:
    linear-gradient(rgba(10, 126, 140, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 126, 140, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index:    0;
}

/* ── LAYOUT ─────────────────────────────────────────────────────────────────── */
html, body, #root {
  height:   100%;
  width:    100%;
  overflow: hidden;
}

#root { position: relative; z-index: 1; }

.app {
  display:        flex;
  flex-direction: column;
  height:         100%;
  width:          100%;
  padding:        0;
  overflow:       hidden;
}

/* ── HEADER ─────────────────────────────────────────────────────────────────── */
.header {
  display:          flex;
  align-items:      center;
  justify-content:  space-between;
  padding:          14px 24px;
  background:       rgba(13, 33, 55, 0.95);
  border-bottom:    1px solid var(--border);
  flex-shrink:      0;
}

.header-left {
  display:     flex;
  align-items: center;
  gap:         12px;
}

.header-logo {
  width:           32px;
  height:          32px;
  background:      var(--teal);
  border-radius:   6px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-family:     var(--font-mono);
  font-size:       13px;
  font-weight:     500;
  color:           var(--navy);
  letter-spacing:  -0.5px;
  flex-shrink:     0;
}

.header-title {
  font-size:      15px;
  font-weight:    500;
  letter-spacing: 0.02em;
  color:          var(--white);
}

.header-subtitle {
  font-size:   11px;
  color:       var(--muted);
  font-family: var(--font-mono);
  margin-top:  1px;
}

.header-right {
  display:     flex;
  align-items: center;
  gap:         16px;
}

.header-meta {
  font-family: var(--font-mono);
  font-size:   11px;
  color:       var(--muted);
  text-align:  right;
}

.header-meta span {
  display:    block;
  margin-top: 2px;
}

.header-meta .val {
  color:      var(--teal-xlt);
  font-size:  12px;
}

/* ── OVERALL STATUS BADGE ────────────────────────────────────────────────────── */
.status-badge {
  display:       flex;
  align-items:   center;
  gap:           7px;
  padding:       5px 12px;
  border-radius: 20px;
  font-size:     12px;
  font-weight:   500;
  font-family:   var(--font-mono);
  border:        1px solid;
  transition:    all 0.3s ease;
}

.status-badge.pass {
  background:   rgba(10, 126, 140, 0.15);
  border-color: rgba(10, 126, 140, 0.5);
  color:        var(--teal-xlt);
}

.status-badge.fail {
  background:   rgba(220, 60, 60, 0.15);
  border-color: rgba(220, 60, 60, 0.5);
  color:        #ff6b6b;
}

.status-badge.loading {
  background:   rgba(122, 146, 163, 0.15);
  border-color: rgba(122, 146, 163, 0.3);
  color:        var(--muted);
}

.pulse-dot {
  width:         8px;
  height:        8px;
  border-radius: 50%;
  flex-shrink:   0;
}

.pulse-dot.green {
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation:  pulse-green 2s infinite;
}

.pulse-dot.red {
  background: #f87171;
  box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.6);
  animation:  pulse-red 2s infinite;
}

.pulse-dot.gray {
  background: var(--muted);
}

@keyframes pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
  70%  { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

@keyframes pulse-red {
  0%   { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.6); }
  70%  { box-shadow: 0 0 0 6px rgba(248, 113, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}

/* ── MAIN GRID ───────────────────────────────────────────────────────────────── */
.main-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows:    auto auto;
  gap:                   1px;
  flex:                  1;
  background:            var(--border);
}

.main-grid > * {
  background: var(--navy);
}

/* ── PANELS ─────────────────────────────────────────────────────────────────── */
.panel {
  padding:    20px 24px;
  min-height: 280px;
}

.panel-wide {
  grid-column: 1 / -1;
}

.panel-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  margin-bottom:   16px;
}

.panel-title {
  font-size:      11px;
  font-weight:    500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--teal-lt);
  font-family:    var(--font-mono);
}

.panel-count {
  font-family: var(--font-mono);
  font-size:   11px;
  color:       var(--muted);
}

/* ── ROLE CARDS ─────────────────────────────────────────────────────────────── */
.role-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   10px;
}

.role-card {
  padding:       14px 16px;
  border:        1px solid var(--border);
  border-radius: 8px;
  background:    var(--surface);
  transition:    border-color 0.2s;
  cursor:        default;
}

.role-card:hover { border-color: rgba(10, 126, 140, 0.5); }

.role-card-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  margin-bottom:   8px;
}

.role-name {
  font-size:   11px;
  font-weight: 500;
  color:       var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.role-icon {
  width:           22px;
  height:          22px;
  border-radius:   4px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       11px;
}

.role-icon.teal   { background: rgba(10, 126, 140, 0.25); color: var(--teal-xlt); }
.role-icon.gold   { background: rgba(244, 168, 48, 0.2);  color: var(--gold); }
.role-icon.blue   { background: rgba(100, 160, 220, 0.2); color: #7ab8f5; }
.role-icon.purple { background: rgba(140, 100, 200, 0.2); color: #b89ff5; }

.role-count {
  font-family: var(--font-mono);
  font-size:   28px;
  font-weight: 500;
  color:       var(--white);
  line-height: 1;
  margin-bottom: 4px;
}

.role-desc {
  font-size: 11px;
  color:     var(--muted);
}

/* ── VERIFY CHECKS ──────────────────────────────────────────────────────────── */
.check-list {
  display:        flex;
  flex-direction: column;
  gap:            8px;
}

.check-item {
  display:       flex;
  align-items:   flex-start;
  gap:           10px;
  padding:       10px 12px;
  border-radius: 6px;
  border:        1px solid transparent;
  transition:    all 0.2s;
}

.check-item.pass {
  background:   rgba(74, 222, 128, 0.05);
  border-color: rgba(74, 222, 128, 0.15);
}

.check-item.fail {
  background:   rgba(248, 113, 113, 0.07);
  border-color: rgba(248, 113, 113, 0.2);
}

.check-item.loading {
  background:   var(--surface);
  border-color: var(--border);
}

.check-icon {
  font-family: var(--font-mono);
  font-size:   12px;
  min-width:   16px;
  margin-top:  1px;
  font-weight: 500;
}

.check-icon.pass    { color: #4ade80; }
.check-icon.fail    { color: #f87171; }
.check-icon.loading { color: var(--muted); }

.check-body { flex: 1; }

.check-name {
  font-size:   12px;
  font-weight: 500;
  color:       var(--white);
  margin-bottom: 2px;
}

.check-msg {
  font-family: var(--font-mono);
  font-size:   11px;
  color:       var(--muted);
  line-height: 1.4;
}

.check-msg.fail { color: #fca5a5; }

/* ── POLICY MATRIX ──────────────────────────────────────────────────────────── */
.matrix-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 420px;
}

.matrix-table {
  width:           100%;
  border-collapse: collapse;
  min-width:       600px;
}

.matrix-table th {
  font-family:    var(--font-mono);
  font-size:      10px;
  font-weight:    500;
  color:          var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding:        6px 10px;
  text-align:     left;
  border-bottom:  1px solid var(--border);
  white-space:    nowrap;
  position:       sticky;
  top:            0;
  background:     var(--navy);
  z-index:        2;
}

.matrix-table td {
  padding:      8px 10px;
  border-bottom: 1px solid rgba(10, 126, 140, 0.1);
  vertical-align: middle;
}

.matrix-table tr:hover td {
  background: rgba(10, 126, 140, 0.05);
}

.matrix-table tr:last-child td {
  border-bottom: none;
}

.user-email {
  font-family: var(--font-mono);
  font-size:   12px;
  color:       var(--ice);
}

.role-pill {
  display:       inline-flex;
  align-items:   center;
  padding:       2px 8px;
  border-radius: 3px;
  font-family:   var(--font-mono);
  font-size:     10px;
  font-weight:   500;
  letter-spacing: 0.04em;
  white-space:   nowrap;
}

.role-pill.finance_admin  { background: rgba(244, 168, 48, 0.15);  color: var(--gold); }
.role-pill.executive      { background: rgba(244, 168, 48, 0.1);   color: var(--gold-lt); }
.role-pill.specialty_analyst { background: rgba(10, 126, 140, 0.2); color: var(--teal-xlt); }
.role-pill.regional_sales    { background: rgba(100, 160, 220, 0.2); color: #7ab8f5; }

.access-cell {
  font-size:   12px;
  color:       var(--muted);
}

.access-all {
  font-family:  var(--font-mono);
  font-size:    11px;
  color:        var(--gold);
  font-weight:  500;
}

.access-filter {
  font-family:  var(--font-mono);
  font-size:    11px;
  color:        var(--teal-xlt);
}

.access-states {
  display:    flex;
  flex-wrap:  wrap;
  gap:        3px;
  max-width:  300px;
}

.state-chip {
  padding:       1px 5px;
  background:    rgba(100, 160, 220, 0.15);
  border:        1px solid rgba(100, 160, 220, 0.25);
  border-radius: 3px;
  font-family:   var(--font-mono);
  font-size:     10px;
  color:         #7ab8f5;
}

.notes-cell {
  font-size: 11px;
  color:     var(--muted);
  max-width: 180px;
}

/* ── AI EXPLAIN PANEL ────────────────────────────────────────────────────────── */
.ai-panel {
  display:        flex;
  flex-direction: column;
  gap:            14px;
}

.ai-trigger-btn {
  display:          flex;
  align-items:      center;
  gap:              8px;
  padding:          10px 16px;
  background:       rgba(10, 126, 140, 0.15);
  border:           1px solid rgba(10, 126, 140, 0.4);
  border-radius:    6px;
  color:            var(--teal-xlt);
  font-family:      var(--font-mono);
  font-size:        12px;
  font-weight:      500;
  cursor:           pointer;
  transition:       all 0.2s;
  width:            100%;
  justify-content:  center;
  letter-spacing:   0.04em;
}

.ai-trigger-btn:hover:not(:disabled) {
  background:   rgba(10, 126, 140, 0.25);
  border-color: rgba(10, 126, 140, 0.7);
}

.ai-trigger-btn:disabled {
  opacity: 0.5;
  cursor:  not-allowed;
}

.ai-icon {
  font-size: 14px;
}

.ai-output {
  flex:             1;
  padding:          14px 16px;
  background:       var(--surface);
  border:           1px solid var(--border);
  border-radius:    6px;
  min-height:       160px;
  position:         relative;
  overflow:         hidden;
}

.ai-output-label {
  font-family:    var(--font-mono);
  font-size:      10px;
  color:          var(--teal-lt);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom:  10px;
}

.ai-output-text {
  font-size:   13px;
  color:       var(--ice);
  line-height: 1.7;
}

.ai-output-text.streaming::after {
  content:    "▋";
  animation:  blink 0.8s step-end infinite;
  color:      var(--teal-xlt);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.ai-placeholder {
  color:       var(--muted);
  font-size:   12px;
  font-style:  italic;
  line-height: 1.6;
}

.ai-error {
  color:     #fca5a5;
  font-size: 12px;
}

.ai-model-tag {
  font-family:  var(--font-mono);
  font-size:    10px;
  color:        var(--muted);
  margin-top:   10px;
  display:      flex;
  align-items:  center;
  gap:          5px;
}

.ai-model-tag::before {
  content:       "";
  display:       inline-block;
  width:         5px;
  height:        5px;
  border-radius: 50%;
  background:    var(--teal);
}

/* ── LOADING SKELETON ────────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(10, 126, 140, 0.08) 25%,
    rgba(10, 126, 140, 0.15) 50%,
    rgba(10, 126, 140, 0.08) 75%
  );
  background-size: 200% 100%;
  animation:       shimmer 1.5s infinite;
  border-radius:   4px;
  height:          14px;
  margin-bottom:   8px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── EMPTY STATE ─────────────────────────────────────────────────────────────── */
.empty-state {
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  justify-content: center;
  min-height:      120px;
  color:           var(--muted);
  font-size:       12px;
  font-family:     var(--font-mono);
  gap:             8px;
}

.empty-icon {
  font-size: 24px;
  opacity:   0.4;
}

/* ── SCROLLBAR ───────────────────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(10, 126, 140, 0.3); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(10, 126, 140, 0.5); }

/* ── ENTRY ANIMATION ─────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}

.panel { animation: fadeUp 0.4s ease both; }
.panel:nth-child(1) { animation-delay: 0.05s; }
.panel:nth-child(2) { animation-delay: 0.10s; }
.panel:nth-child(3) { animation-delay: 0.15s; }
.panel:nth-child(4) { animation-delay: 0.20s; }

/* ── TAB BAR ────────────────────────────────────────────────────────────────── */
.tab-bar {
  display:         flex;
  gap:             0;
  background:      rgba(13, 33, 55, 0.95);
  border-bottom:   1px solid var(--border);
  padding:         0 24px;
  overflow-x:      auto;
  flex-shrink:     0;
}

.tab-btn {
  padding:          10px 20px;
  background:       none;
  border:           none;
  border-bottom:    2px solid transparent;
  color:            var(--muted);
  font-family:      var(--font-mono);
  font-size:        11px;
  font-weight:      500;
  letter-spacing:   0.06em;
  cursor:           pointer;
  white-space:      nowrap;
  transition:       color 0.2s, border-color 0.2s;
}

.tab-btn:hover {
  color:            var(--ice);
}

.tab-btn.active {
  color:            var(--teal-xlt);
  border-bottom-color: var(--teal);
}

/* ── PAGE CONTENT ───────────────────────────────────────────────────────────── */
.page-content {
  flex:       1;
  padding:    20px 24px;
  overflow-y: auto;
}

.standalone-note {
  flex-shrink:  0;
  padding:      8px 24px;
  border-top:   1px solid var(--border);
  font-family:  var(--font-mono);
  font-size:    10px;
  line-height:  1.5;
  color:        var(--muted);
  background:   var(--surface-lt);
}

.page-loading {
  padding:  40px 24px;
}

.page-status-row {
  display:         flex;
  justify-content: flex-end;
  margin-bottom:   16px;
}

/* ── PAGE GRID ──────────────────────────────────────────────────────────────── */
.page-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   16px;
}

.page-grid .span-full {
  grid-column: 1 / -1;
}

/* ── CHART PANEL ────────────────────────────────────────────────────────────── */
.chart-panel {
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: 8px;
  padding:       18px 20px;
  animation:     fadeUp 0.4s ease both;
}

.chart-panel-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             10px;
  flex-wrap:       wrap;
  margin-bottom:   14px;
}

.chart-panel-header .panel-title { flex: 1 1 auto; min-width: 0; }

.panel-header-right {
  display:     inline-flex;
  align-items: center;
  gap:         2px;
  flex-shrink: 0;
}
.panel-header-right .panel-count { white-space: nowrap; }

.chart-panel-body {
  min-height: 100px;
}

/* ── KPI CARDS ──────────────────────────────────────────────────────────────── */
.kpi-row {
  display:  flex;
  gap:      12px;
}

.kpi-card {
  flex:           1;
  padding:        16px 20px;
  border-radius:  8px;
  border:         1px solid;
  animation:      fadeUp 0.4s ease both;
}

.kpi-card.kpi-teal {
  background:   rgba(10, 126, 140, 0.12);
  border-color: rgba(10, 126, 140, 0.35);
}

.kpi-card.kpi-gold {
  background:   rgba(244, 168, 48, 0.10);
  border-color: rgba(244, 168, 48, 0.30);
}

.kpi-card.kpi-blue {
  background:   rgba(100, 160, 220, 0.10);
  border-color: rgba(100, 160, 220, 0.30);
}

.kpi-card.kpi-green {
  background:   rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.25);
}

.kpi-label {
  font-family:    var(--font-mono);
  font-size:      10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          var(--muted);
  margin-bottom:  6px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size:   24px;
  font-weight: 500;
  color:       var(--white);
  line-height: 1;
  margin-bottom: 4px;
}

.kpi-sub {
  font-size:   11px;
  color:       var(--muted);
}

/* ── DATA TABLE ─────────────────────────────────────────────────────────────── */
.data-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 400px;
}

.data-table {
  width:           100%;
  border-collapse: collapse;
  min-width:       500px;
}

.data-table th {
  font-family:    var(--font-mono);
  font-size:      10px;
  font-weight:    500;
  color:          var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding:        6px 10px;
  text-align:     left;
  border-bottom:  1px solid var(--border);
  white-space:    nowrap;
  position:       sticky;
  top:            0;
  background:     var(--surface);
  z-index:        2;
  cursor:         pointer;
  user-select:    none;
}

.data-table th:hover {
  color: var(--teal-xlt);
}

.data-table th.sorted {
  color: var(--teal-xlt);
}

.sort-arrow {
  font-size: 9px;
}

.data-table td {
  padding:        8px 10px;
  border-bottom:  1px solid rgba(10, 126, 140, 0.1);
  vertical-align: middle;
  font-size:      12px;
  color:          var(--ice);
}

.data-table tr:hover td {
  background: rgba(10, 126, 140, 0.05);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* ── PRESSURE BADGE ─────────────────────────────────────────────────────────── */
.pressure-badge {
  display:        inline-flex;
  align-items:    center;
  padding:        2px 8px;
  border-radius:  3px;
  font-family:    var(--font-mono);
  font-size:      10px;
  font-weight:    500;
  letter-spacing: 0.04em;
  white-space:    nowrap;
  border:         1px solid;
}

/* ── RECHARTS OVERRIDES ─────────────────────────────────────────────────────── */
.recharts-text { fill: var(--muted) !important; font-family: var(--font-mono) !important; }
.recharts-cartesian-grid-horizontal line,
.recharts-cartesian-grid-vertical line { stroke: rgba(10, 126, 140, 0.1); }
.recharts-tooltip-wrapper { font-size: 12px; }
.recharts-default-tooltip { background: #0D2137 !important; border: 1px solid rgba(10, 126, 140, 0.3) !important; border-radius: 6px !important; }
.recharts-legend-item-text { color: var(--ice) !important; font-family: var(--font-mono) !important; font-size: 11px !important; }

/* ── INFO TOOLTIP ───────────────────────────────────────────────────────────── */
.info-tip {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           14px;
  height:          14px;
  margin-left:     6px;
  border:          1px solid var(--muted);
  border-radius:   50%;
  color:           var(--muted);
  font-family:     var(--font-mono);
  font-size:       9px;
  font-style:      normal;
  line-height:     1;
  cursor:          help;
  position:        relative;
  flex-shrink:     0;
  vertical-align:  middle;
  text-transform:  none;
  transition:      border-color 0.15s, color 0.15s;
}
.info-tip:hover, .info-tip:focus {
  border-color: var(--teal-lt);
  color:        var(--teal-lt);
  outline:      none;
}
.info-tip:hover::after, .info-tip:focus::after {
  content:        attr(data-tip);
  position:       absolute;
  top:            150%;
  right:          0;
  width:          260px;
  max-width:      70vw;
  background:     var(--navy);
  border:         1px solid var(--border);
  border-radius:  6px;
  padding:        9px 11px;
  font-family:    var(--font-sans);
  font-size:      11.5px;
  font-weight:    400;
  line-height:    1.5;
  letter-spacing: normal;
  text-transform: none;
  text-align:     left;
  color:          var(--ice);
  white-space:    normal;
  z-index:        100;
  box-shadow:     0 6px 22px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

/* ── PDP ANTI-PATTERN NOTE ──────────────────────────────────────────────────── */
.pdp-note {
  margin:        0 0 14px;
  padding:       10px 12px;
  border:        1px solid var(--border-gold);
  border-left:   2px solid var(--gold);
  border-radius: 6px;
  background:    rgba(244, 168, 48, 0.06);
  font-size:     11.5px;
  line-height:   1.55;
  color:         var(--ice);
}
.pdp-note strong { color: var(--gold-lt); font-weight: 600; }

/* ── AI PANEL — UNAVAILABLE STATE ───────────────────────────────────────────── */
.ai-unavailable {
  display:       flex;
  gap:           10px;
  align-items:   flex-start;
  padding:       12px 14px;
  border:        1px dashed var(--border);
  border-radius: 8px;
  background:    var(--surface-lt);
  font-size:     12px;
  line-height:   1.5;
  color:         var(--muted);
}
.ai-unavailable .ai-icon { color: var(--teal-lt); flex-shrink: 0; }

/* ── INSIGHT STRIP ──────────────────────────────────────────────────────────── */
.insight-strip {
  display:   flex;
  gap:       12px;
  flex-wrap: wrap;
}
.insight-card {
  flex:          1 1 220px;
  min-width:     200px;
  background:    var(--surface);
  border:        1px solid var(--border);
  border-left:   2px solid var(--teal);
  border-radius: 8px;
  padding:       12px 14px;
}
.insight-card.tone-alert { border-left-color: var(--gold); }
.insight-card.tone-trend { border-left-color: var(--teal-lt); }
.insight-card.tone-info  { border-left-color: var(--muted); }
.insight-label {
  font-family:    var(--font-mono);
  font-size:      10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color:          var(--muted);
}
.insight-value {
  font-size:   15px;
  font-weight: 600;
  color:       var(--white);
  margin-top:  5px;
  line-height: 1.3;
}
.insight-detail {
  font-size:   11.5px;
  line-height: 1.45;
  color:       var(--ice);
  margin-top:  5px;
}

/* ── CLICKABLE TABLE ROWS (drill-down) ──────────────────────────────────────── */
.data-table tbody tr.clickable { cursor: pointer; transition: background 0.12s; }
.data-table tbody tr.clickable:hover { background: var(--surface-lt); }

/* ── DRILL-DOWN FOCUS CHIP ──────────────────────────────────────────────────── */
.focus-chip {
  display:       flex;
  align-items:   center;
  gap:           10px;
  flex-wrap:     wrap;
  padding:       9px 14px;
  border:        1px solid var(--border);
  border-left:   2px solid var(--teal-lt);
  border-radius: 8px;
  background:    var(--surface-lt);
}
.focus-chip-label {
  font-family:    var(--font-mono);
  font-size:      10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color:          var(--muted);
}
.focus-chip-value { font-size: 14px; font-weight: 600; color: var(--teal-xlt); }
.focus-chip-note  { font-size: 11.5px; color: var(--muted); }
.focus-chip-clear {
  margin-left:   auto;
  padding:       4px 10px;
  border:        1px solid var(--border);
  border-radius: 5px;
  background:    transparent;
  color:         var(--ice);
  font-family:   var(--font-mono);
  font-size:     11px;
  cursor:        pointer;
  transition:    border-color 0.12s, color 0.12s;
}
.focus-chip-clear:hover { border-color: var(--teal-lt); color: var(--teal-lt); }

/* ── EXECUTIVE BRIEF (cross-page AI synthesis) ──────────────────────────────── */
.exec-brief {
  flex-shrink:   0;
  border-bottom: 1px solid var(--border);
  background:    linear-gradient(180deg, rgba(244, 168, 48, 0.05), transparent);
}
.exec-brief-bar {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             14px;
  flex-wrap:       wrap;
  padding:         10px 24px;
}
.exec-brief-heading { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.exec-brief-title {
  font-family:    var(--font-mono);
  font-size:      12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color:          var(--gold-lt);
}
.exec-brief-sub { font-size: 11.5px; color: var(--muted); }
.exec-brief-unavail { font-size: 11.5px; color: var(--muted); font-style: italic; }
.exec-brief-btn {
  flex-shrink:   0;
  padding:       6px 16px;
  border:        1px solid var(--border-gold);
  border-radius: 6px;
  background:    rgba(244, 168, 48, 0.10);
  color:         var(--gold-lt);
  font-family:   var(--font-mono);
  font-size:     12px;
  cursor:        pointer;
  transition:    background 0.14s, border-color 0.14s;
}
.exec-brief-btn:hover:not(:disabled) { background: rgba(244, 168, 48, 0.18); border-color: var(--gold); }
.exec-brief-btn:disabled { opacity: 0.55; cursor: default; }
.exec-brief-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.exec-brief-link {
  background:        none;
  border:           none;
  padding:          0;
  color:            var(--muted);
  font-family:      var(--font-mono);
  font-size:        11.5px;
  cursor:           pointer;
  text-decoration:  underline;
  text-underline-offset: 3px;
}
.exec-brief-link:hover { color: var(--teal-lt); }
.exec-brief-body {
  padding: 0 24px 16px;
}
.exec-brief-text {
  font-size:   13.5px;
  line-height: 1.65;
  color:       var(--ice);
}
.exec-brief-text.streaming::after {
  content: "▋";
  margin-left: 2px;
  color: var(--gold);
  animation: blink 0.8s step-end infinite;
}

