:root {
  --navy: #082a60;
  --navy-2: #061d42;
  --blue: #0d6ea8;
  --sky: #e8f3fb;
  --orange: #ff7a21;
  --gold: #ffc64b;
  --ink: #18243a;
  --muted: #68758b;
  --line: #d9e3ef;
  --page: #f4f7fb;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.site-nav {
  width: min(1280px, calc(100% - 32px));
  min-height: 96px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand img {
  display: block;
  height: 74px;
  width: auto;
}

.main-links,
.header-actions,
.social-links {
  display: flex;
  align-items: center;
}

.main-links {
  gap: 28px;
}

.main-links a {
  color: #334155;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.main-links a:hover {
  color: #1769e0;
}

.header-actions {
  gap: 10px;
  justify-content: flex-end;
}

.social-links {
  gap: 8px;
}

.social-links a,
.nav-button {
  min-height: 38px;
  border: 1px solid #d7e0ed;
  border-radius: 7px;
  background: #fff;
  color: #334155;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.social-links a {
  width: 38px;
  display: grid;
  place-items: center;
}

.social-links svg,
.nav-button svg {
  width: 16px;
  height: 16px;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 800;
}

.nav-button.primary {
  background: #1769e0;
  border-color: #1769e0;
  color: #fff;
}

.social-links a:hover,
.nav-button:hover {
  border-color: #1769e0;
  color: #1769e0;
  background: #eef5ff;
}

.nav-button.primary:hover {
  background: #0f5fcc;
  color: #fff;
}

.dashboard-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 30px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(8, 42, 96, 0.98), rgba(6, 29, 66, 0.96)),
    radial-gradient(circle at 78% 20%, rgba(255, 122, 33, 0.24), transparent 32%);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(8, 42, 96, 0.18);
}

.eyebrow,
.panel-title span {
  margin: 0;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 8px 0 8px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 760px;
  margin: 0;
  color: #d8e8f8;
  font-size: 17px;
  line-height: 1.55;
}

.source-pill {
  min-width: 235px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
}

.source-pill span,
.source-pill strong {
  display: block;
}

.source-pill span {
  color: #c6d8ec;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.source-pill strong {
  margin-top: 5px;
  font-size: 14px;
}

.filters {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr 1.6fr 0.8fr;
  gap: 12px;
  align-items: start;
  margin: 18px 0;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

select,
input,
button {
  width: 100%;
  min-height: 42px;
  border-radius: 6px;
  font: inherit;
}

select,
input {
  padding: 6px 8px;
  color: var(--ink);
  background: #fbfdff;
  border: 1px solid var(--line);
}

.search-filter {
  position: relative;
  min-height: 82px;
  padding: 8px;
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.search-filter input {
  min-height: 34px;
  padding: 6px 8px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  margin-bottom: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 8px;
  color: var(--white);
  background: var(--navy);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.chip button {
  width: 18px;
  min-height: 18px;
  padding: 0;
  color: var(--navy);
  background: var(--white);
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
}

.option-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 190px;
  margin-top: 6px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 16px 36px rgba(8, 42, 96, 0.18);
}

.search-filter:focus-within .option-list,
.option-list.open {
  display: block;
}

.option-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 4px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  border-radius: 0;
  text-align: left;
  cursor: pointer;
}

.filter-spacer {
  visibility: hidden;
}

.option-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

button {
  padding: 0 18px;
  color: var(--white);
  font-weight: 800;
  background: var(--orange);
  border: 0;
  cursor: pointer;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.kpis article,
.panel,
.table-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(8, 42, 96, 0.08);
}

.kpis article {
  padding: 18px;
}

.kpis span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.kpis strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--navy);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
}

.kpis small {
  color: var(--muted);
  font-size: 13px;
}

.grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.main-grid {
  grid-template-columns: 0.85fr 1.35fr;
}

.compare-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel,
.table-panel {
  min-height: 350px;
  padding: 18px;
}

.panel.wide {
  min-height: 390px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title h2 {
  margin: 4px 0 0;
  color: var(--navy);
  font-size: 19px;
  line-height: 1.25;
}

canvas {
  width: 100% !important;
  height: 285px !important;
}

.wide canvas {
  height: 315px !important;
}

.table-panel {
  min-height: auto;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

td:nth-child(3),
td:nth-child(4) {
  font-weight: 800;
}

.site-footer {
  margin-top: 28px;
  padding: 36px max(18px, calc((100% - 1280px) / 2));
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) 1fr 1fr;
  gap: 28px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-brand img {
  height: 64px;
  width: auto;
  padding: 7px;
  border-radius: 6px;
  background: #fff;
}

.footer-brand p {
  max-width: 460px;
  margin: 14px 0 0;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.7;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.footer-links a:hover {
  color: #fff;
}

@media (max-width: 1120px) {
  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .main-links,
  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .filters,
  .kpis,
  .compare-grid,
  .main-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters label:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .site-nav,
  .site-footer,
  .hero {
    display: block;
  }

  .main-links,
  .header-actions {
    margin-top: 12px;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .brand img {
    height: 60px;
  }

  .dashboard-shell {
    width: min(100% - 20px, 1480px);
    padding-top: 12px;
  }

  .hero,
  .filters,
  .panel,
  .table-panel {
    padding: 14px;
  }

  .source-pill {
    margin-top: 18px;
  }

  .filters,
  .kpis,
  .compare-grid,
  .main-grid {
    grid-template-columns: 1fr;
  }

  canvas,
  .wide canvas {
    height: 260px !important;
  }
}
