/* ===========================================
   Premium UI Polish Layer — Porto Guará
   Additive high-end enhancements (2026-07-24)
   Does NOT override existing styles — layers on top.
   =========================================== */

/* ── 1. Card entrance animation (staggered fade-in) ── */
@keyframes cardEnter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ov-card,
.module-content > section,
.module-content > div > section {
  animation: cardEnter 0.4s cubic-bezier(0.32, 0.72, 0, 1) both;
}
.ov-card:nth-child(2), .module-content > section:nth-child(2) { animation-delay: 0.06s; }
.ov-card:nth-child(3), .module-content > section:nth-child(3) { animation-delay: 0.12s; }
.ov-card:nth-child(4), .module-content > section:nth-child(4) { animation-delay: 0.18s; }

/* ── 2. Premium card hover — subtle lift + edge glow ── */
.ov-card {
  transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1),
              box-shadow 0.25s cubic-bezier(0.32, 0.72, 0, 1),
              border-color 0.25s ease;
}
.ov-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 229, 160, 0.06),
              0 2px 8px rgba(0, 0, 0, 0.3);
  border-color: rgba(0, 229, 160, 0.15);
}

/* ── 3. Sidebar active indicator — gradient left bar ── */
.nav-item.active,
.nav-item[aria-current="page"] {
  position: relative;
  background: linear-gradient(90deg, rgba(0, 229, 160, 0.08) 0%, transparent 100%);
}
.nav-item.active::before,
.nav-item[aria-current="page"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--brand-primary-400, #1affab), var(--brand-primary-600, #00b380));
  box-shadow: 0 0 8px rgba(0, 229, 160, 0.4);
}

/* ── 4. Sidebar hover refinement ── */
.nav-item {
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}
.nav-item:hover:not(.active) {
  padding-left: 14px;
  background: rgba(255, 255, 255, 0.03);
}

/* ── 5. Loading skeleton shimmer ── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton,
[data-loading="true"] {
  background: linear-gradient(90deg,
    var(--bg-card, #1a1c2e) 25%,
    rgba(255, 255, 255, 0.04) 50%,
    var(--bg-card, #1a1c2e) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm, 6px);
  min-height: 1em;
}

/* ── 6. Refined heading typography ── */
.ov-card h3,
.ov-card h4,
.module-content h2,
.module-content h3 {
  letter-spacing: -0.01em;
  font-weight: 700;
}
.ov-card h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #8b8fa3);
  margin-bottom: 12px;
}

/* ── 7. Button press feedback ── */
.btn:active,
.btn-primary:active,
.btn-accent:active {
  transform: scale(0.97);
  transition-duration: 0.08s;
}

/* ── 8. Focus-visible rings (accessibility) ── */
.btn:focus-visible,
.nav-item:focus-visible,
.form-input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--brand-primary-400, #1affab);
  outline-offset: 2px;
  border-radius: var(--radius-sm, 6px);
}

/* ── 9. Smooth module transition ── */
.module-content {
  animation: cardEnter 0.3s cubic-bezier(0.32, 0.72, 0, 1) both;
}

/* ── 10. Status bar refinement ── */
#statusBar {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
#statusBar .status-item {
  transition: opacity 0.2s ease;
}
#statusBar .status-item:hover {
  opacity: 0.85;
}

/* ── 11. Advisor bubble polish ── */
.advisor-bubble,
[class*="advisor"] {
  transition: transform 0.2s cubic-bezier(0.32, 0.72, 0, 1),
              box-shadow 0.2s ease;
}
.advisor-bubble:hover,
[class*="advisor"]:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ── 12. Chart container polish ── */
canvas,
svg.chart,
[class*="chart-container"] {
  border-radius: var(--radius-sm, 6px);
}

/* ── 13. Scrollbar refinement ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ── 14. Tooltip refinement ── */
[title],
[data-tooltip] {
  position: relative;
}

/* ── 15. Table row hover ── */
table tbody tr {
  transition: background 0.15s ease;
}
table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* ── 16. Badge/chip micro-interaction ── */
.reg-chip,
.badge,
[class*="tier-chip"],
[class*="status-badge"] {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.reg-chip:hover,
.badge:hover {
  transform: translateY(-1px);
}

/* ── 17. Modal/dialog entrance ── */
@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal,
.dialog,
[class*="modal-overlay"] > div,
[class*="drawer"] {
  animation: modalEnter 0.25s cubic-bezier(0.32, 0.72, 0, 1) both;
}

/* ── 18. Gradient text for key headings ── */
.login-brand h1,
.login-brand .brand-title {
  background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── 19. Subtle grid pattern on empty states ── */
.empty-state,
[class*="no-data"] {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
  background-size: 24px 24px;
  border-radius: var(--radius-md, 8px);
  padding: 32px;
  text-align: center;
  color: var(--text-muted, #5a5e72);
}

/* ── 20. Print-friendly (hide interactive chrome) ── */
@media print {
  #appHeader, .sidebar, .advisor-bubble, #statusBar, .btn { display: none !important; }
  .module-content { animation: none !important; }
  .ov-card { break-inside: avoid; box-shadow: none !important; border: 1px solid #ccc !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM v2 — Targeted polish (2026-07-24 seat#4)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 21. Status ticker — smooth infinite scroll ── */
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-wrap,
[class*="ticker"],
#newsTicker {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent 0%, black 3%, black 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 3%, black 97%, transparent 100%);
}
.ticker-wrap:hover [class*="ticker-track"],
.ticker-wrap:hover [class*="ticker-content"],
[class*="ticker"]:hover [class*="track"] {
  animation-play-state: paused;
}

/* ── 22. Advisor column — refined spacing + hover reveal ── */
[class*="advisor-col"],
[class*="advisor-stack"] {
  gap: 6px;
}
[class*="advisor-col"] > *,
[class*="advisor-stack"] > * {
  transition: transform 0.2s cubic-bezier(0.32, 0.72, 0, 1),
              opacity 0.2s ease;
}

/* ── 23. Overview card grid — responsive auto-fit ── */
/* NOTE: .overview-grid uses a 12-column bento system (styles.css ~L222).
   Do NOT override its grid-template-columns here — only target .ov-grid
   and inline-styled grids that don't have their own column system. */
.ov-grid,
.module-content > div[style*="grid"] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
@media (max-width: 900px) {
  .ov-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
  }
}
@media (max-width: 600px) {
  .ov-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

/* ── 24. Data table — zebra + refined borders ── */
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-secondary, #0f1019);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #8b8fa8);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, #1e2035);
  font-weight: 600;
}
table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
  color: var(--text-primary, #e8e9f0);
}
table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}
table tbody tr:hover {
  background: rgba(0, 229, 160, 0.03);
}

/* ── 25. Module header refinement ── */
.module-header,
[class*="module-title-bar"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, #1e2035);
  margin-bottom: 16px;
}
.module-header h2,
.module-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ── 26. Comment section polish ── */
.comment-item,
[class*="comment-row"] {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
}
.comment-item:hover,
[class*="comment-row"]:hover {
  background: rgba(255, 255, 255, 0.01);
  border-radius: var(--radius-sm, 6px);
}
.comment-item .comment-author,
[class*="comment-name"] {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--brand-primary-500, #00e5a0);
}
.comment-item .comment-time,
[class*="comment-date"] {
  font-size: 0.7rem;
  color: var(--text-muted, #5a5e78);
  margin-left: 8px;
}

/* ── 27. Chip/badge group — flex wrap with gap ── */
.chip-group,
[class*="tag-group"],
[class*="badge-row"] {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── 28. Progress bar / timeline refinement ── */
.progress-bar,
[class*="progress-track"] {
  height: 6px;
  border-radius: 3px;
  background: var(--bg-input, #1a1c2e);
  overflow: hidden;
}
.progress-bar > *,
[class*="progress-fill"] {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-primary-500, #00e5a0), var(--brand-primary-400, #1affab));
  transition: width var(--ms-duration-slow, 320ms) var(--ms-ease-emphasized, cubic-bezier(0.32, 0.72, 0, 1));
}

/* ── 29. Tooltip / popover refinement ── */
[role="tooltip"],
.tooltip,
[class*="popover"] {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: var(--ms-elevated, #162235);
  border: 1px solid var(--ms-border, var(--border-light, #2a2d48));
  border-radius: var(--radius-sm, 6px);
  box-shadow: var(--ms-shadow-md, 0 8px 32px rgba(0, 0, 0, 0.4));
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--ms-text, var(--text-primary, #e8e9f0));
  animation: cardEnter 0.15s var(--ms-ease-standard, cubic-bezier(0.4, 0, 0.2, 1)) both;
}

/* ── 30. Ring/donut chart container ── */
.ring-chart,
[class*="donut-chart"],
[class*="pie-chart"] {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ring-chart .ring-label,
[class*="donut"] .center-label {
  position: absolute;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand-primary-500, #00e5a0);
  font-variant-numeric: tabular-nums;
}

/* ── 31. Horizontal bar chart (risk distribution) ── */
.h-bar-chart,
[class*="bar-chart-h"] {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.h-bar-chart .bar-row,
[class*="bar-row"] {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
}
.h-bar-chart .bar-fill,
[class*="bar-fill"] {
  height: 8px;
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* ── 32. Timeline / stepper refinement ── */
.timeline-step,
[class*="step-item"] {
  position: relative;
  padding-left: 24px;
}
.timeline-step::before,
[class*="step-item"]::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border, #1e2035);
}
.timeline-step.active::before,
[class*="step-item"].active::before {
  background: var(--brand-primary-500, #00e5a0);
}
.timeline-step::after,
[class*="step-item"]::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-light, #2a2d48);
  border: 2px solid var(--bg-primary, #09090f);
}
.timeline-step.active::after,
[class*="step-item"].active::after {
  background: var(--brand-primary-500, #00e5a0);
  box-shadow: 0 0 8px rgba(0, 229, 160, 0.4);
}

/* ── 33. Drawer / slide-out panel ── */
@keyframes drawerSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.drawer,
[class*="detail-panel"],
[class*="slide-panel"] {
  animation: drawerSlideIn 0.3s cubic-bezier(0.32, 0.72, 0, 1) both;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
}

/* ── 34. Reduced motion preference ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── 35. High-contrast mode support ── */
@media (prefers-contrast: high) {
  .ov-card { border-width: 2px; }
  .btn { border: 2px solid currentColor; }
  .nav-item.active::before { width: 4px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM v3 — Login page high-end polish (2026-07-24 seat#4)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 36. Animated mesh gradient background ── */
@keyframes meshGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
#loginScreen {
  background: linear-gradient(135deg,
    #09090f 0%,
    #0d1117 25%,
    #0a1628 50%,
    #0d1117 75%,
    #09090f 100%);
  background-size: 400% 400%;
  animation: meshGradient 20s ease infinite;
}
/* Subtle radial glow behind the card */
#loginScreen::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 229, 160, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

/* ── 37. Login card entrance — scale + fade ── */
@keyframes loginCardEnter {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.login-card {
  animation: loginCardEnter var(--ms-duration-slow, 320ms) var(--ms-ease-emphasized, cubic-bezier(0.32, 0.72, 0, 1)) both;
}

/* ── 38. Gradient top bar shimmer ── */
@keyframes gradientShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.login-card::before {
  background: linear-gradient(90deg,
    var(--brand-primary-500, #00e5a0) 0%,
    var(--brand-accent-500, #3b82f6) 25%,
    var(--brand-primary-400, #1affab) 50%,
    var(--brand-accent-500, #3b82f6) 75%,
    var(--brand-primary-500, #00e5a0) 100%);
  background-size: 200% 100%;
  animation: gradientShimmer 4s linear infinite;
}

/* ── 39. Input field focus glow ── */
.login-card input,
.login-card .form-input,
#loginForm input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.login-card input:focus,
.login-card .form-input:focus,
#loginForm input:focus {
  border-color: var(--brand-primary-500, #00e5a0);
  box-shadow: 0 0 0 3px rgba(0, 229, 160, 0.1),
              0 0 16px rgba(0, 229, 160, 0.05);
  outline: none;
}

/* ── 40. Login button premium hover + press ── */
.login-card button[type="submit"],
#loginForm button[type="submit"] {
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  position: relative;
  overflow: hidden;
}
.login-card button[type="submit"]:hover,
#loginForm button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 229, 160, 0.2);
  filter: brightness(1.05);
}
.login-card button[type="submit"]:active,
#loginForm button[type="submit"]:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 229, 160, 0.15);
}
/* Subtle shine sweep on hover */
.login-card button[type="submit"]::after,
#loginForm button[type="submit"]::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left var(--ms-duration-base, 200ms) var(--ms-ease-standard, cubic-bezier(0.4, 0, 0.2, 1));
}
.login-card button[type="submit"]:hover::after,
#loginForm button[type="submit"]:hover::after {
  left: 100%;
}

/* ── 41. Login footer encrypted badge pulse ── */
.login-footer span:first-child,
[class*="encrypted"] {
  animation: subtlePulse 3s ease-in-out infinite;
}
@keyframes subtlePulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

/* ── 42. Brand logo subtle float ── */
.login-brand .brand-logo,
.login-brand img {
  animation: logoFloat 6s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM v3b — Dashboard chrome polish (2026-07-24 seat#4)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 43. Module transition — smooth fade when switching ── */
.module-content,
[class*="module-panel"] {
  animation: moduleEnter 0.35s cubic-bezier(0.32, 0.72, 0, 1) both;
}
@keyframes moduleEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 44. Advisor bubbles staggered entrance ── */
.advisor-bubbles .advisor-bubble {
  animation: bubbleEnter 0.4s cubic-bezier(0.32, 0.72, 0, 1) both;
}
.advisor-bubbles .advisor-bubble:nth-child(1) { animation-delay: 0.05s; }
.advisor-bubbles .advisor-bubble:nth-child(2) { animation-delay: 0.10s; }
.advisor-bubbles .advisor-bubble:nth-child(3) { animation-delay: 0.15s; }
.advisor-bubbles .advisor-bubble:nth-child(4) { animation-delay: 0.20s; }
.advisor-bubbles .advisor-bubble:nth-child(5) { animation-delay: 0.25s; }
.advisor-bubbles .advisor-bubble:nth-child(6) { animation-delay: 0.30s; }
.advisor-bubbles .advisor-bubble:nth-child(7) { animation-delay: 0.35s; }
.advisor-bubbles .advisor-bubble:nth-child(8) { animation-delay: 0.40s; }
@keyframes bubbleEnter {
  from { opacity: 0; transform: scale(0.5) translateX(20px); }
  to   { opacity: 1; transform: scale(1) translateX(0); }
}

/* ── 45. Header stat items — separator + hover ── */
#appHeader [class*="stat"],
#appHeader .header-stat {
  position: relative;
  padding: 0 12px;
  transition: color 0.2s ease;
}
#appHeader [class*="stat"]:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background: var(--border, #1e2035);
}
#appHeader [class*="stat"]:hover {
  color: var(--brand-primary-400, #1affab);
}

/* ── 46. Ticker item dividers ── */
.ticker-item:not(:last-child)::after {
  content: '·';
  margin-left: 20px;
  color: var(--text-muted, #5a5e78);
  opacity: 0.4;
}

/* ── 47. Advisor chat popup entrance ── */
.advisor-chat-popup.show {
  animation: popupEnter 0.3s cubic-bezier(0.32, 0.72, 0, 1) both;
}
@keyframes popupEnter {
  from { opacity: 0; transform: scale(0.9) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── 48. Notification toast entrance ── */
.advisor-notification {
  animation: notifEnter 0.35s cubic-bezier(0.32, 0.72, 0, 1) both;
}
@keyframes notifEnter {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM v4 — Overview dashboard data polish + form refinement
   (2026-07-24 seat#5)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 49. KPI strip — number glow + hover lift + sparkline container ── */
.kpi {
  position: relative;
  padding: 10px 8px;
  border-radius: var(--radius-md, 10px);
  transition: transform 0.2s cubic-bezier(0.32, 0.72, 0, 1),
              background 0.2s ease;
}
.kpi:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.02);
}
.kpi-num {
  text-shadow: 0 0 20px rgba(0, 229, 160, 0.15);
  transition: text-shadow 0.3s ease;
}
.kpi:hover .kpi-num {
  text-shadow: 0 0 28px rgba(0, 229, 160, 0.3);
}
.kpi-spark {
  border-radius: 3px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.kpi:hover .kpi-spark {
  opacity: 1;
}
.kpi-icon {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.2s ease;
}
.kpi:hover .kpi-icon {
  transform: scale(1.1);
}

/* ── 50. Vitals grid — refined spacing + value accent ── */
.vitals-grid {
  gap: 12px;
}
.vital {
  padding: 8px 10px;
  border-radius: var(--radius-sm, 6px);
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.vital:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(0, 229, 160, 0.1);
}
.v-label {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}
.v-val {
  font-variant-numeric: tabular-nums;
}
.v-val.accent-text {
  color: var(--brand-primary-400, #1affab);
  text-shadow: 0 0 12px rgba(0, 229, 160, 0.1);
}

/* ── 51. Countdown ring — ambient glow + refined typography ── */
.ring-wrap {
  filter: drop-shadow(0 0 16px rgba(0, 229, 160, 0.08));
}
.ring-num {
  text-shadow: 0 0 24px rgba(0, 229, 160, 0.2);
}
.ring-fill {
  filter: drop-shadow(0 0 6px rgba(0, 229, 160, 0.3));
  transition: stroke-dashoffset 1s cubic-bezier(0.32, 0.72, 0, 1);
}
.cd-meta div {
  border-bottom-color: rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
  padding: 4px 6px;
  border-radius: 4px;
}
.cd-meta div:hover {
  background: rgba(255, 255, 255, 0.02);
}
.cd-meta div span:last-child {
  color: var(--brand-primary-400, #1affab);
}

/* ── 52. Risk legend — colored indicator dots ── */
.risk-legend .rl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease, transform 0.15s ease;
}
.risk-legend .rl:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}
.risk-legend .rl::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.risk-legend .rl.high::before { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); }
.risk-legend .rl.med::before  { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
.risk-legend .rl.low::before  { background: #00e5a0; box-shadow: 0 0 6px rgba(0, 229, 160, 0.4); }

/* ── 53. Overview card headers — icon badge + hint refinement ── */
.ov-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #8b8fa8);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.ov-header > span:first-child {
  font-size: 1rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}
.ov-header-hint {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--text-muted, #5a5e78);
  font-style: italic;
}

/* ── 54. Header stat bar — connection status pulse ── */
.conn-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.conn-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-primary-500, #00e5a0);
  box-shadow: 0 0 6px rgba(0, 229, 160, 0.5);
  animation: connPulse 2s ease-in-out infinite;
}
@keyframes connPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(0, 229, 160, 0.5); }
  50%      { opacity: 0.5; box-shadow: 0 0 2px rgba(0, 229, 160, 0.2); }
}
.stat-label-bi {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #5a5e78);
}
.stat-value {
  font-variant-numeric: tabular-nums;
  transition: color 0.2s ease;
}
.pulse-accent {
  animation: subtlePulse 3s ease-in-out infinite;
}

/* ── 55. Form elements — app-wide input/select/textarea polish ── */
.form-input,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="url"],
select,
textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.form-input:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-primary-500, #00e5a0);
  box-shadow: 0 0 0 3px rgba(0, 229, 160, 0.08);
  outline: none;
}
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%238b8fa8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}

/* ── 56. Button refinement — primary + accent variants ── */
.btn,
.btn-primary,
.btn-accent {
  transition: transform 0.15s ease, box-shadow 0.2s ease,
              filter 0.2s ease, background 0.2s ease;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.btn:hover,
.btn-primary:hover,
.btn-accent:hover {
  filter: brightness(1.08);
}
.btn-primary:hover,
.btn-accent:hover {
  box-shadow: 0 4px 16px rgba(0, 229, 160, 0.15);
}

/* ── 57. Chart container — subtle inner border + radius ── */
.chart-wrap-sm {
  border-radius: var(--radius-sm, 6px);
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(0, 0, 0, 0.1);
  padding: 4px;
}

/* ── 58. Parties card — flag + box polish ── */
.party-box {
  border-radius: var(--radius-md, 10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.party-box:hover {
  border-color: rgba(0, 229, 160, 0.12);
  background: rgba(255, 255, 255, 0.015);
}
.party-flag {
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

/* ── 59. Executive signals strip — card entrance stagger ── */
.exec-signals-strip > * {
  animation: cardEnter 0.4s cubic-bezier(0.32, 0.72, 0, 1) both;
}
.exec-signals-strip > *:nth-child(2) { animation-delay: 0.08s; }
.exec-signals-strip > *:nth-child(3) { animation-delay: 0.16s; }
.exec-signals-strip > *:nth-child(4) { animation-delay: 0.24s; }

/* ── 60. Overview grid — responsive helpers (bento-safe) ── */
/* NOTE: .overview-grid responsive is handled by styles.css bento rules
   (L263-271, L865-867). Only add non-conflicting helpers here. */
@media (max-width: 700px) {
  .kpi-strip {
    flex-wrap: wrap;
    gap: 6px;
  }
  .kpi {
    flex: 1 1 calc(33% - 6px);
    min-width: 90px;
  }
  .vitals-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cd-meta {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM v5 — Sidebar + navigation polish (2026-07-24 seat#5)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 61. Sidebar smooth collapse transition ── */
.sidebar {
  transition: width 0.3s cubic-bezier(0.32, 0.72, 0, 1),
              min-width 0.3s cubic-bezier(0.32, 0.72, 0, 1),
              background 0.2s ease;
}
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .sidebar-version {
  transition: opacity 0.2s ease, width 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

/* ── 62. Sidebar section title refinement ── */
.sidebar-title {
  position: relative;
  padding-bottom: 8px;
}
.sidebar-title::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 10px;
  right: 10px;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 229, 160, 0.15), transparent);
}

/* ── 63. Nav icon consistent sizing + subtle shadow ── */
.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* ── 64. Nav item active glow refinement ── */
.nav-item.active {
  box-shadow: 0 0 12px rgba(0, 229, 160, 0.04),
              inset 0 0 0 1px rgba(0, 229, 160, 0.06);
}

/* ── 65. Sidebar version text — subtle branding ── */
.sidebar-version {
  letter-spacing: 0.04em;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}
.sidebar-version:hover {
  opacity: 0.8;
}

/* ── 66. Sidebar collapse button polish ── */
.sidebar-collapse-btn {
  transition: background 0.2s ease, transform 0.15s ease;
}
.sidebar-collapse-btn:hover {
  transform: scale(1.05);
}
.sidebar-collapse-btn:active {
  transform: scale(0.95);
}

/* ── 67. Mobile sidebar entrance — smoother slide ── */
@media (max-width: 768px) {
  .sidebar {
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .sidebar-overlay {
    transition: opacity 0.3s ease;
  }
}

/* ═══ Seat#8 UI/UX Upgrade ═══════════════════════════════════════════════ */

/* ── 68. Sortable table headers — hover + active states ── */
th[style*="cursor: pointer"],
th[style*="cursor:pointer"] {
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
  position: relative;
}
th[style*="cursor: pointer"]:hover,
th[style*="cursor:pointer"]:hover {
  background: rgba(0, 229, 160, 0.06);
  color: var(--brand-primary-400, #1affab);
}
.sort-arrow {
  color: var(--brand-primary-400, #1affab);
  font-size: 0.7em;
}

/* ── 69. Module transition — smooth cross-module navigation ── */
.module-panel {
  animation: moduleEnter 0.3s cubic-bezier(0.32, 0.72, 0, 1) both;
}
@keyframes moduleEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 70. Table row hover — subtle highlight for data tables ── */
.risk-table tbody tr,
.market-freight-table tbody tr,
.pilot-table tbody tr,
.gm-table tbody tr {
  transition: background 0.15s ease;
}
.risk-table tbody tr:hover,
.market-freight-table tbody tr:hover,
.pilot-table tbody tr:hover,
.gm-table tbody tr:hover {
  background: rgba(0, 229, 160, 0.04);
}

/* ── 71. Better focus states for accessibility ── */
th[style*="cursor: pointer"]:focus-visible,
th[style*="cursor:pointer"]:focus-visible {
  outline: 2px solid var(--brand-primary-500, #00e5a0);
  outline-offset: -2px;
  border-radius: 4px;
}

/* ── 72. Responsive table improvements — horizontal scroll on mobile ── */
@media (max-width: 768px) {
  .risk-table,
  .market-freight-table,
  .pilot-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .risk-table thead,
  .market-freight-table thead,
  .pilot-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg-card, #12131e);
  }
}

/* ── 73. KPI card micro-interaction — subtle scale on hover ── */
.ov-card:active {
  transform: translateY(-1px) scale(0.995);
}

/* ── 74. Sidebar nav item — smoother active transition ── */
.nav-item {
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease,
              border-color 0.2s ease;
}

/* ── 75. Header stat pills — subtle hover feedback ── */
.header-stat {
  transition: opacity 0.2s ease;
}
.header-stat:hover {
  opacity: 0.85;
}

/* ── 76. Toast notification entrance — slide from right ── */
@keyframes toastEnter {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast {
  animation: toastEnter 0.3s cubic-bezier(0.32, 0.72, 0, 1) both;
}

/* ── 77. Modal entrance — scale + fade ── */
@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.pc-box,
.vessel-modal,
.cmd-palette {
  animation: modalEnter 0.25s cubic-bezier(0.32, 0.72, 0, 1) both;
}

/* ── 78. Loading skeleton shimmer — premium feel ── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton-overlay,
.loading-state .spinner {
  background: linear-gradient(90deg,
    var(--bg-card, #12131e) 25%,
    rgba(255,255,255,0.04) 50%,
    var(--bg-card, #12131e) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* ── 79. Button press feedback — tactile feel ── */
.btn:active {
  transform: scale(0.97);
}
.btn-accent:active {
  transform: scale(0.97);
  filter: brightness(0.9);
}

/* ── 80. Scrollbar refinement — thinner, more subtle ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ── 81. Regulatory summary card — clickable filter active state ── */
.reg-summary-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.reg-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.reg-summary-card--active {
  border-color: var(--brand-primary-500, #00e5a0) !important;
  box-shadow: 0 0 0 1px var(--brand-primary-500, #00e5a0),
              0 4px 16px rgba(0, 229, 160, 0.15);
}
.reg-summary-card--active .reg-summary-icon {
  transform: scale(1.15);
}

/* ── 82. Regulator card — smoother entrance + hover ── */
.regulator-card {
  animation: cardEnter 0.35s cubic-bezier(0.32, 0.72, 0, 1) both;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.regulator-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  border-color: rgba(0, 229, 160, 0.2);
}

/* ── 83. News article card — hover lift + border glow ── */
.news-article-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.news-article-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border-color: rgba(0, 229, 160, 0.15);
}

/* ── 84. Reduced motion — respect user preference globally ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── 85. Competitive port cards — entrance + hover + SWOT smooth toggle ── */
.comp-card {
  animation: cardEnter 0.4s cubic-bezier(0.32, 0.72, 0, 1) both;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.comp-card:nth-child(2) { animation-delay: 0.05s; }
.comp-card:nth-child(3) { animation-delay: 0.1s; }
.comp-card:nth-child(4) { animation-delay: 0.15s; }
.comp-card:nth-child(5) { animation-delay: 0.2s; }
.comp-card:nth-child(6) { animation-delay: 0.25s; }
.comp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border-color: rgba(0, 229, 160, 0.2);
}
.comp-card-guara {
  border-color: rgba(0, 229, 160, 0.3);
  box-shadow: 0 0 0 1px rgba(0, 229, 160, 0.15), 0 4px 16px rgba(0, 229, 160, 0.08);
}
.comp-card-guara:hover {
  border-color: rgba(0, 229, 160, 0.5);
  box-shadow: 0 0 0 1px rgba(0, 229, 160, 0.3), 0 8px 32px rgba(0, 229, 160, 0.12);
}

/* SWOT smooth expand/collapse */
.comp-card-swot {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.comp-card-swot.expanded {
  max-height: 600px;
}
.comp-card-swot-toggle {
  transition: color 0.2s ease;
}
.comp-card-swot-toggle:hover {
  color: var(--brand-primary-400, #1affab);
}
.comp-card-swot-toggle .chevron {
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  display: inline-block;
}
.comp-card-swot-toggle.open .chevron {
  transform: rotate(180deg);
}

/* ── 86. Comparison table — row hover + highlight row pulse ── */
.comp-table tbody tr {
  transition: background 0.15s ease;
}
.comp-table tbody tr:hover {
  background: rgba(0, 229, 160, 0.04);
}
.comp-row-highlight {
  background: rgba(0, 229, 160, 0.06);
}
.comp-row-highlight:hover {
  background: rgba(0, 229, 160, 0.1) !important;
}

/* ── 87. Competitive legend items — hover feedback ── */
.comp-legend-item {
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.comp-legend-item:hover {
  opacity: 0.8;
  transform: translateX(2px);
}

/* ── 88. SWOT quadrant colors — subtle differentiation ── */
.swot-s { border-left: 3px solid rgba(0, 229, 160, 0.5); }
.swot-w { border-left: 3px solid rgba(239, 68, 68, 0.5); }
.swot-o { border-left: 3px solid rgba(59, 130, 246, 0.5); }
.swot-t { border-left: 3px solid rgba(245, 158, 11, 0.5); }

/* ── 89. Financial scenario buttons — active state + hover ── */
.fin-scenario-btn {
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
              transform 0.15s ease, box-shadow 0.2s ease;
}
.fin-scenario-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.fin-scenario-btn.active {
  background: var(--brand-primary-500, #00e5a0);
  color: #0a0b14;
  border-color: var(--brand-primary-500, #00e5a0);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--brand-primary-500, #00e5a0),
              0 2px 12px rgba(0, 229, 160, 0.25);
}
.fin-scenario-btn:active {
  transform: scale(0.97);
}

/* ── 90. Financial KPI cards — hover lift + value emphasis ── */
.fin-kpi-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.fin-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border-color: rgba(0, 229, 160, 0.2);
}
.fin-kpi-value {
  transition: color 0.3s ease;
}
.fin-kpi-value.negative {
  color: var(--brand-red-400, #f87171);
}

/* ── 91. Financial sensitivity sliders — custom track + thumb ── */
.fin-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: background 0.2s ease;
}
.fin-slider input[type="range"]:hover {
  background: rgba(255, 255, 255, 0.15);
}
.fin-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand-primary-500, #00e5a0);
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(0, 229, 160, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fin-slider input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 4px rgba(0, 229, 160, 0.2);
}
.fin-slider input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand-primary-500, #00e5a0);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 0 2px rgba(0, 229, 160, 0.3);
}

/* ── 92. Financial chart containers — subtle border + hover ── */
.fin-chart-container {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.fin-chart-container:hover {
  border-color: rgba(0, 229, 160, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ── 93. KPI drill-down modal — functional upgrade (seat#8) ── */
.kpi-dd-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--ms-overlay, rgba(4, 8, 14, 0.78));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: kpiDdFadeIn 0.2s var(--ms-ease-standard, cubic-bezier(0.4, 0, 0.2, 1)) both;
}
@keyframes kpiDdFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.kpi-dd-modal {
  width: min(560px, 92vw);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg-card, #12131e);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  animation: kpiDdSlideUp 0.25s cubic-bezier(0.32, 0.72, 0, 1) both;
}
@keyframes kpiDdSlideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.kpi-dd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
}
.kpi-dd-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary, #e8eaf0);
}
.kpi-dd-icon { margin-right: 8px; }
.kpi-dd-close {
  background: none;
  border: none;
  color: var(--text-muted, #8b8fa8);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.kpi-dd-close:hover {
  color: var(--text-primary, #e8eaf0);
  background: rgba(255, 255, 255, 0.06);
}
.kpi-dd-body { padding: 20px; }
.kpi-dd-current {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
}
.kpi-dd-num {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand-primary-400, #1affab);
  font-variant-numeric: tabular-nums;
}
.kpi-dd-delta {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}
.kpi-dd-up { color: #f87171; background: rgba(248, 113, 113, 0.1); }
.kpi-dd-down { color: #4ade80; background: rgba(74, 222, 128, 0.1); }
.kpi-dd-flat { color: var(--text-muted, #8b8fa8); background: rgba(255,255,255,0.05); }
.kpi-dd-delta-lab {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted, #8b8fa8);
  margin-left: 4px;
}
.kpi-dd-section { margin-bottom: 20px; }
.kpi-dd-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary, #c8cbe0);
  margin-bottom: 8px;
}
.kpi-dd-section-hint {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted, #8b8fa8);
  margin-left: 6px;
}
.kpi-dd-chart-wrap {
  height: 140px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 8px;
}
.kpi-dd-methodology {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary, #c8cbe0);
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 12px 16px;
  border-left: 3px solid var(--brand-primary-500, #00e5a0);
}
.kpi-dd-drivers {
  list-style: none;
  padding: 0;
  margin: 0;
}
.kpi-dd-drivers li {
  font-size: 0.85rem;
  color: var(--text-secondary, #c8cbe0);
  padding: 6px 0 6px 20px;
  position: relative;
}
.kpi-dd-drivers li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--brand-primary-500, #00e5a0);
}
.kpi-dd-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
}
.kpi-dd-nodata {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted, #8b8fa8);
  font-size: 0.85rem;
}
/* KPI card clickable hint */
.kpi[style*="cursor: pointer"] .kpi-num,
.kpi[style*="cursor:pointer"] .kpi-num {
  transition: color 0.15s ease;
}
.kpi[style*="cursor: pointer"]:hover .kpi-num,
.kpi[style*="cursor:pointer"]:hover .kpi-num {
  color: var(--brand-primary-400, #1affab);
}
/* KPI drill-down data labels (source + age) — honest data provenance */
.kpi-dd-data-labels {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted, #8b8fa8);
}
.kpi-dd-source, .kpi-dd-age {
  display: flex;
  align-items: center;
  gap: 4px;
}
