:root {
  --bg: #eef3f7;
  --surface: #ffffff;
  --surface-soft: #f5f8fb;
  --surface-strong: #e7edf3;
  --ink: #111827;
  --muted: #647184;
  --line: #d8e1ea;
  --line-strong: #b8c5d4;
  --nav: #09111f;
  --nav-2: #111b2c;
  --nav-3: #172338;
  --gold: #f6b84b;
  --gold-soft: #fff3d6;
  --green: #13a37f;
  --green-soft: #def8ef;
  --blue: #2563eb;
  --blue-soft: #e4edff;
  --cyan: #18c5d9;
  --lime: #9fe870;
  --red: #e05252;
  --red-soft: #ffe4e4;
  --shadow: 0 24px 70px rgba(15, 23, 42, .12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, .08);
  --glow: 0 20px 70px rgba(37, 99, 235, .16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    linear-gradient(118deg, rgba(37, 99, 235, .08), transparent 32%),
    repeating-linear-gradient(116deg, rgba(9, 17, 31, .035) 0 1px, transparent 1px 34px),
    var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; letter-spacing: 0; }

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
}

.main {
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background:
    linear-gradient(160deg, rgba(24, 197, 217, .13), transparent 36%),
    linear-gradient(180deg, var(--nav), var(--nav-2) 58%, var(--nav-3));
  color: #f8fbff;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid rgba(255, 255, 255, .1);
  overflow: hidden;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(122deg, transparent 0 28px, rgba(255,255,255,.055) 28px 29px, transparent 29px 58px);
  opacity: .5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  position: relative;
  z-index: 1;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  color: #06111e;
  font-weight: 820;
  box-shadow: 0 14px 34px rgba(24, 197, 217, .28);
}

.brand-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
}

.brand-subtitle {
  color: rgba(248, 251, 255, .64);
  font-size: 12px;
  margin-top: 2px;
}

.nav {
  display: grid;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.nav a {
  min-height: 42px;
  border-radius: 8px;
  padding: 11px 12px;
  color: rgba(248, 251, 255, .72);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 680;
}

.nav a::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
}

.nav a:hover,
.nav a.active {
  background: rgba(255, 255, 255, .1);
  color: #ffffff;
  box-shadow: inset 3px 0 0 var(--cyan);
}

.nav a.active::after {
  background: var(--lime);
  box-shadow: 0 0 18px rgba(159, 232, 112, .75);
}

.sidebar-foot {
  margin-top: auto;
  color: rgba(248, 251, 255, .68);
  font-size: 12px;
  line-height: 1.45;
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.status-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, .1);
  color: #f8fbff;
  font-weight: 700;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 14px rgba(159, 232, 112, .72);
}

.main { min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  border-bottom: 1px solid rgba(216, 225, 234, .88);
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  background: rgba(248, 251, 255, .88);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(15, 23, 42, .06);
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
  font-weight: 820;
}

h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 780;
}

.subtitle,
.hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.45;
}

.content {
  padding: 24px 28px 38px;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.band,
.hero-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.band::before,
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--lime), var(--gold));
  opacity: .82;
}

.filter-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.filter-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.filter-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.filter-field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.filter-field input,
.filter-field select {
  width: 100%;
}

.filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 720;
}

.filter-errors {
  grid-column: 1 / -1;
  color: var(--red);
  font-size: 13px;
}

.hero-panel {
  padding: 20px;
  display: grid;
  gap: 18px;
}

.hero-panel .band-header {
  margin-bottom: 0;
}

.band-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(142px, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .06), transparent),
    var(--surface-soft);
}

.kpi {
  min-height: 118px;
  padding: 15px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  border-right: 1px solid var(--line);
}

.kpi:hover {
  background: rgba(37, 99, 235, .045);
}

.kpi:last-child {
  border-right: 0;
}

.kpi-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 760;
  text-transform: uppercase;
}

.kpi-value {
  font-size: 27px;
  line-height: 1.05;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: 18px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.instruction-band {
  background:
    linear-gradient(135deg, rgba(9, 17, 31, .94), rgba(23, 35, 56, .94)),
    var(--nav);
  color: #f8fbff;
  box-shadow: 0 28px 90px rgba(9, 17, 31, .2);
}

.instruction-band .hint {
  color: rgba(248, 251, 255, .68);
}

.instruction-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px;
}

.instruction-step {
  min-height: 168px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 10px;
  background:
    linear-gradient(145deg, rgba(24, 197, 217, .12), transparent 42%),
    rgba(255, 255, 255, .07);
}

.instruction-step span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  color: #06111e;
  font-weight: 860;
}

.instruction-step strong {
  font-size: 14px;
}

.instruction-step p {
  margin: 0;
  color: rgba(248, 251, 255, .7);
  font-size: 13px;
  line-height: 1.48;
}

.table-wrap {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.table-wrap.compact {
  max-width: 720px;
}

.matrix-wrap {
  max-height: 72vh;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

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

th {
  position: sticky;
  top: 0;
  background: #eef4fb;
  color: #475569;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 820;
}

tbody tr:hover {
  background: #f6fbff;
}

.matrix-table {
  min-width: 1400px;
}

.matrix-table th:first-child,
.matrix-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  min-width: 150px;
}

.matrix-table th:nth-child(2),
.matrix-table td:nth-child(2) {
  position: sticky;
  left: 150px;
  z-index: 2;
  background: var(--surface);
  min-width: 180px;
}

.matrix-table th {
  z-index: 3;
}

.matrix-table .month-total,
.matrix-table td:nth-child(6n) {
  background: #eef7ff;
}

.percent-cell {
  color: var(--green);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table-link {
  font-weight: 760;
  color: var(--blue);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.mini-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 12px;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 740;
}

.tab.active {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.quality-list {
  display: grid;
  gap: 10px;
}

.quality-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 760;
  background: var(--green-soft);
  color: var(--green);
  white-space: nowrap;
}

.tag.warn {
  background: var(--gold-soft);
  color: #93662a;
}

.tag.danger {
  background: var(--red-soft);
  color: var(--red);
}

.btn {
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #ffffff, #f6f9fc);
  color: var(--ink);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 760;
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
  box-shadow: var(--glow);
}

.btn.primary {
  border-color: #0f172a;
  background: linear-gradient(135deg, #0f172a, #1d4ed8 58%, #13a37f);
  color: #ffffff;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: .52;
  transform: none;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.form {
  display: grid;
  gap: 13px;
  max-width: 740px;
}

.wide-form {
  max-width: 980px;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.form p {
  display: grid;
  gap: 6px;
  margin: 0;
}

.form label {
  font-weight: 740;
  color: #3d423e;
}

.form .helptext {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

input,
select,
textarea {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 11px;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

textarea {
  min-height: 96px;
  padding-top: 10px;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--blue);
}

.messages {
  display: grid;
  gap: 8px;
}

.message {
  background: var(--green-soft);
  color: var(--green);
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(47, 111, 94, .18);
}

.executive-hero {
  min-height: 244px;
  border-radius: 8px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 22px;
  align-items: stretch;
  background:
    repeating-linear-gradient(122deg, rgba(255,255,255,.09) 0 1px, transparent 1px 32px),
    linear-gradient(135deg, rgba(9, 17, 31, .98), rgba(24, 38, 64, .98) 48%, rgba(15, 118, 110, .94)),
    #09111f;
  color: #f8fbff;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 28px 90px rgba(9, 17, 31, .26);
  overflow: hidden;
}

.executive-hero-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  max-width: 780px;
}

.eyebrow {
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(24, 197, 217, .14);
  color: #b8fbff;
  border: 1px solid rgba(24, 197, 217, .28);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.executive-hero h2 {
  font-size: 35px;
  line-height: 1.06;
  max-width: 720px;
}

.executive-hero p {
  margin: 0;
  max-width: 650px;
  color: rgba(248, 251, 255, .72);
  line-height: 1.55;
  font-size: 15px;
}

.executive-signals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.signal {
  min-height: 94px;
  border-radius: 8px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, .085);
  border: 1px solid rgba(255, 255, 255, .1);
}

.signal span {
  color: rgba(248, 251, 255, .66);
  font-size: 12px;
  font-weight: 760;
}

.signal strong {
  font-size: 20px;
  line-height: 1.12;
}

.executive-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}

.metric-card {
  min-height: 152px;
  border-radius: 8px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  background:
    linear-gradient(140deg, rgba(37, 99, 235, .055), transparent 45%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.metric-card:hover {
  border-color: rgba(37, 99, 235, .42);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-value {
  font-size: 32px;
  line-height: 1;
  font-weight: 880;
  font-variant-numeric: tabular-nums;
}

.metric-delta {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #6b6f76;
  font-size: 13px;
  font-weight: 800;
}

.metric-delta em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.metric-delta.up { color: var(--green); }
.metric-delta.down { color: var(--red); }

.executive-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, .8fr);
  gap: 18px;
}

.executive-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.insight-panel {
  min-width: 0;
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .045), transparent 42%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.combo-chart {
  min-height: 260px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(58px, 1fr);
  gap: 10px;
  align-items: end;
  overflow-x: auto;
  padding: 12px 4px 4px;
}

.combo-column {
  min-width: 58px;
  display: grid;
  gap: 8px;
  align-items: end;
}

.bars {
  height: 188px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5px;
  border-bottom: 1px solid var(--line);
}

.bar {
  width: 14px;
  min-height: 3px;
  border-radius: 5px 5px 0 0;
  display: block;
}

.bar.margin { background: linear-gradient(180deg, var(--lime), var(--green)); }
.bar.sales { background: linear-gradient(180deg, var(--cyan), var(--blue)); }

.combo-label,
.combo-value {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.combo-value {
  color: #373d39;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.margin { background: var(--green); }
.legend-dot.sales { background: var(--blue); }

.funnel {
  display: grid;
  gap: 15px;
  align-content: center;
}

.funnel-row {
  display: grid;
  gap: 7px;
}

.funnel-meta,
.rank-title,
.rank-foot,
.department-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.funnel-meta span,
.rank-foot,
.department-top span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.funnel-meta strong,
.rank-foot strong {
  font-variant-numeric: tabular-nums;
}

.funnel-track,
.rank-track,
.department-meter {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5edf6;
}

.funnel-track span,
.rank-track span,
.department-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.funnel-row:nth-child(2) .funnel-track span { background: linear-gradient(90deg, var(--blue), var(--green)); }
.funnel-row:nth-child(3) .funnel-track span { background: linear-gradient(90deg, var(--green), var(--lime)); }
.funnel-row:nth-child(4) .funnel-track span { background: linear-gradient(90deg, var(--gold), var(--red)); }

.rank-list,
.department-stack {
  display: grid;
  gap: 13px;
}

.rank-row,
.department-card {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.rank-title strong,
.department-top strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-title span {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.rank-track span { background: linear-gradient(90deg, var(--gold), var(--lime)); }
.rank-track.alt span { background: linear-gradient(90deg, var(--cyan), var(--blue)); }

.department-card {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.department-card:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.department-meter span { background: linear-gradient(90deg, var(--blue), var(--green)); }

.empty-state {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
}

.schema {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

.entity {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  min-height: 126px;
  display: grid;
  gap: 8px;
  align-content: start;
  box-shadow: var(--shadow-soft);
}

.fields {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

pre {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #0f172a;
  color: #e5edf6;
  border-radius: 8px;
  padding: 14px;
  border: 1px solid #2d352f;
}

.cell-long {
  white-space: normal;
  word-break: break-word;
  min-width: 240px;
  max-width: 520px;
  color: var(--muted);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    repeating-linear-gradient(122deg, rgba(255,255,255,.06) 0 1px, transparent 1px 34px),
    var(--nav);
}

.login-box {
  width: min(430px, 100%);
  border-radius: 8px;
  background: var(--surface);
  padding: 26px;
  box-shadow: 0 28px 80px rgba(0,0,0,.32);
  border: 1px solid rgba(255,255,255,.1);
}

.login-box .form {
  margin-top: 18px;
}

@media (max-width: 1120px) {
  .filter-form {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .executive-kpis,
  .executive-grid,
  .executive-grid.three {
    grid-template-columns: 1fr;
  }

  .executive-hero {
    grid-template-columns: 1fr;
  }

  .kpi {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .grid-2,
  .schema,
  .instruction-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .filter-form {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .content {
    padding: 16px;
  }

  .kpis {
    grid-template-columns: 1fr;
  }

  .executive-hero {
    padding: 18px;
  }

  .executive-hero h2 {
    font-size: 27px;
  }

  .executive-signals,
  .executive-kpis {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 132px;
  }

  .panel-head,
  .metric-delta {
    align-items: flex-start;
    flex-direction: column;
  }
}
