:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --sidebar: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8f9fa;
  --surface-3: #f0f2f5;
  --border: #e3e6eb;
  --border-bright: #ced4de;
  --text: #21242c;
  --muted: #5e6473;
  --subtle: #878d9d;
  --blue: #0077ff;
  --blue-light: #2d72d9;
  --cyan: #00aa44;
  --amber: #ff8500;
  --red: #fc3f1d;
  --ym-yellow: #ffcc00;
  --ym-yellow-hover: #ffdb4d;
  --ym-yellow-active: #f5b800;
  --ym-orange: #ff8500;
  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --heading: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  --mono: Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; font-variant-numeric: tabular-nums; }
button, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid var(--ym-yellow); outline-offset: 2px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 10px 14px; background: var(--ym-yellow); color: #1a1a1a; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }

/* SIDEBAR */
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px 18px; display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid var(--border); z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 8px; color: var(--text); text-decoration: none; }
.brand > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.brand strong { font-family: var(--heading); letter-spacing: -0.03em; font-size: 18px; line-height: 1.2; }
.brand small { margin-top: 4px; color: var(--subtle); font: 12px/1.2 var(--font); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.brand-mark { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; gap: 2.5px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.brand-mark i { display: block; width: 3px; height: 10px; background: #fc3f1d; border-radius: 1.5px; }
.brand-mark i:nth-child(2) { height: 18px; background: #ff8500; }
.brand-mark i:nth-child(3) { height: 26px; background: #ffcc00; }
.brand-mark i:nth-child(4) { height: 18px; background: #00aa44; }
.brand-mark i:nth-child(5) { height: 12px; background: #0077ff; }
.nav-label { margin: 36px 10px 12px; color: var(--subtle); font: 600 12px/1.2 var(--font); letter-spacing: .1em; text-transform: uppercase; }
.section-nav { display: grid; gap: 6px; }
.nav-item { width: 100%; min-height: 48px; padding: 0 14px; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-size: 14.5px; font-weight: 500; text-align: left; cursor: pointer; transition: color .15s ease, background .15s ease, border-color .15s ease; }
.nav-item:hover { color: var(--text); background: var(--surface-2); }
.nav-item.is-active { color: #1a1a1a; background: #fff9e6; border-color: #ffe58f; font-weight: 600; box-shadow: inset 3.5px 0 0 #ffcc00; }
.nav-item svg, .icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-live { padding: 4px 7px; border: 1px solid #b7ebc7; color: var(--cyan); background: #eafaf0; font: 600 11px/1 var(--font); border-radius: 4px; text-transform: uppercase; }
.sidebar-spacer { flex: 1; min-height: 30px; }
.signal-card { padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.signal-card__head { display: flex; align-items: center; gap: 8px; color: var(--cyan); font: 600 12px/1.2 var(--font); letter-spacing: .06em; text-transform: uppercase; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(0, 170, 68, 0.15); animation: pulse 2.2s ease-in-out infinite; }
.signal-card dl { margin: 14px 0 0; display: grid; gap: 9px; }
.signal-card dl div { display: flex; justify-content: space-between; align-items: center; }
.signal-card dt { color: var(--subtle); font-size: 13px; }
.signal-card dd { margin: 0; color: var(--text); font-size: 13px; font-weight: 600; }
.demo-note { margin-top: 12px; padding: 12px 14px; border-left: 3px solid #ffcc00; background: #fffdf0; border-radius: 4px; }
.demo-note span { color: #b45309; font: 700 11px/1.2 var(--font); letter-spacing: .08em; display: block; }
.demo-note p { margin: 6px 0 0; color: #78350f; font-size: 12px; line-height: 1.5; }

/* TOPBAR */
.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 15; min-height: 72px; padding: 12px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgb(255 255 255 / 94%); border-bottom: 1px solid var(--border); backdrop-filter: blur(16px); }
.topbar__context { display: flex; align-items: center; gap: 18px; }
.eyebrow { color: var(--muted); font: 600 12px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; }
.timestamp { display: flex; align-items: center; gap: 8px; color: var(--subtle); font-size: 13px; }
.timestamp .status-dot { width: 6px; height: 6px; box-shadow: none; }
.filters { display: flex; align-items: end; gap: 14px; }
.filters label { display: flex; flex-direction: column; gap: 4px; }
.filters label > span { color: var(--subtle); font: 600 11px/1.2 var(--font); letter-spacing: .06em; text-transform: uppercase; }
.filter-select-wrap { display: flex; align-items: center; gap: 8px; }
.filter-logo-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 4px;
}
.filter-logo-badge img,
.filter-logo-badge svg {
  width: 100%;
  height: 100%;
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}
.filters select { height: 40px; min-width: 160px; padding: 0 36px 0 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%236b7280'%3E%3Cpath stroke-width='2' d='m3 5 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center; color: var(--text); font-size: 14px; font-weight: 500; appearance: none; cursor: pointer; }
.filters label:nth-child(2) select { min-width: 240px; }
.ghost-button { height: 40px; }
.icon-button { position: relative; width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--muted); cursor: pointer; }
.icon-button:hover { color: var(--text); border-color: var(--border-bright); }
.notification-mark { position: absolute; right: 8px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--surface); }
.profile {
  position: relative;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1.5px solid #ffcc00;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffcc00, #ff8500);
  color: #1a1a1a;
  font: 700 13px/1 var(--font);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 133, 0, 0.25);
  align-self: flex-end;
  transition: transform 0.15s, box-shadow 0.15s;
}
.profile:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 133, 0, 0.35);
}
.profile-pulse-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #16a34a;
  border: 2px solid #ffffff;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.6);
}

/* PROFILE DROPDOWN WRAP & ENTERPRISE ACCOUNT MENU */
.profile-dropdown-wrap {
  position: relative;
  align-self: flex-end;
}
.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-width: calc(100vw - 24px);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.05);
  z-index: 120;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: profileMenuAppear 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes profileMenuAppear {
  from { opacity: 0; transform: translateY(-5px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.profile-menu[hidden] {
  display: none !important;
}

/* 1. User Identity */
.profile-menu-header {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.profile-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-avatar-circle {
  position: relative;
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #f8fafc;
  display: grid;
  place-items: center;
  font: 700 15px/1 var(--font);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
}
.profile-online-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #16a34a;
  border: 2px solid #ffffff;
}
.profile-user-meta {
  flex: 1;
  min-width: 0;
}
.profile-user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.profile-user-email {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}
.profile-user-org {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--muted);
}
.profile-user-org span {
  font-weight: 600;
  color: var(--text);
}
.user-pill--tier {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
}

/* 2. Role Selector (RBAC) */
.profile-menu-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.profile-section-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.role-selector-list {
  display: grid;
  gap: 5px;
}
.role-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.15s ease;
}
.role-item:hover {
  background: var(--surface-2);
  border-color: var(--border-bright);
}
.role-item.is-active {
  background: #fefce8;
  border-color: #facc15;
  box-shadow: 0 1px 3px rgba(250, 204, 21, 0.2);
}
.role-item input[type="radio"] {
  margin-top: 2px;
  accent-color: #ff8500;
}
.role-item-text strong {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
}
.role-item-text span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.3;
}

/* 3. Telemetry Refresh & API Token */
.profile-tools-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.profile-prefs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pref-title {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
}
.pref-btn-group {
  display: flex;
  gap: 3px;
  background: #f1f5f9;
  padding: 2px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.pref-btn {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pref-btn.is-active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.profile-api-key-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.api-key-label {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
}
.api-key-label span {
  font-weight: 700;
  color: var(--text);
}
.api-key-label small {
  color: var(--muted);
}
.api-key-input-wrap {
  display: flex;
  gap: 6px;
}
.api-key-input-wrap input {
  flex: 1;
  height: 28px;
  padding: 0 8px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: 600 10.5px/1 "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: #334155;
}
.api-key-copy-btn {
  height: 28px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.api-key-copy-btn:hover {
  background: var(--surface-2);
  border-color: var(--blue);
  color: var(--blue);
}

/* 4. Logout Footer */
.profile-menu-footer {
  display: flex;
  flex-direction: column;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.profile-footer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.profile-footer-item--logout {
  color: #dc2626;
}
.profile-footer-item--logout:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.demo-chip { height: 40px; padding: 0 12px; display: grid; place-items: center; border: 1px solid #ffe58f; border-radius: 6px; background: #fffdf0; color: #78350f; font: 700 11px/1 var(--font); letter-spacing: .08em; }

/* DASHBOARD HEADINGS & STATS */
.dashboard-panel { padding: 34px 32px 30px; max-width: 1600px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.section-code, .panel-kicker { color: var(--blue); font: 700 12px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; }
.page-heading h1 { margin: 8px 0 8px; font-family: var(--heading); font-size: clamp(28px, 3vw, 42px); line-height: 1.1; letter-spacing: -.04em; }
.page-heading p { max-width: 760px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.live-total { min-width: 270px; padding: 18px 20px; border: 1px solid var(--border); border-left: 4px solid var(--cyan); border-radius: 8px; background: var(--surface); box-shadow: 0 1px 3px rgba(33, 36, 44, 0.05); }
.live-total > * { display: block; }
.live-total > span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.live-total strong { margin-top: 4px; color: var(--text); font: 700 32px/1.2 var(--font); }
.live-total small { margin-top: 6px; color: var(--cyan); font-size: 13px; font-weight: 500; }
.live-total.compact { border-left-color: var(--ym-yellow); }

/* METRIC CARDS */
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.metric-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card { min-width: 0; min-height: 146px; padding: 20px 22px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 1px 3px rgba(33, 36, 44, 0.05); }
.metric-card--accent { border-color: #ffe58f; background: #fffdf5; }
.metric-card__label { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.metric-card__label b { color: var(--subtle); font: 600 11px/1 var(--font); }
.metric-card > strong { display: block; margin: 14px 0 8px; color: var(--text); font: 700 28px/1.1 var(--font); letter-spacing: -.02em; }
.metric-card > strong span { color: var(--muted); font-size: 16px; font-weight: 500; }
.metric-card p { margin: 0; font-size: 13px; line-height: 1.4; font-weight: 500; }
.metric-card p span { color: var(--subtle); }
.positive { color: var(--cyan) !important; font-weight: 600; }
.negative { color: var(--red) !important; font-weight: 600; }
.warning { color: var(--amber) !important; font-weight: 600; }

/* PANELS & GRIDS */
.content-grid { display: grid; gap: 14px; margin-top: 14px; }
.content-grid--primary { grid-template-columns: minmax(0, 2.2fr) minmax(300px, .9fr); }
.content-grid--secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-grid--talk { grid-template-columns: minmax(0, 1.8fr) minmax(280px, .8fr); }
.panel { min-width: 0; padding: 22px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 1px 3px rgba(33, 36, 44, 0.05); }
.panel-heading { min-height: 48px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-heading h2, .insight-card h2, .host-card h2 { margin: 6px 0 0; color: var(--text); font-family: var(--heading); font-size: 17px; line-height: 1.3; font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; }
.legend-dot--music { background: var(--blue); }
.legend-dot--talk { background: var(--ym-orange); }
.legend-dot--ads { background: var(--red); }
.benchmark { color: var(--subtle); font-size: 12.5px; font-weight: 500; white-space: nowrap; }

/* LINE CHART */
.line-chart { position: relative; height: 280px; margin: 20px 0 10px; padding: 0 0 28px 48px; }
.line-chart svg { width: 100%; height: 100%; overflow: visible; }
.grid-lines path { fill: none; stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.line-chart .area { fill: url(#areaFill); transition: d 0.4s ease-out; }
.line-chart .line { fill: none; stroke: var(--blue); stroke-width: 2.8; vector-effect: non-scaling-stroke; transition: d 0.4s ease-out; }
.line-chart .event-line { fill: none; stroke: rgba(252, 63, 29, 0.45); stroke-width: 1.2; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.event-point { fill: var(--red); stroke: #fee8e6; stroke-width: 4; vector-effect: non-scaling-stroke; }
.live-playhead { pointer-events: none; }
.playhead-line { stroke: #00aa44; stroke-width: 1.8; stroke-dasharray: 4 3; opacity: 0.85; }
.playhead-dot-halo { fill: rgba(0, 170, 68, 0.25); animation: radarPing 2.2s cubic-bezier(0, 0, 0.2, 1) infinite; transform-box: fill-box; transform-origin: center; }
.playhead-dot { fill: #00aa44; stroke: #ffffff; stroke-width: 2.5; }
.playhead-label { fill: #00aa44; font-family: var(--font); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
@keyframes radarPing {
  0% { r: 4px; opacity: 1; }
  100% { r: 16px; opacity: 0; }
}
.chart-y-axis { position: absolute; left: 0; top: 0; bottom: 28px; display: flex; flex-direction: column; justify-content: space-between; color: var(--subtle); font-size: 12px; font-weight: 500; }
.chart-x-axis { position: absolute; left: 48px; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; color: var(--subtle); font-size: 12.5px; font-weight: 500; }
.live-now-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--cyan); font-weight: 700; background: #eafaf0; padding: 1px 7px; border-radius: 4px; border: 1px solid #b7ebc7; }
.event-tag { position: absolute; top: 44%; padding: 6px 9px; background: #fff5f5; border: 1px solid #ffd2cc; border-radius: 4px; font-size: 12px; }
.event-tag b, .event-tag span { display: block; }
.event-tag b { color: var(--red); font-weight: 700; font-size: 13px; }
.event-tag span { margin-top: 2px; color: #c92a10; font-weight: 500; font-size: 11px; }
.event-tag--one { left: 37%; }
.event-tag--two { left: 77%; top: 47%; }

/* AIR TIMELINE */
.air-timeline { display: flex; gap: 4px; border-top: 1px solid var(--border); padding-top: 16px; overflow-x: auto; }
.air-segment { flex: 0 0 var(--size); min-width: 90px; min-height: 56px; padding: 9px 10px; border-top: 3px solid; border-radius: 0 0 6px 6px; background: var(--surface-2); transition: all 0.2s ease; }
.air-segment span, .air-segment b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.air-segment span { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.air-segment b { margin-top: 4px; color: var(--text); font-size: 12.5px; font-weight: 600; }
.air-segment--music { border-color: var(--blue); }
.air-segment--talk { border-color: var(--ym-orange); }
.air-segment--ads { border-color: var(--red); background: #fff5f5; }
.air-segment.is-live { border-top-color: #00aa44; background: #f0fdf4; box-shadow: inset 0 -2px 0 #00aa44; }
.air-segment.is-live span { color: #00aa44; font-weight: 700; }
.air-segment.is-live b { color: #14532d; }

/* NOW PLAYING CARD */
.on-air { display: inline-flex; align-items: center; gap: 6px; color: var(--red); font-size: 12px; font-weight: 700; }
.on-air i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgb(220 38 38 / 10%); animation: pulse 1.6s ease-in-out infinite; }
.on-air--ads { color: var(--amber); }
.on-air--ads i { background: var(--amber); box-shadow: 0 0 0 4px rgb(217 119 6 / 15%); }
.album-art { position: relative; width: min(100%, 220px); aspect-ratio: 1; margin: 18px auto; display: grid; place-content: center; overflow: hidden; border: 1px solid #bfdbfe; border-radius: 12px; background: #eff6ff; text-align: center; }
.record-lines { position: absolute; inset: 12%; border-radius: 50%; border: 1px solid rgb(37 99 235 / 28%); box-shadow: 0 0 0 18px rgb(37 99 235 / 5%), 0 0 0 36px rgb(37 99 235 / 5%), 0 0 0 54px rgb(37 99 235 / 4%); }
.album-art span { z-index: 1; color: #1e3a8a; font: 700 38px/1 var(--font); letter-spacing: -.06em; }
.album-art small { z-index: 1; margin-top: 4px; color: var(--cyan); font: 700 12px/1 var(--font); letter-spacing: .15em; }
.track-meta { text-align: center; }
.track-meta strong, .track-meta span { display: block; }
.track-meta strong { color: var(--text); font-size: 16px; font-weight: 700; }
.track-meta span { margin-top: 4px; color: var(--subtle); font-size: 13px; font-weight: 500; }
@keyframes wavePulse {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1.05); }
}
.waveform { height: 36px; margin: 16px 0; display: flex; align-items: flex-end; justify-content: center; gap: 3.5px; }
.waveform i { width: 3.5px; height: var(--h); background: var(--blue); border-radius: 2px; animation: wavePulse 1.2s ease-in-out infinite alternate; transform-origin: bottom; }
.waveform i:nth-child(2n) { animation-duration: 0.9s; animation-delay: 0.15s; }
.waveform i:nth-child(3n) { animation-duration: 1.4s; animation-delay: 0.3s; background: var(--cyan); }
.waveform i:nth-child(4n) { animation-duration: 1.1s; animation-delay: 0.45s; }
.waveform i:nth-child(5n) { animation-duration: 0.75s; animation-delay: 0.2s; background: var(--ym-orange); }
.track-stats { margin: 0; border-top: 1px solid var(--border); }
.track-stats div { padding: 11px 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.track-stats dt { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.track-stats dd { margin: 0; color: var(--text); font-size: 13.5px; font-weight: 600; }

/* RETENTION & OUTFLOW LISTS */
.retention-list, .station-list { margin-top: 16px; }

.ad-pod-header {
  display: grid;
  grid-template-columns: 28px minmax(130px, 1.2fr) minmax(120px, 1fr) 68px;
  align-items: center;
  gap: 12px;
  padding: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.ad-pod-header .col-drop { text-align: right; }

.retention-list > div:not(.ad-pod-header) {
  min-height: 56px;
  display: grid;
  grid-template-columns: 28px minmax(130px, 1.2fr) minmax(120px, 1fr) 68px;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding: 8px 0;
}
.retention-list > div:last-child { border-bottom: 1px solid var(--border); }
.retention-list .position, .station-rank { color: var(--subtle); font-size: 12px; font-weight: 600; }
.retention-list b, .retention-list small, .station-list b, .station-list small { display: block; }
.retention-list b, .station-list b { color: var(--text); font-size: 13.5px; font-weight: 600; }
.retention-list small, .station-list small { margin-top: 2px; color: var(--subtle); font-size: 12px; font-weight: 400; }

.ad-ret-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ad-ret-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}
.ad-ret-label { color: var(--muted); font-size: 10.5px; }
.ad-ret-value { color: var(--text); font-weight: 600; font-feature-settings: 'tnum'; }
.is-critical .ad-ret-value { color: var(--red); font-weight: 700; }

.retention-bar { height: 6px; background: #e5eaf0; overflow: hidden; border-radius: 999px; }
.retention-bar i { display: block; width: var(--value); height: 100%; background: var(--blue-light); border-radius: 999px; transition: width 0.3s ease; }
.is-critical .retention-bar i { background: var(--red); }

.ad-drop-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.ad-drop-value { font-size: 13.5px; font-weight: 700; color: var(--muted); font-feature-settings: 'tnum'; text-align: right; }
.is-critical .ad-drop-value { color: var(--red); }
.ad-drop-label { color: var(--subtle); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }

.station-list > div { min-height: 56px; display: grid; grid-template-columns: 24px 36px minmax(0, 1fr) 56px 18px; align-items: center; gap: 10px; border-top: 1px solid var(--border); }
.station-list > div:last-child { border-bottom: 1px solid var(--border); }
.station-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #bfdbfe; border-radius: 6px; background: #eff6ff; color: var(--blue); font: 700 11px/1 var(--font); }
.station-list > div > strong { font-size: 13px; font-weight: 600; text-align: right; }
.trend-up { color: var(--cyan); }
.trend-flat { color: var(--subtle); }

/* BURNOUT & INSIGHTS */
.burnout-chart { height: 300px; margin-top: 16px; }
.burnout-chart svg { width: 100%; height: calc(100% - 25px); overflow: visible; }
.burnout-area { fill: rgb(255 179 71 / 9%); }
.burnout-line { fill: none; stroke: var(--amber); stroke-width: 2.8; vector-effect: non-scaling-stroke; }
.burnout-points circle { fill: #f59e0b; stroke: #fef3c7; stroke-width: 4; vector-effect: non-scaling-stroke; }
.burnout-labels { display: flex; justify-content: space-between; color: var(--subtle); font-size: 12px; font-weight: 500; }
.insight-card { display: flex; flex-direction: column; align-items: flex-start; border-color: #fde68a; background: #fffbeb; }
.insight-card--cyan { border-color: #a7f3d0; background: #ecfdf5; }
.insight-icon { width: 44px; height: 44px; margin: 28px 0 16px; display: grid; place-items: center; border: 1px solid #fcd34d; border-radius: 8px; background: #fef3c7; color: var(--amber); font: 700 20px/1 var(--font); }
.insight-card--cyan .insight-icon { border-color: #6ee7b7; background: #d1fae5; color: var(--cyan); }
.insight-card h2 { font-size: 22px; letter-spacing: -.03em; }
.insight-card p { margin: 12px 0 24px; color: #6b5639; font-size: 14px; line-height: 1.6; }
.insight-card--cyan p { color: #315d52; }
.insight-card p strong { color: var(--text); }
.insight-card button { margin-top: auto; padding: 10px 0; border: 0; border-bottom: 2px solid #f59e0b; background: transparent; color: var(--amber); font-size: 13px; font-weight: 600; cursor: pointer; }
.insight-card--cyan button { border-color: #10b981; color: var(--cyan); }
.insight-card button span { margin-left: 12px; }

/* DATA TABLES */
.table-panel { margin-top: 14px; overflow-x: auto; }
.data-table { margin-top: 14px; min-width: 680px; }
.data-row { min-height: 58px; display: grid; grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(90px, .7fr)); align-items: center; gap: 14px; border-top: 1px solid var(--border); color: var(--text); font-size: 13.5px; }
.data-row--head { min-height: 40px; color: var(--subtle); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.data-row > span:first-child b, .data-row > span:first-child small { display: block; }
.data-row > span:first-child b { color: var(--text); font: 600 14px/1.3 var(--font); }
.data-row > span:first-child small { margin-top: 3px; color: var(--subtle); font-size: 12px; }
.tag { display: inline-block; padding: 4px 8px; border: 1px solid; border-radius: 4px; font-style: normal; font-size: 11px; font-weight: 600; }
.tag--good { border-color: #a7f3d0; background: #ecfdf5; color: var(--cyan); }
.tag--warn { border-color: #fde68a; background: #fffbeb; color: var(--amber); }
.tag--risk { border-color: #fecaca; background: #fef2f2; color: var(--red); }

/* TALK AND NEWS SECTION */
.program-row { margin: 32px 0 28px; display: grid; grid-template-columns: 46px minmax(0, 1fr) 46px; align-items: center; gap: 12px; }
.program-row time { color: var(--subtle); font-size: 12px; font-weight: 600; }
.program-track { min-width: 0; height: 50px; display: flex; gap: 3px; }
.program-block { width: var(--w); min-width: 50px; display: grid; place-items: center; overflow: hidden; color: #334155; font-size: 12px; font-weight: 600; white-space: nowrap; border-radius: 3px; }
.program-block--news { background: #dbeafe; border-bottom: 3px solid var(--blue-light); }
.program-block--music { background: #d1fae5; border-bottom: 3px solid var(--cyan); }
.program-block--talk { background: #e2e8f0; border-bottom: 3px solid #64748b; }
.program-block--feature { background: #fef3c7; border-bottom: 3px solid var(--amber); }
.program-block--ads { background: #fee2e2; border-bottom: 3px solid var(--red); }
.minute-bars, .topic-list { display: grid; gap: 14px; }
.minute-bars > div, .topic-list > div { display: grid; grid-template-columns: 140px minmax(90px, 1fr) 48px; align-items: center; gap: 16px; color: var(--text); font-size: 13.5px; font-weight: 500; }
.minute-bars i, .topic-list i { height: 6px; background: #e5eaf0; border-radius: 999px; overflow: hidden; }
.minute-bars i b, .topic-list i b { display: block; width: var(--v); height: 100%; background: var(--blue-light); }
.minute-bars i b.is-risk, .topic-list i b.is-risk { background: var(--red); }
.minute-bars strong, .topic-list strong { font-size: 13px; font-weight: 600; text-align: right; }
.host-card { text-align: center; }
.host-card > .panel-kicker { display: block; text-align: left; }
.host-avatar { width: 76px; height: 76px; margin: 24px auto 14px; display: grid; place-items: center; border: 1px solid #bfdbfe; border-radius: 12px; background: #eff6ff; color: var(--blue); font: 700 24px/1 var(--font); }
.host-card p { margin: 4px 0; color: var(--muted); font-size: 13.5px; }
.host-score { display: block; margin: 20px 0; color: var(--text); font: 700 40px/1 var(--font); }
.host-score span { color: var(--subtle); font-size: 16px; font-weight: 500; }
.host-card dl { margin: 0; text-align: left; }
.host-card dl div { padding: 11px 0; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); }
.host-card dt { color: var(--muted); font-size: 13px; }
.host-card dd { margin: 0; font-size: 13px; font-weight: 600; }

/* FOOTER */
.footer { max-width: 1600px; margin: 12px auto 0; padding: 18px 32px 30px; display: flex; justify-content: space-between; gap: 20px; color: var(--subtle); font-size: 12.5px; font-weight: 500; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .42; } }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 80px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .brand { justify-content: center; }
  .brand > span:last-child, .nav-label, .nav-item > span:not(.nav-live), .sidebar .signal-card, .demo-note { display: none; }
  .nav-item { grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .nav-item svg { width: 22px; height: 22px; }
  .nav-live { position: absolute; margin: 0 0 27px 31px; padding: 2px 4px; font-size: 8px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid--primary, .content-grid--secondary, .content-grid--talk { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { padding: 12px 16px; flex-direction: column; align-items: flex-start; }
  .filters { width: 100%; flex-wrap: wrap; }
  .dashboard-panel { padding: 20px 16px; }
  .page-heading { flex-direction: column; align-items: flex-start; gap: 14px; }
  .metric-grid { grid-template-columns: 1fr; }
}

/* INTERACTIVE EXPLORER & GUIDE BANNERS */
.guide-banner, .calibration-bar {
  margin: 16px 0 22px;
  padding: 12px 18px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--ym-yellow);
  border-radius: 8px;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(33, 36, 44, 0.04);
}
.guide-banner p, .calibration-bar p {
  margin: 0;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
}
.guide-banner strong, .calibration-bar strong {
  font-weight: 600;
  color: var(--text);
}
.guide-banner > span:not(.guide-banner__badge):not(.calibration-badge),
.calibration-bar > span:not(.calibration-badge):not(.guide-banner__badge) {
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
}
.guide-banner__badge, .calibration-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--ym-yellow);
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(255, 204, 0, 0.25);
}

.music-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.search-box {
  flex: 1;
  min-width: 240px;
  max-width: 420px;
}
.search-box input {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: 500 13px/1.4 var(--font);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box input:focus {
  border-color: #ffcc00;
  box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.25);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-chips .chip {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font: 600 12px/1 var(--font);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-chips .chip:hover {
  border-color: #cbd5e1;
  color: var(--text);
}
.filter-chips .chip.is-active {
  background: var(--ym-yellow);
  border-color: #f0b800;
  color: #1a1a1a;
  font-weight: 600;
}

.data-row.is-clickable {
  cursor: pointer;
  transition: background 0.15s ease;
}
.data-row.is-clickable:hover {
  background: var(--surface-2);
}
.data-row.is-selected {
  background: #fffdf0 !important;
  border-left: 3px solid #ffcc00;
  padding-left: 10px;
}

.airplay-history-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.airplay-history-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.airplay-item {
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.airplay-item time {
  font-weight: 700;
  color: var(--blue);
}
.airplay-item span { color: var(--muted); }
.airplay-item b { color: var(--text); font-weight: 600; }

.slot-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.slot-pill {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font: 600 12.5px/1 var(--font);
  cursor: pointer;
  transition: all 0.15s;
}
.slot-pill:hover {
  border-color: #94a3b8;
  color: var(--text);
}
.slot-pill.is-active {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
}

/* MODAL DIALOG / EXPORT MODAL */
.modal-dialog {
  border: none;
  padding: 0;
  border-radius: 12px;
  background: transparent;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.28);
}
.modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}
.modal-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.modal-header h2 {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--heading);
}
.modal-close {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  transition: background 0.15s;
}
.modal-close:hover {
  background: #f1f5f9;
  color: var(--text);
}
.modal-intro {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}
.modal-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.modal-form-group label {
  font-size: 13px;
  color: var(--text);
}
.modal-select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--text);
  font-size: 13.5px;
  width: 100%;
}
.modal-select:focus {
  outline: 2px solid var(--blue);
  border-color: var(--blue);
}
.modal-info-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
}
.modal-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-info-row span {
  color: var(--muted);
}
.modal-info-row strong {
  color: var(--text);
  font-weight: 600;
}
.modal-feedback {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}
.button-secondary {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s;
}
.button-secondary:hover {
  background: #f1f5f9;
  color: var(--text);
}
.button-primary {
  padding: 8px 18px;
  border: 1px solid #f0b800;
  border-radius: 6px;
  background: var(--ym-yellow);
  color: #1a1a1a;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.button-primary:hover {
  background: var(--ym-yellow-hover);
  box-shadow: 0 2px 8px rgba(255, 204, 0, 0.35);
}
.button-primary:active {
  background: var(--ym-yellow-active);
}

/* BENCHMARKING & OVERLAP SECTION */
.migration-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.migration-item {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.15s ease;
}
.migration-item:hover {
  border-color: var(--border-bright);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}
.migration-item__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.migration-item__title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.migration-item__title b {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.freq-tag {
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  font: 600 11.5px/1 var(--font);
}
.migration-share-pill {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  background: #f0f7ff;
  border: 1px solid #c7e0ff;
  padding: 3px 10px;
  border-radius: 999px;
}
.migration-item__desc {
  font-size: 13px;
  color: #334155;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}
.migration-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.migration-bar {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.migration-bar i {
  display: block;
  height: 100%;
  width: var(--val);
  background: linear-gradient(90deg, #2d72d9, #0077ff);
  border-radius: 999px;
}
.migration-item.is-collision .migration-bar i {
  background: #94a3b8;
}
.migration-item__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--subtle);
}
.migration-item__meta .tag {
  font-size: 11px;
}

.collision-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.collision-item {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  gap: 14px;
  transition: all 0.15s ease;
}
.collision-item:hover {
  border-color: var(--border-bright);
}
.collision-item__info b {
  font-size: 14.5px;
  color: var(--text);
  display: block;
}
.collision-item__info small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 3px;
}
.collision-item__info small strong {
  color: var(--text);
}
.collision-status {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.collision-status.is-safe {
  background: #eafaf0;
  color: #00aa44;
  border: 1px solid #b7ebc7;
}
.collision-status.is-risk {
  background: #fff5f5;
  color: #fc3f1d;
  border: 1px solid #ffd2cc;
}

/* DAYPARTS GRID */
.dayparts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  margin-bottom: 24px;
}
.daypart-card {
  min-width: 0;
  min-height: 146px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(33, 36, 44, 0.05);
  display: flex;
  flex-direction: column;
}
.daypart-card.is-peak,
.daypart-card.metric-card--accent {
  border-color: #ffe58f;
  background: #fffdf5;
}
.daypart-card .metric-card__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}
.daypart-card .metric-card__label b {
  color: var(--subtle);
  font: 600 11px/1 var(--font);
}
.daypart-card strong {
  display: block;
  margin: 14px 0 8px;
  color: var(--text);
  font: 700 28px/1.1 var(--font);
  letter-spacing: -.02em;
}
.daypart-card strong span {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  margin-left: 2px;
}
.daypart-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
}
.daypart-card p span {
  color: var(--subtle);
}

/* 06 / GEO RADAR & ARTERIES */
.artery-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.artery-item {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s ease;
}
.artery-item:hover {
  border-color: var(--border-bright);
}
.artery-item__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.artery-item__title b {
  font-size: 14.5px;
  color: var(--text);
  display: block;
}
.artery-item__title small {
  font-size: 12px;
  color: var(--muted);
}
.artery-item__head strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
}
.artery-bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.artery-bar i {
  display: block;
  height: 100%;
  width: var(--val);
  background: linear-gradient(90deg, #2d72d9, #0077ff);
  border-radius: 999px;
}
.artery-item__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--subtle);
  flex-wrap: wrap;
  gap: 8px;
}
.artery-meta-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.traffic-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.traffic-badge.is-green {
  background: #eafaf0;
  color: #00aa44;
  border: 1px solid #b7ebc7;
}
.traffic-badge.is-amber {
  background: #fffdf0;
  color: #b45309;
  border: 1px solid #ffe58f;
}
.traffic-badge.is-red {
  background: #fff5f5;
  color: #fc3f1d;
  border: 1px solid #ffd2cc;
}
.privacy-tag {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
}

.speed-tsl-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.speed-tsl-row {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.speed-tsl-row__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.speed-tsl-row__head b {
  color: var(--text);
  font-weight: 600;
}
.speed-tsl-row__head span {
  font-weight: 700;
  color: #1d4ed8;
}
.speed-tsl-row__sub {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

/* ========================================================
   05 / ВЕКТОРНЫЙ ПЛАНШЕТ МАГИСТРАЛЕЙ И ГЕО-КАРТА
   ======================================================== */

.content-grid--geo {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
  gap: 16px;
  margin-top: 14px;
  align-items: start;
}
@media (max-width: 1100px) {
  .content-grid--geo {
    grid-template-columns: 1fr;
  }
}

.geo-control-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 22px;
  box-shadow: 0 1px 2px rgba(33, 36, 44, 0.04);
}
.geo-layer-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  padding: 3px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.geo-layer-pill {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 4px;
  font: 600 12px/1.2 var(--font);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.geo-layer-pill.is-active {
  background: var(--surface);
  color: var(--blue);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.geo-layer-pill:hover:not(.is-active) {
  color: var(--text);
}

.geo-map-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.geo-map-wrapper {
  position: relative;
  width: 100%;
  height: 440px;
  background: radial-gradient(circle at 50% 50%, #f8fafc 0%, #edf2f7 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}
.geo-map-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.geo-map-grid-pattern {
  stroke: rgba(203, 213, 225, 0.4);
  stroke-width: 0.6;
}
.geo-river {
  fill: none;
  stroke: #bae6fd;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.geo-river-label {
  font: 600 10.5px/1 var(--font);
  fill: #0284c7;
  letter-spacing: 0.06em;
  opacity: 0.8;
}
.geo-artery-group {
  cursor: pointer;
  transition: all 0.2s ease;
}
.geo-artery-hitarea {
  fill: none;
  stroke: transparent;
  stroke-width: 28px;
  cursor: pointer;
}
.geo-artery-casing {
  fill: none;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.95;
  transition: stroke-width 0.2s ease;
}
.geo-artery-core {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: all 0.25s ease;
}
.geo-artery-group:hover .geo-artery-core,
.geo-artery-group.is-highlighted .geo-artery-core {
  filter: drop-shadow(0 0 6px currentColor);
  stroke-width: 12px !important;
}
.geo-artery-label {
  font: 700 11px/1.2 var(--font);
  fill: #0f172a;
  letter-spacing: -0.01em;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}
.geo-traffic-pulse {
  transform-box: fill-box;
  transform-origin: center;
  pointer-events: none;
  animation: geoPulse 2s ease-in-out infinite;
}
@keyframes geoPulse {
  0%, 100% { r: 4px; opacity: 1; }
  50% { r: 10px; opacity: 0.4; }
}
.geo-landmark-node {
  fill: #475569;
  stroke: #ffffff;
  stroke-width: 1.5;
}
.geo-landmark-label {
  font: 600 10px/1 var(--font);
  fill: #64748b;
  pointer-events: none;
}
.geo-map-tooltip {
  position: absolute;
  z-index: 20;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(6px);
  color: #ffffff;
  border-radius: 8px;
  font-size: 12px;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
  transform: translate(-50%, -115%);
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  min-width: 200px;
}
.geo-map-tooltip.is-visible {
  opacity: 1;
}
.geo-map-tooltip strong {
  display: block;
  font-size: 13px;
  color: #f8fafc;
  margin-bottom: 4px;
}
.geo-map-tooltip-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 11.5px;
}
.geo-map-tooltip-stats span {
  color: #94a3b8;
}
.geo-map-tooltip-stats b {
  color: #38bdf8;
}
.geo-map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
}
.geo-legend-scale {
  display: flex;
  align-items: center;
  gap: 14px;
}
.geo-legend-scale span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.geo-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.geo-legend-dot--green { background: #10b981; }
.geo-legend-dot--amber { background: #f59e0b; }
.geo-legend-dot--red { background: #ef4444; }
.geo-legend-dot--blue { background: #0077ff; }
.geo-legend-dot--purple { background: #8b5cf6; }

.geo-osm-map {
  width: 100%;
  height: 480px;
  border-radius: 8px;
  background: #f1f5f9;
  z-index: 1;
}

/* Custom Leaflet Controls & Popups */
.leaflet-popup-content-wrapper {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(8px);
  color: #f8fafc !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.45) !important;
  padding: 6px 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.leaflet-popup-tip {
  background: rgba(15, 23, 42, 0.95) !important;
}
.leaflet-popup-content {
  margin: 6px 8px !important;
  font-family: var(--font) !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}
.osm-popup-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #ffffff;
  margin-bottom: 4px;
}
.osm-popup-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  margin-bottom: 6px;
}
.osm-popup-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 11px;
}
.osm-popup-stats span { color: #94a3b8; }
.osm-popup-stats b { color: #38bdf8; }

.osm-poi-marker {
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 2px solid #8b5cf6;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
  font-size: 14px;
}

.osm-district-pill {
  background: rgba(15, 23, 42, 0.90);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 3px 9px;
  color: #f8fafc;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.osm-district-pill b {
  color: #38bdf8;
  font-weight: 700;
}

.geo-list-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
}
.geo-list-switcher .chip {
  padding: 4px 10px;
  font-size: 11.5px;
  cursor: pointer;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 4px;
  font-family: var(--font);
  font-weight: 600;
  transition: all 0.15s ease;
}
.geo-list-switcher .chip:hover {
  color: var(--text);
  border-color: #94a3b8;
}
.geo-list-switcher .chip.is-active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3);
}

.artery-item {
  cursor: pointer;
  transition: all 0.2s ease;
}
.artery-item.is-highlighted {
  border-color: var(--blue);
  background: #eff6ff;
  box-shadow: 0 0 0 1px var(--blue);
}

.artery-item__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle, #f1f5f9);
  font-size: 11px;
  color: var(--muted);
}
.artery-item__footer strong {
  color: var(--text);
}

/* 07 / REPORT BUILDER & EXPORT */
.report-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-top: 16px;
}
@media (max-width: 1024px) {
  .report-grid {
    grid-template-columns: 1fr;
  }
}
.template-select-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.template-card {
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.template-card:hover {
  border-color: #ffd666;
  background: #fffdf5;
}
.template-card.is-selected {
  border-color: #ffcc00;
  background: #fffdf0;
  box-shadow: 0 0 0 1px #ffcc00;
}
.template-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.template-card__head b {
  font-size: 14.5px;
  color: var(--text);
}
.template-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}
.report-form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.schema-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-top: 12px;
}
.schema-table th {
  text-align: left;
  padding: 8px 10px;
  background: var(--surface-2);
  color: var(--subtle);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.schema-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle, #f1f5f9);
  color: var(--text);
  vertical-align: top;
}
.schema-table code {
  font-size: 11px;
  background: #f1f5f9;
  padding: 2px 5px;
  border-radius: 4px;
  color: #0f172a;
}

/* 08 / TRAFFIC GENERATOR & PIPELINE */
.sim-console-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-top: 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.sim-console-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.sim-batch-pills {
  display: flex;
  gap: 6px;
  align-items: center;
}
.sim-batch-pill {
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s ease;
}
.sim-batch-pill:hover {
  border-color: #ffd666;
}
.sim-batch-pill.is-active {
  background: var(--ym-yellow);
  color: #1a1a1a;
  border-color: #f0b800;
  font-weight: 700;
}
.sim-trigger-btn {
  padding: 9px 20px;
  background: linear-gradient(180deg, #ffdb4d 0%, #ffcc00 100%);
  color: #1a1a1a;
  font-weight: 700;
  font-size: 13.5px;
  border: 1px solid #f0b800;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(255, 204, 0, 0.35);
}
.sim-trigger-btn:hover {
  background: #ffdb4d;
  box-shadow: 0 4px 14px rgba(255, 204, 0, 0.45);
  transform: translateY(-1px);
}
.sim-trigger-btn:active {
  transform: translateY(0);
}
.sim-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.sim-stat-box {
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sim-stat-box span {
  font-size: 11.5px;
  color: var(--subtle);
}
.sim-stat-box strong {
  font-size: 18px;
  color: var(--text);
  font-weight: 700;
}
.sim-result-log {
  margin-top: 16px;
  padding: 14px 16px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
}
.sim-distribution-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.sim-dist-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}
.sim-dist-bar {
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 3px;
}
.sim-dist-bar i {
  display: block;
  height: 100%;
  background: #3b82f6;
  border-radius: 999px;
}

/* Pipeline Architecture Cards */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 16px;
}
@media (max-width: 1024px) {
  .pipeline-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .pipeline-grid {
    grid-template-columns: 1fr;
  }
}
.pipeline-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pipeline-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fffdf0;
  color: #78350f;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid #ffe58f;
}
.pipeline-card h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}
.pipeline-card p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.pipeline-card ul {
  margin: 0;
  padding-left: 16px;
  font-size: 11.5px;
  color: var(--subtle);
  line-height: 1.5;
}

/* Station Broadcast Matrix Table */
.matrix-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
}
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.matrix-table th {
  padding: 10px 12px;
  background: var(--surface-2);
  color: var(--subtle);
  font-weight: 600;
  text-align: left;
  border-bottom: 1.5px solid var(--border);
}
.matrix-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.matrix-table tr:hover td {
  background: #f8fafc;
}

/* BRAND LOGOS & GEO ICONS */
.brand-radio-logo,
.geo-city-logo {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: contain;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.heading-station-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 10px 0 8px;
  vertical-align: middle;
}
.heading-station-icon img,
.heading-station-icon svg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: #ffffff;
  object-fit: contain;
  padding: 3px;
  display: block;
}
.heading-separator {
  margin: 0 4px;
  color: var(--muted);
  opacity: 0.6;
}

.now-station-logo {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
}
.now-station-logo img,
.now-station-logo svg {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  background: #ffffff;
  object-fit: contain;
  padding: 4px;
}

.station-list > div {
  min-height: 60px;
  display: grid;
  grid-template-columns: 24px 44px minmax(0, 1fr) 56px 18px;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border);
}
.station-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  padding: 4px;
}
.station-icon img,
.station-icon svg {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}

/* ==========================================================================
   MILESTONE 17: RBAC, COMMERCIAL PROOF OF PERFORMANCE & STREAM TELEMETRY
   ========================================================================== */

.role-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #f0f4ff;
  border: 1px solid #d0e0ff;
  color: #0055d4;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn-proof-cert {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  color: #ffffff;
  border: 1px solid #374151;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-proof-cert:hover {
  background: #000000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.stream-telemetry-badge {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  font-size: 11.5px;
  color: #166534;
  line-height: 1.4;
}
.stream-telemetry-badge strong {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
  color: #14532d;
}

/* Modal overlay & certificate */
.proof-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.proof-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.proof-modal-window {
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.proof-modal-header {
  padding: 16px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.proof-modal-title {
  font-family: var(--heading);
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
.proof-modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #64748b;
  padding: 4px 8px;
  border-radius: 4px;
}
.proof-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.proof-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* Official aircheck certificate style */
.aircheck-cert {
  background: #ffffff;
  border: 2px solid #0f172a;
  border-radius: 8px;
  padding: 28px;
  position: relative;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}
.cert-header {
  border-bottom: 2px solid #0f172a;
  padding-bottom: 18px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.cert-org-logo {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.cert-org-logo span {
  color: #ff8500;
}
.cert-title-group h2 {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  margin: 6px 0 2px;
  letter-spacing: 0.04em;
  color: #0f172a;
}
.cert-title-group p {
  margin: 0;
  font-size: 12px;
  color: #475569;
}
.cert-stamp {
  padding: 6px 12px;
  background: #f1f5f9;
  border: 1px dashed #64748b;
  border-radius: 4px;
  text-align: right;
  font-size: 11px;
  font-family: monospace;
  color: #334155;
}

.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.cert-section {
  background: #f8fafc;
  padding: 14px 16px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}
.cert-section h3 {
  margin: 0 0 10px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 4px;
}
.cert-list {
  display: grid;
  gap: 6px;
  font-size: 12.5px;
}
.cert-list div {
  display: flex;
  justify-content: space-between;
}
.cert-list dt {
  color: #64748b;
}
.cert-list dd {
  margin: 0;
  font-weight: 600;
  color: #0f172a;
  text-align: right;
}

.cert-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.cert-kpi-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
}
.cert-kpi-card small {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 4px;
}
.cert-kpi-card strong {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}
.cert-kpi-card span {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  font-weight: 600;
}
.cert-kpi-card span.pos { color: #16a34a; }

.cert-footer {
  border-top: 1px dashed #cbd5e1;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: #64748b;
}
.cert-hash {
  font-family: monospace;
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 4px;
  color: #334155;
  font-size: 10.5px;
}

.proof-modal-actions {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

@media print {
  body * {
    visibility: hidden;
  }
  .proof-modal-overlay,
  .proof-modal-window,
  .proof-modal-body,
  .aircheck-cert,
  .aircheck-cert * {
    visibility: visible;
  }
  .proof-modal-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    padding: 0;
  }
  .proof-modal-header,
  .proof-modal-actions,
  .proof-modal-close {
    display: none !important;
  }
  .proof-modal-window {
    box-shadow: none;
    border: none;
    max-width: 100%;
  }
}

/* ==========================================================================
   Documents Hub Subnav & Subpanels (Milestone 18)
   ========================================================================== */
.docs-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.docs-subtab-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.docs-subtab-btn:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.03);
}

.docs-subtab-btn.is-active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.docs-subpanel {
  display: block;
}
.docs-subpanel[hidden] {
  display: none !important;
}

/* ==========================================================================
   Content Intelligence: Air Clock & Speech-to-Music Ratio
   ========================================================================== */
.air-clock-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.air-clock-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.air-clock-pill b {
  color: var(--text);
}

.dot--music { background: #0077ff; }
.dot--talk { background: #f59e0b; }
.dot--news { background: #10b981; }
.dot--ads { background: #fc3f1d; }

/* ==========================================================================
   Talk Fatigue & Speech Duration Curve
   ========================================================================== */
.fatigue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.fatigue-row {
  display: grid;
  grid-template-columns: 140px 1fr 60px;
  align-items: center;
  gap: 14px;
}

.fatigue-row__info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12.5px;
}

.fatigue-bar-wrap {
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}

.fatigue-bar {
  height: 100%;
}
.fatigue-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}
.fatigue-bar i.is-good { background: #10b981; }
.fatigue-bar i.is-warn { background: #f59e0b; }
.fatigue-bar i.is-risk { background: #fc3f1d; }

/* ==========================================================================
   News Benchmarks & Traffic Boost
   ========================================================================== */
.news-benchmarks-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.news-bench-card {
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.news-bench-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}
.news-bench-card__head span {
  font-weight: 600;
  color: var(--text);
}
.news-bench-card__head strong {
  font-size: 14px;
}

.news-bench-card__delta {
  font-size: 11px;
  color: var(--muted);
}

/* ==========================================================================
   REST API Endpoints Grid & Cards
   ========================================================================== */
.api-endpoints-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.api-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.api-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.http-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.http-get {
  background: #eff6ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}
.http-post {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.api-card code {
  font-family: monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.api-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

.api-card__meta {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--subtle);
}
.api-card__meta code {
  font-size: 11px;
  background: var(--surface-2);
  padding: 1px 4px;
  border-radius: 3px;
}

/* ==========================================================================
   Compliance & Legal Regulations Grid
   ========================================================================== */
.compliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

/* ==========================================================================
   Simulator & Data Pipeline Subnav & Panels
   ========================================================================== */
.sim-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.sim-subtab-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sim-subtab-btn:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.03);
}

.sim-subtab-btn.is-active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.sim-subpanel {
  display: block;
}
.sim-subpanel[hidden] {
  display: none !important;
}

.pipeline-flow-diagram {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.pipeline-flow-step {
  background: var(--surface-1);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.pipeline-flow-step:hover {
  transform: translateY(-2px);
  border-color: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}

.pipeline-flow-step.is-selected {
  border-color: #2563eb;
  background: #f8faff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.pipeline-step-click-hint {
  margin-top: auto;
  padding-top: 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #2563eb;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pipeline-step-detail-card {
  margin: 16px 0 24px 0;
  background: var(--surface-1);
  border: 1.5px solid #bfdbfe;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.06);
}

.pipeline-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.pipeline-detail-item {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.pipeline-detail-item dt {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.pipeline-detail-item dd {
  font-size: 13px;
  color: var(--text);
  margin: 0;
  line-height: 1.45;
}

.pipeline-flow-step__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: #eff6ff;
  color: #0284c7;
  margin-bottom: 10px;
  align-self: flex-start;
}

.pipeline-flow-step h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--text);
}

.pipeline-flow-step p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.pipeline-flow-step ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
}

.gt-obs-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

@media (max-width: 860px) {
  .gt-obs-comparison-grid {
    grid-template-columns: 1fr;
  }
}

.gt-obs-card {
  border-radius: 10px;
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--surface-1);
}

.gt-obs-card--gt {
  border-left: 4px solid #8b5cf6;
}

.gt-obs-card--obs {
  border-left: 4px solid #10b981;
}

.gt-obs-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.gt-obs-card__title {
  font-size: 14px;
  font-weight: 700;
}

.gt-obs-metrics-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.gt-obs-metric-box {
  padding: 10px;
  border-radius: 6px;
  background: var(--surface-2);
}

.gt-obs-metric-box span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.gt-obs-metric-box strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  margin-top: 2px;
}

.error-budget-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* ==========================================================================
   Defense Shield & Testbench Interactive Styles
   ========================================================================== */
.defense-testbench-card {
  border: 1.5px solid #cbd5e1;
  background: var(--surface-1);
}

.testbench-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.testbench-btn {
  padding: 8px 14px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.testbench-btn:hover {
  border-color: #2563eb;
  background: #f8faff;
  color: #2563eb;
}

.testbench-btn.is-active {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.testbench-result-box {
  padding: 16px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.defense-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.defense-card {
  padding: 16px;
  border-radius: 10px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.defense-card__icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.defense-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--text);
}

.defense-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 10px 0;
}

.defense-card ul {
  margin: 0;
  padding-left: 16px;
  font-size: 11.5px;
  color: var(--subtle);
  line-height: 1.5;
}

/* MUSIC INTELLIGENCE & FORMAT CLOCKS STUDIO */
.music-clock-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 16px;
  margin-top: 18px;
}

.format-clock-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.clock-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.clock-head h4 {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.clock-bars-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.clock-bar-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}

.clock-bar-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: var(--val, 25%);
  background: var(--blue);
}

.clock-bar-item:nth-child(1)::before { background: #fc3f1d; } /* Power Current Hot */
.clock-bar-item:nth-child(2)::before { background: #16a34a; } /* Secondary Green */
.clock-bar-item:nth-child(3)::before { background: #0284c7; } /* Recurrent Blue */
.clock-bar-item:nth-child(4)::before { background: #eab308; } /* Gold Amber */

.clock-bar-item span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.clock-bar-item small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

.tempo-flow-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle, #f1f5f9);
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.tempo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
}

.tempo-pill.tempo--up { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.tempo-pill.tempo--mid { background: #eff6ff; color: #0284c7; border: 1px solid #bfdbfe; }
.tempo-pill.tempo--slow { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }

/* TRACK FUNNEL */
.track-funnel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.track-funnel-step {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.funnel-step-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
}

.funnel-time {
  font-family: monospace;
  font-weight: 700;
  color: var(--muted);
}

.funnel-step-head strong {
  color: #16a34a;
  font-size: 12.5px;
}

.funnel-bar {
  height: 5px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.funnel-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 999px;
}

.funnel-step-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  color: var(--muted);
}

/* MUSIC DIRECTOR ACTIONS */
.director-actions-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.director-action-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  transition: all 0.15s ease;
}

.director-action-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.director-action-btn.is-primary {
  background: var(--ym-yellow, #ffcc00);
  border-color: #eab308;
  color: #1a1a1a;
}

.director-action-btn.is-primary:hover {
  background: #eab308;
}

.director-toast {
  padding: 8px 12px;
  border-radius: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  display: none;
}
.director-toast.is-visible {
  display: block;
  animation: fadeInToast 0.25s ease;
}
@keyframes fadeInToast {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.burnout-threshold-line {
  stroke: #dc2626;
  stroke-dasharray: 4 3;
  stroke-width: 1.5;
  opacity: 0.8;
}

@media (max-width: 900px) {
  .music-clock-grid { grid-template-columns: 1fr; }
  .clock-bars-row { grid-template-columns: repeat(2, 1fr); }
  .track-funnel-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========================================================
   01 / ПУЛЬС ЭФИРА (LIVE RADAR) · BI & COCKPIT ENHANCEMENTS
   ======================================================== */

.live-control-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 22px;
  box-shadow: 0 1px 2px rgba(33, 36, 44, 0.04);
}
.ribbon-health-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.status-indicator-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
  animation: pulse 1.8s ease-in-out infinite;
}
.ribbon-health-item b {
  color: #16a34a;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.ribbon-scope-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.scope-pill {
  padding: 5px 11px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--muted);
  font: 600 11.5px/1 var(--font);
  cursor: pointer;
  transition: all 0.15s ease;
}
.scope-pill:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
}
.scope-pill.is-active {
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}
.ribbon-legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 11.5px;
  font-weight: 500;
}
.ribbon-legal-badge b {
  color: #15803d;
  font-weight: 700;
}

/* METRIC MINI SUBBARS */
.metric-kpi-subbar {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.subbar-track {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}
.subbar-track i {
  display: block;
  height: 100%;
  background: var(--blue);
  border-radius: 2px;
}
.subbar-track--cyan i { background: #0284c7; }
.subbar-track--green i { background: #16a34a; }
.subbar-track--orange i { background: #ea580c; }
.metric-kpi-subbar span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

/* CHART INTERACTIVE CROSSHAIR & TOOLTIP */
.chart-crosshair {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.chart-crosshair.is-visible {
  opacity: 1;
}
.chart-crosshair-line {
  stroke: #0284c7;
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}
.chart-crosshair-point {
  fill: #0284c7;
  stroke: #ffffff;
  stroke-width: 3;
}
.chart-hover-tooltip {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  z-index: 50;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -120%);
  transition: opacity 0.15s ease, transform 0.08s ease;
  white-space: nowrap;
}
.chart-hover-tooltip.is-visible {
  opacity: 1;
}
.tooltip-time {
  font-weight: 700;
  color: #93c5fd;
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.tooltip-listeners {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}
.tooltip-ret {
  font-size: 11.5px;
  color: #a7f3d0;
  margin-top: 2px;
}
.tooltip-segment {
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 2px;
}

/* NOW PLAYING TRACK PROGRESS & CHANNEL */
.now-track-progress-wrap {
  margin: 12px 0 10px;
}
.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.progress-labels [data-now-progress-status] {
  font-weight: 600;
  color: var(--blue);
}
.now-progress-bar {
  height: 5px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}
.now-progress-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: 3px;
  transition: width 0.3s ease;
}
.now-channel-quality {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}
.now-channel-quality .badge-mini {
  background: #eff6ff;
  color: #0284c7;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
}

/* TACTICAL REAL-TIME BANNER */
.live-tactical-banner {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(33, 36, 44, 0.05);
}
.tactical-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.tactical-badge {
  font-size: 11px;
  font-weight: 700;
  color: #d97706;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.06em;
}
.tactical-timestamp {
  font-size: 11.5px;
  color: var(--subtle);
}
.tactical-banner-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .tactical-banner-body { grid-template-columns: 1fr; }
}
.tactical-alert-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid var(--border);
}
.tactical-alert-item.is-warning {
  background: #fffbeb;
  border-color: #fde68a;
}
.tactical-alert-item.is-opportunity {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.tactical-icon {
  font-size: 18px;
  line-height: 1;
}
.tactical-alert-item strong {
  display: block;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 4px;
}
.tactical-alert-item p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}









