:root {
  --bg: #f6f8fb;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --surface-soft: #f8fbff;
  --line: #e6ebf2;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --primary: #0057b8;
  --primary-soft: rgba(0, 87, 184, 0.08);
  --secondary: #00a86b;
  --secondary-soft: rgba(0, 168, 107, 0.12);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.12);
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.1);
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, Segoe UI, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(0, 87, 184, 0.05), transparent 28%),
    radial-gradient(circle at top right, rgba(0, 168, 107, 0.04), transparent 24%),
    var(--bg);
}
button, select { font: inherit; }
.app-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar {
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; margin-bottom: 24px; }
.brand__mark {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center;
  color: #fff; font-weight: 800; background: linear-gradient(180deg, #0a66d1, #0057b8);
  box-shadow: var(--shadow-md);
}
.brand__text { display: flex; flex-direction: column; }
.brand__text strong { font-size: 1rem; }
.brand__text span { color: var(--muted); font-size: 0.85rem; }
.sidebar__nav { display: grid; gap: 8px; }
.nav-item {
  border: 1px solid transparent; background: transparent; color: var(--muted);
  border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: .2s ease;
}
.nav-item:hover, .nav-item--active { background: var(--surface-strong); color: var(--text); border-color: var(--line); box-shadow: var(--shadow-sm); }
.sidebar-card, .hero-panel, .kpi-card, .chart-card, .insight-highlight-card, .heatmap-card, .alerts-card, .consulting-insights-card, .filter-field {
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.sidebar-card { border-radius: 20px; padding: 16px; }
.sidebar-card__eyebrow { margin: 0 0 8px; color: var(--muted); font-size: .78rem; text-transform: uppercase; }
.sidebar-card__title { display: block; margin-bottom: 8px; }
.sidebar-card__text { color: var(--muted); font-size: .88rem; }
.main { padding: 24px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 12px; }
.page-heading__eyebrow, .section-heading__eyebrow, .chart-card__eyebrow, .insight-highlight-card__eyebrow {
  color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 6px 10px; font-size: .78rem; font-weight: 700; display: inline-block;
}
.page-heading__title { margin: 10px 0 6px; font-size: clamp(1.9rem, 3vw, 2.7rem); letter-spacing: -.04em; }
.page-heading__subtitle, .section-heading__description, .hero-panel__description, .chart-card__description, .heatmap-card__description, .alerts-card__description, .consulting-insights-card__description, .footer__text { color: var(--muted); line-height: 1.6; }
.icon-button, .action-button {
  border: 1px solid var(--line); background: var(--surface-strong); color: var(--text);
  border-radius: 14px; padding: 12px 14px; cursor: pointer; transition: .2s ease; box-shadow: var(--shadow-sm);
}
.action-button { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.action-button--primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.icon-button:hover, .action-button:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.mobile-only { display: none; }
.hero-panel {
  border-radius: var(--radius-xl); padding: 28px; display: grid; grid-template-columns: 1.45fr 1fr; gap: 20px; margin-bottom: 24px;
}
.hero-panel__title { margin: 14px 0 10px; font-size: clamp(1.7rem, 3vw, 2.8rem); line-height: 1.04; letter-spacing: -.05em; }
.hero-panel__meta, .hero-mini-metrics, .filters-grid, .kpi-grid, .dashboard-grid { display: grid; gap: 14px; }
.hero-panel__meta { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; }
.meta-card, .mini-metric { background: var(--surface-strong); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.meta-card__label, .mini-metric__label, .kpi-card__label, .filter-field__label, .hero-summary-card__label { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 8px; text-transform: uppercase; }
.hero-summary-card { background: linear-gradient(180deg, #ffffff, #f7fafe); border: 1px solid var(--line); border-radius: 22px; padding: 18px; }
.hero-summary-card__header, .kpi-card__header, .kpi-card__footer, .chart-card__header, .heatmap-card__header, .footer { display: flex; justify-content: space-between; gap: 12px; }
.hero-summary-card__value { display: block; margin: 14px 0 8px; font-size: 2.2rem; letter-spacing: -.05em; }
.hero-mini-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; }
.filters-section, .kpi-section, .charts-section, .heatmap-section, .insights-section { margin-bottom: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 14px; }
.filters-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.filter-field { padding: 16px; border-radius: 20px; }
.filter-field__control { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; color: var(--text); }
.kpi-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi-card, .chart-card, .insight-highlight-card, .heatmap-card, .alerts-card, .consulting-insights-card { border-radius: var(--radius-lg); padding: 18px; transition: .24s ease; }
.kpi-card:hover, .chart-card:hover, .insight-highlight-card:hover, .heatmap-card:hover, .alerts-card:hover, .consulting-insights-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.kpi-card__value { display: block; margin-top: 8px; font-size: 1.7rem; letter-spacing: -.05em; }
.kpi-card__icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-soft); border: 1px solid var(--line); }
.kpi-card__sparkline { width: 100%; height: 48px !important; }
.status-pill, .chart-card__badge {
  border-radius: 999px; padding: 8px 10px; font-size: .78rem; font-weight: 700; background: var(--surface-soft); border: 1px solid var(--line);
}
.status-pill--positive { background: var(--secondary-soft); color: var(--secondary); border-color: transparent; }
.dashboard-grid--two-thirds { grid-template-columns: 1.45fr 1fr; margin-bottom: 16px; }
.dashboard-grid--insights { grid-template-columns: 1.05fr .95fr; }
.chart-card__title, .heatmap-card__title, .alerts-card__title, .consulting-insights-card__title, .insight-highlight-card__title { margin: 10px 0 6px; font-size: 1.05rem; }
.chart-card__body { height: 320px; }
.chart-card__body--small { height: 260px; }
.insight-highlight-card__text { color: var(--muted); line-height: 1.8; font-size: 1rem; }
.heatmap-card__body { overflow: auto; }
.heatmap { display: grid; grid-template-columns: 120px repeat(24, minmax(22px, 1fr)); gap: 6px; min-width: 820px; }
.heatmap-legend { display: flex; align-items: center; gap: 10px; }
.heatmap-legend__bar { width: 140px; height: 10px; border-radius: 999px; background: linear-gradient(90deg, rgba(0,87,184,.1), rgba(0,87,184,.35), rgba(0,168,107,.85)); }
.heatmap-legend__label { color: var(--muted); font-size: .78rem; }
.heat-label, .heat-cell, .hour-label { min-height: 28px; border-radius: 10px; display: grid; place-items: center; font-size: .76rem; }
.heat-label { background: #fff; border: 1px solid var(--line); color: var(--muted); justify-content: start; padding: 0 10px; font-weight: 600; }
.hour-label { color: var(--muted-2); font-weight: 700; }
.heat-cell { font-weight: 700; }
.alerts-card__list, .consulting-insights-card__list { display: grid; gap: 12px; }
.alert-item, .insight-item { border: 1px solid var(--line); border-radius: 18px; background: var(--surface-strong); padding: 14px; }
.alert-item { display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.alert-item__dot { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; }
.alert-item__dot--ok { background: var(--secondary-soft); color: var(--secondary); }
.alert-item__dot--warn { background: var(--warning-soft); color: var(--warning); }
.alert-item__dot--danger { background: var(--danger-soft); color: var(--danger); }
.alert-item__header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.alert-item__text, .insight-item__text { color: var(--muted); line-height: 1.65; font-size: .9rem; margin: 0; }
.footer { margin-top: 12px; padding-top: 24px; border-top: 1px solid var(--line); align-items: center; }
.footer__meta { color: var(--muted); }
.toast {
  position: fixed; right: 20px; bottom: 20px; background: rgba(15, 23, 42, .94); color: #fff;
  padding: 14px 16px; border-radius: 16px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 1280px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-100%); z-index: 20; transition: .24s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-only { display: inline-grid; place-items: center; }
  .hero-panel, .dashboard-grid--two-thirds, .dashboard-grid--insights, .filters-grid, .kpi-grid, .hero-panel__meta, .hero-mini-metrics { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .main { padding: 16px; }
  .topbar, .section-heading, .footer { flex-direction: column; align-items: stretch; }
  .topbar__right { flex-wrap: wrap; }
  .action-button { justify-content: center; }
  .kpi-grid { grid-template-columns: 1fr; }
}
