@import url('/design-system.css');

:root {
  --md-ref-typeface-brand: 'Inter';
  --md-ref-typeface-plain: 'Inter';
  --md-sys-color-primary: #005ecb;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #d7e2ff;
  --md-sys-color-on-primary-container: #001b3f;
  --md-sys-color-secondary: #625b71;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #e8def8;
  --md-sys-color-on-secondary-container: #1d192b;
  --md-sys-color-tertiary: #006c4f;
  --md-sys-color-tertiary-container: #88f8cc;
  --md-sys-color-on-tertiary-container: #002116;
  --md-sys-color-surface: #fbf8ff;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #f5f0fa;
  --md-sys-color-surface-container: #efeaf4;
  --md-sys-color-surface-container-high: #e9e5ee;
  --md-sys-color-on-surface: #1c1b20;
  --md-sys-color-on-surface-variant: #47464f;
  --md-sys-color-outline: #787680;
  --md-sys-color-outline-variant: #cac4d0;
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-on-error-container: #410002;
  --md-sys-color-error-container: #ffdad6;
  --md-sys-color-success: #146c43;
  --md-sys-color-success-container: #d1f8dd;
  --md-sys-elevation-level1: 0 1px 2px rgba(29, 25, 43, .12), 0 1px 3px rgba(29, 25, 43, .08);
  --md-sys-elevation-level2: 0 2px 6px rgba(29, 25, 43, .14), 0 1px 3px rgba(29, 25, 43, .10);
  --md-sys-elevation-level3: 0 6px 18px rgba(29, 25, 43, .16), 0 2px 6px rgba(29, 25, 43, .10);
  --md-filled-button-container-color: var(--md-sys-color-primary);
  --md-filled-button-label-text-color: var(--md-sys-color-on-primary);
  --md-outlined-text-field-container-shape: 999px;
  --md-outlined-text-field-focus-outline-color: var(--md-sys-color-primary);
}

* { box-sizing: border-box; }
html, body {
  background: var(--md-sys-color-surface) !important;
  color: var(--md-sys-color-on-surface) !important;
  font-family: var(--md-ref-typeface-plain), system-ui, sans-serif !important;
}
body {
  padding: 32px !important;
  overflow-x: hidden !important;
}
.background-blur {
  background:
    radial-gradient(circle at 10% 6%, color-mix(in srgb, var(--md-sys-color-primary-container) 70%, transparent), transparent 28%),
    radial-gradient(circle at 86% 14%, color-mix(in srgb, var(--md-sys-color-tertiary-container) 58%, transparent), transparent 30%),
    linear-gradient(135deg, #fffbff, #f3eef8 44%, #e9f0ff) !important;
}
.dashboard-shell {
  max-width: 1580px !important;
  border-radius: 32px !important;
  background: color-mix(in srgb, var(--md-sys-color-surface-container-lowest) 88%, transparent) !important;
  border: 1px solid var(--md-sys-color-outline-variant) !important;
  box-shadow: var(--md-sys-elevation-level3) !important;
}
.topbar,
.filter-row {
  background: color-mix(in srgb, var(--md-sys-color-surface-container-lowest) 86%, transparent) !important;
  border: 1px solid var(--md-sys-color-outline-variant) !important;
  box-shadow: var(--md-sys-elevation-level2) !important;
}
.topbar {
  top: 16px !important;
  border-radius: 28px !important;
  grid-template-columns: minmax(220px, 280px) minmax(420px, 1fr) minmax(220px, 260px) !important;
  grid-template-areas: "brand nav actions" !important;
  overflow: visible !important;
}
.filter-row {
  top: 104px !important;
  z-index: 45 !important;
  border-radius: 28px !important;
  justify-content: flex-start !important;
}
.brand-mark,
.period-btn.active,
.gradient-button,
.performance-orb,
.campaign-item.scale {
  background: linear-gradient(135deg, var(--md-sys-color-primary), #5546d8) !important;
}
.brand,
h1,
h2,
.kpi-label,
.campaign-main strong,
.rec-title {
  color: var(--md-sys-color-on-surface) !important;
}
.muted-title,
.section-heading p,
.kpi-sub,
.campaign-sub,
.rec-body,
.account-chip small {
  color: var(--md-sys-color-on-surface-variant) !important;
}
.nav-pills,
.period-tabs,
.pill-select,
.custom-range,
.top-search,
.leaderboard-sort,
.live-pill {
  background: var(--md-sys-color-surface-container-lowest) !important;
  border: 1px solid var(--md-sys-color-outline-variant) !important;
  border-radius: var(--md-sys-shape-corner-full) !important;
}
.nav-pills a {
  color: var(--md-sys-color-on-surface-variant) !important;
}
.nav-pills a.active,
.quick-chip.active {
  color: var(--md-sys-color-on-secondary-container) !important;
  background: var(--md-sys-color-secondary-container) !important;
  box-shadow: none !important;
}
md-outlined-text-field.top-search-field {
  width: 240px;
  max-width: 240px;
  overflow: clip !important;
  contain: layout paint !important;
  --md-outlined-text-field-container-height: 44px;
}
.material-search {
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 16px !important;
  border-radius: var(--md-sys-shape-corner-full) !important;
  background: var(--md-sys-color-surface-container-lowest) !important;
  border: 1px solid var(--md-sys-color-outline-variant) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}
.material-search span {
  flex: 0 0 auto;
  color: var(--md-sys-color-on-surface-variant) !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}
.material-search input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--md-sys-color-on-surface);
  font: inherit;
}
.brand { grid-area: brand !important; min-width: 0 !important; }
.nav-pills {
  grid-area: nav !important;
  justify-self: center !important;
  min-width: 0 !important;
  width: min(100%, 560px) !important;
  overflow: hidden !important;
}
.top-actions {
  grid-area: actions !important;
  justify-self: end !important;
  justify-content: flex-end !important;
  min-width: 0 !important;
  width: 100% !important;
  overflow: clip !important;
  contain: layout paint !important;
}
.account-chip {
  display: none !important;
}
md-filled-button,
md-filled-tonal-button {
  --md-filled-button-container-shape: 999px;
  --md-filled-tonal-button-container-shape: 999px;
}
.hero-panel,
.analysis-card,
.list-card,
.schedule-card,
.wide-card,
.issue-card,
.kpi-card,
.floating-card,
.quick-chip,
.campaign-item,
.rec {
  border-radius: 28px !important;
  background: var(--md-sys-color-surface-container-lowest) !important;
  border: 1px solid var(--md-sys-color-outline-variant) !important;
  box-shadow: var(--md-sys-elevation-level1) !important;
  backdrop-filter: none !important;
}
.hero-panel {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--md-sys-color-primary-container) 34%, white), var(--md-sys-color-surface-container-lowest)) !important;
}
.issue-card {
  color: var(--md-sys-color-on-primary-container) !important;
  background: linear-gradient(135deg, var(--md-sys-color-primary-container), var(--md-sys-color-secondary-container)) !important;
}
.issue-card p { color: var(--md-sys-color-on-surface-variant) !important; }
.issue-arrow { background: var(--md-sys-color-primary) !important; }
.campaign-item.scale {
  color: var(--md-sys-color-on-primary-container) !important;
  background: var(--md-sys-color-primary-container) !important;
  border-color: color-mix(in srgb, var(--md-sys-color-primary) 28%, var(--md-sys-color-outline-variant)) !important;
  box-shadow: var(--md-sys-elevation-level1) !important;
}
.campaign-item.scale .campaign-main strong,
.campaign-item.scale .campaign-sub,
.campaign-item.scale .item-metric,
.campaign-item.scale .item-metric small {
  color: var(--md-sys-color-on-primary-container) !important;
}
.campaign-item.scale .item-icon {
  background: var(--md-sys-color-primary) !important;
  color: var(--md-sys-color-on-primary) !important;
}
.section-icon,
.mini-icon,
.item-icon {
  color: var(--md-sys-color-on-primary-container) !important;
  background: var(--md-sys-color-primary-container) !important;
}
.kpi-grid,
.lower-grid,
.main-layout {
  min-width: 0 !important;
}
.kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.kpi-value {
  color: var(--md-sys-color-primary) !important;
  font-weight: 720 !important;
}
.kpi-pill,
.badge {
  background: var(--md-sys-color-secondary-container) !important;
  color: var(--md-sys-color-on-secondary-container) !important;
  border-color: transparent !important;
}
.table-wrap {
  max-width: 100% !important;
  overflow-x: auto !important;
  background: var(--md-sys-color-surface-container-lowest) !important;
  border-color: var(--md-sys-color-outline-variant) !important;
}
table, th, td {
  background: var(--md-sys-color-surface-container-lowest) !important;
  color: var(--md-sys-color-on-surface) !important;
}
th {
  color: var(--md-sys-color-on-surface-variant) !important;
  background: var(--md-sys-color-surface-container-low) !important;
}
.action.scale { color: var(--md-sys-color-success) !important; }
.action.watch { color: #a05d00 !important; }
.action.pause { color: var(--md-sys-color-error) !important; }
.action.maintain { color: var(--md-sys-color-primary) !important; }
@media (max-width: 1300px) {
  .topbar {
    grid-template-columns: 1fr !important;
    grid-template-areas: "brand" "nav" "actions" !important;
  }
  .nav-pills { width: 100% !important; }
  md-outlined-text-field.top-search-field { width: 100% !important; }
  .filter-row { top: 226px !important; }
}
@media (max-width: 860px) {
  body { padding: 16px !important; }
  .kpi-grid { grid-template-columns: 1fr !important; }
}
