:root {
  --navy: #10283f;
  --navy-2: #183a57;
  --blue: #1769aa;
  --blue-soft: #e8f2fb;
  --green: #198754;
  --green-soft: #e8f6ef;
  --yellow: #f4b740;
  --yellow-soft: #fff5d8;
  --red: #c84545;
  --red-soft: #fdecec;
  --ink: #1b2733;
  --muted: #667785;
  --line: #dfe7ed;
  --surface: #ffffff;
  --canvas: #f3f6f8;
  --shadow: 0 12px 30px rgba(16, 40, 63, .09);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }

#demoBanner {
  min-height: 38px;
  padding: 8px 48px 8px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #3f3102;
  background: linear-gradient(90deg, #ffe79e, #fff3c9);
  border-bottom: 1px solid #e5cf82;
  font-size: 13px;
  position: relative;
  z-index: 50;
}
#demoBanner strong { letter-spacing: .08em; font-size: 11px; }
#demoBanner button {
  position: absolute; right: 14px; top: 3px;
  border: 0; background: transparent; font-size: 25px; color: #5d4a0a;
}

.app-shell { display: flex; min-height: calc(100vh - 38px); }
.sidebar {
  width: 286px;
  background: linear-gradient(180deg, var(--navy) 0%, #0b1e30 100%);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 38px;
  bottom: 0;
  left: 0;
  z-index: 30;
  transition: transform .25s ease;
}
body.banner-closed .sidebar { top: 0; }
.brand {
  min-height: 82px;
  padding: 17px 20px;
  display: flex; align-items: center; gap: 13px;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.brand strong { display: block; font-size: 25px; letter-spacing: .08em; line-height: 1; }
.brand small { display: block; margin-top: 5px; color: #b9cee0; font-size: 13px; }
.brand-mark {
  width: 45px; height: 45px; position: relative;
  border: 2px solid rgba(255,255,255,.85); border-radius: 50%;
}
.brand-mark span { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: white; }
.brand-mark span:nth-child(1) { left: 7px; top: 12px; }
.brand-mark span:nth-child(2) { left: 19px; top: 6px; background: var(--yellow); }
.brand-mark span:nth-child(3) { right: 6px; top: 18px; background: #79c6f2; }
.brand-mark span:nth-child(4) { left: 17px; bottom: 5px; background: #54b88b; }

.sidebar-context { padding: 16px 17px 12px; }
.sidebar-context label {
  display: block; margin-bottom: 7px; color: #9eb7ca; font-size: 11px;
  text-transform: uppercase; letter-spacing: .08em;
}
.sidebar-context select {
  width: 100%; padding: 10px 12px; border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px; color: white; background: rgba(255,255,255,.08); outline: none;
}
.sidebar-context option { color: #111; }

#mainNav {
  padding: 3px 11px 20px;
  overflow-y: auto;
  scrollbar-width: thin;
  flex: 1;
}
.nav-group-title {
  margin: 16px 10px 6px; color: #7897ae; font-size: 10px;
  text-transform: uppercase; letter-spacing: .1em; font-weight: 800;
}
.nav-item {
  width: 100%; min-height: 43px; margin: 2px 0; padding: 8px 10px;
  display: flex; align-items: center; gap: 11px; text-align: left;
  border: 0; border-radius: 9px; color: #d5e1ea; background: transparent;
  transition: .15s ease; font-size: 13px;
}
.nav-item:hover { color: white; background: rgba(255,255,255,.08); }
.nav-item.active { color: white; background: linear-gradient(90deg, rgba(45,131,194,.75), rgba(45,131,194,.26)); }
.nav-icon {
  width: 25px; height: 25px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #b9d6ea; background: rgba(255,255,255,.08); font-size: 12px; font-weight: 800;
  flex: 0 0 auto;
}
.nav-item.active .nav-icon { color: var(--navy); background: white; }
.nav-badge {
  margin-left: auto; padding: 2px 6px; border-radius: 999px;
  background: var(--yellow); color: #4a3400; font-size: 9px; font-weight: 800;
}
.sidebar-footer { padding: 13px; border-top: 1px solid rgba(255,255,255,.09); }
.built-by { margin-top: 12px; color: #829eb2; text-align: center; font-size: 10px; line-height: 1.5; }

.main { width: calc(100% - 286px); margin-left: 286px; min-width: 0; }
.topbar {
  min-height: 93px; padding: 17px 28px;
  display: flex; align-items: center; gap: 18px;
  background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line);
  position: sticky; top: 38px; z-index: 20; backdrop-filter: blur(10px);
}
body.banner-closed .topbar { top: 0; }
#menuToggle { display: none; }
.page-heading { min-width: 0; flex: 1; }
.page-heading .eyebrow { margin: 0 0 4px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.page-heading h1 { margin: 0; font-size: clamp(19px, 2.2vw, 29px); line-height: 1.15; }
.page-heading p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .notification-button {
  width: 41px; height: 41px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 11px; color: var(--navy); background: white;
}
.notification-button { position: relative; }
.notification-button b {
  position: absolute; top: -5px; right: -4px; min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center; border-radius: 999px;
  background: var(--red); color: white; font-size: 9px;
}
.user-chip { margin-left: 4px; display: flex; align-items: center; gap: 9px; }
.user-chip .avatar {
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--navy); color: white; font-weight: 800; font-size: 12px;
}
.user-chip strong, .user-chip small { display: block; white-space: nowrap; }
.user-chip strong { font-size: 12px; }
.user-chip small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.search-panel {
  padding: 12px 28px; display: flex; gap: 10px; background: white; border-bottom: 1px solid var(--line);
}
.search-panel input {
  flex: 1; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; outline: none;
}
.search-panel input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,170,.1); }

.content { padding: 24px 28px 38px; min-height: calc(100vh - 150px); outline: none; }
.footer {
  min-height: 54px; padding: 16px 28px; display: flex; justify-content: space-between;
  color: var(--muted); background: white; border-top: 1px solid var(--line); font-size: 10px;
}

.hero {
  padding: 23px;
  border-radius: var(--radius);
  color: white;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.15), transparent 22%),
    linear-gradient(115deg, var(--navy), #1c5b86);
  box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1.6fr .8fr; gap: 22px;
}
.hero h2 { margin: 3px 0 8px; max-width: 800px; font-size: clamp(23px, 3.3vw, 39px); line-height: 1.1; }
.hero p { max-width: 760px; margin: 0; color: #d6e6f2; line-height: 1.65; }
.hero-tag { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.13); font-size: 10px; letter-spacing: .08em; font-weight: 800; }
.hero-actions { margin-top: 19px; display: flex; flex-wrap: wrap; gap: 9px; }
.hero-side {
  min-height: 170px; padding: 17px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px;
  background: rgba(255,255,255,.08); display: flex; flex-direction: column; justify-content: center;
}
.hero-side strong { display: block; font-size: 35px; }
.hero-side span { color: #d0e1ed; font-size: 12px; }
.hero-side hr { width: 100%; border: 0; border-top: 1px solid rgba(255,255,255,.15); margin: 14px 0; }

.primary-button, .secondary-button, .ghost-button, .danger-button {
  min-height: 38px; padding: 8px 13px; border-radius: 9px; border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; font-size: 11px;
}
.primary-button { color: white; background: var(--blue); }
.primary-button:hover { background: #12578f; }
.secondary-button { color: var(--navy); background: white; border-color: var(--line); }
.secondary-button:hover { border-color: #aebfca; }
.ghost-button { color: white; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); }
.danger-button { color: var(--red); background: var(--red-soft); border-color: #f5caca; }
.full { width: 100%; }
.hidden { display: none !important; }

.section-heading {
  margin: 27px 0 13px; display: flex; align-items: end; justify-content: space-between; gap: 15px;
}
.section-heading h2 { margin: 0; font-size: 18px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.section-actions { display: flex; gap: 7px; flex-wrap: wrap; }

.filters {
  margin-bottom: 15px; padding: 13px; display: flex; align-items: end; gap: 10px; flex-wrap: wrap;
  background: white; border: 1px solid var(--line); border-radius: 13px;
}
.filter-group { min-width: 145px; }
.filter-group label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.filter-group select, .filter-group input {
  width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink);
}

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.kpi-card {
  padding: 16px; background: white; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 5px 15px rgba(16,40,63,.035); position: relative; overflow: hidden;
}
.kpi-card::after {
  content: ""; position: absolute; width: 65px; height: 65px; border-radius: 50%;
  right: -24px; top: -26px; background: var(--blue-soft);
}
.kpi-head { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; font-weight: 700; }
.kpi-icon {
  width: 29px; height: 29px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--blue); background: var(--blue-soft); font-weight: 900;
}
.kpi-value { margin: 12px 0 5px; font-size: 27px; font-weight: 850; letter-spacing: -.03em; }
.kpi-trend { color: var(--muted); font-size: 10px; }
.kpi-trend.good { color: var(--green); }
.kpi-trend.bad { color: var(--red); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.panel {
  padding: 17px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 5px 15px rgba(16,40,63,.035);
}
.panel-header { margin-bottom: 13px; display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.panel-header h3 { margin: 0; font-size: 14px; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.panel-actions { display: flex; gap: 5px; }
.mini-button { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: white; font-size: 9px; }

.bar-chart { height: 215px; display: flex; align-items: end; gap: 11px; border-bottom: 1px solid var(--line); padding: 12px 5px 0; }
.bar-item { flex: 1; min-width: 18px; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 6px; }
.bar {
  width: min(36px, 75%); min-height: 4px; border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, #2e83c2, #1769aa); position: relative; transition: height .4s ease;
}
.bar.alt { background: linear-gradient(180deg, #58ba8d, #198754); }
.bar-value { font-size: 9px; font-weight: 800; }
.bar-label { min-height: 24px; color: var(--muted); text-align: center; font-size: 8px; }
.legend { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 9px; }
.legend span::before {
  content: ""; width: 8px; height: 8px; margin-right: 5px; display: inline-block; border-radius: 2px; background: var(--blue);
}
.legend span.alt::before { background: var(--green); }

.line-chart { width: 100%; height: 220px; overflow: visible; }
.chart-grid line { stroke: #e7edf1; stroke-width: 1; }
.chart-line { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#lineGradient); }
.chart-point { fill: white; stroke: var(--blue); stroke-width: 2.5; }
.chart-label { fill: var(--muted); font-size: 9px; }

.donut-wrap { display: flex; align-items: center; gap: 24px; justify-content: center; padding: 11px 0; }
.donut {
  width: 145px; aspect-ratio: 1; border-radius: 50%; position: relative;
  background: conic-gradient(var(--blue) 0 47%, var(--green) 47% 80%, var(--yellow) 80% 94%, #d7e0e6 94%);
}
.donut::after { content: ""; position: absolute; inset: 27px; border-radius: 50%; background: white; }
.donut-center { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center strong { font-size: 24px; }
.donut-center span { color: var(--muted); font-size: 8px; }
.donut-legend { display: grid; gap: 9px; font-size: 10px; }
.donut-legend div { display: flex; align-items: center; gap: 7px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.dot.green { background: var(--green); }.dot.yellow { background: var(--yellow); }.dot.grey { background: #d7e0e6; }.dot.red { background: var(--red); }

.cv-map {
  min-height: 255px; position: relative; overflow: hidden; border-radius: 13px;
  background: linear-gradient(160deg, #e6f4fa, #d6ebf5);
}
.cv-map::before, .cv-map::after {
  content: ""; position: absolute; width: 330px; height: 330px; border: 1px solid rgba(23,105,170,.13); border-radius: 50%;
}
.cv-map::before { left: -180px; top: -180px; }
.cv-map::after { right: -210px; bottom: -215px; }
.island {
  position: absolute; display: flex; align-items: center; gap: 6px; border: 0; background: transparent;
  color: var(--navy); font-size: 9px; font-weight: 800; z-index: 2;
}
.island::before {
  content: ""; width: var(--island-size, 12px); height: var(--island-size, 12px); display: block;
  border-radius: 58% 42% 60% 40%; background: var(--island-color, var(--green)); box-shadow: 0 0 0 4px rgba(255,255,255,.68);
}
.island:hover::before { transform: scale(1.25); }
.map-legend {
  position: absolute; bottom: 10px; left: 10px; right: 10px; z-index: 3;
  padding: 8px; border-radius: 9px; display: flex; gap: 11px; background: rgba(255,255,255,.85); font-size: 8px;
}
.map-legend span { display: flex; align-items: center; gap: 4px; }

.alert-list, .activity-list, .feature-list { margin: 0; padding: 0; list-style: none; }
.alert-item, .activity-item {
  padding: 10px 0; display: flex; gap: 10px; border-bottom: 1px solid #edf1f4;
}
.alert-item:last-child, .activity-item:last-child { border-bottom: 0; }
.alert-level { width: 8px; min-width: 8px; border-radius: 999px; background: var(--yellow); }
.alert-level.red { background: var(--red); }.alert-level.green { background: var(--green); }
.alert-copy strong, .activity-item strong { display: block; font-size: 10px; }
.alert-copy span, .activity-item span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 650px; }
.data-table th {
  padding: 9px 10px; text-align: left; color: var(--muted); background: #f7f9fa;
  border-bottom: 1px solid var(--line); font-size: 8px; text-transform: uppercase; letter-spacing: .06em;
}
.data-table td { padding: 10px; border-bottom: 1px solid #edf1f4; font-size: 10px; vertical-align: middle; }
.data-table tr:hover td { background: #fbfcfd; }
.status {
  display: inline-flex; padding: 4px 7px; border-radius: 999px; font-size: 8px; font-weight: 800;
  color: var(--green); background: var(--green-soft);
}
.status.warning { color: #7a5600; background: var(--yellow-soft); }
.status.danger { color: var(--red); background: var(--red-soft); }
.status.info { color: var(--blue); background: var(--blue-soft); }

.progress-row { margin: 13px 0; }
.progress-label { margin-bottom: 5px; display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.progress-label strong { color: var(--ink); }
.progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #eaf0f3; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--blue); }
.progress-fill.green { background: var(--green); }.progress-fill.yellow { background: var(--yellow); }.progress-fill.red { background: var(--red); }

.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.module-card {
  min-height: 155px; padding: 16px; text-align: left; color: inherit; background: white;
  border: 1px solid var(--line); border-radius: 14px; transition: .18s ease;
}
.module-card:hover { transform: translateY(-3px); border-color: #adc9dc; box-shadow: var(--shadow); }
.module-card .module-icon {
  width: 37px; height: 37px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  color: var(--blue); background: var(--blue-soft); font-weight: 900;
}
.module-card h3 { margin: 13px 0 6px; font-size: 13px; }
.module-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.module-card small { display: block; margin-top: 10px; color: var(--blue); font-weight: 800; font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }

.info-strip {
  margin: 16px 0; padding: 13px 15px; display: flex; align-items: start; gap: 10px;
  border: 1px solid #bed9e9; border-radius: 12px; color: #164c70; background: #edf8fd; font-size: 10px; line-height: 1.55;
}
.info-strip.warning { color: #6a4b00; border-color: #ead58e; background: #fff8df; }
.info-strip.success { color: #12623d; border-color: #afe0c6; background: #eefaf4; }

.timeline { position: relative; margin: 8px 0 0 8px; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 3px; bottom: 10px; width: 2px; background: var(--line); }
.timeline-item { position: relative; margin-bottom: 18px; }
.timeline-item::before {
  content: ""; position: absolute; left: -24px; top: 2px; width: 12px; height: 12px;
  border-radius: 50%; border: 3px solid white; background: var(--blue); box-shadow: 0 0 0 1px #b7c8d3;
}
.timeline-item strong { display: block; font-size: 10px; }
.timeline-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }

.scenario-card {
  padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: white;
}
.scenario-card h3 { margin: 0 0 5px; font-size: 12px; }
.scenario-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.scenario-value { margin-top: 13px; font-size: 24px; font-weight: 850; color: var(--navy); }
.scenario-delta { font-size: 9px; color: var(--green); }

.phone-section {
  padding: 25px; border-radius: 18px; color: white;
  background: linear-gradient(135deg, #10283f, #1769aa);
  display: grid; grid-template-columns: 1fr 320px; gap: 35px; align-items: center;
}
.phone-section h2 { margin: 7px 0 10px; font-size: 29px; }
.phone-section p { color: #d7e7f2; line-height: 1.65; font-size: 12px; }
.phone-feature-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.phone-feature {
  padding: 10px; border: 1px solid rgba(255,255,255,.13); border-radius: 10px;
  background: rgba(255,255,255,.07); font-size: 10px;
}
.phone {
  width: 272px; height: 550px; margin: 0 auto; padding: 10px;
  border: 7px solid #071725; border-radius: 37px; background: #071725;
  box-shadow: 0 25px 45px rgba(0,0,0,.28); position: relative;
}
.phone::before {
  content: ""; position: absolute; width: 85px; height: 20px; top: 2px; left: 50%; transform: translateX(-50%);
  border-radius: 0 0 13px 13px; background: #071725; z-index: 5;
}
.phone-screen { height: 100%; overflow: hidden; border-radius: 25px; color: var(--ink); background: #f3f6f8; }
.mobile-header { padding: 25px 15px 14px; color: white; background: linear-gradient(135deg, var(--navy), var(--blue)); }
.mobile-header small, .mobile-header strong { display: block; }
.mobile-header small { color: #cbddeb; font-size: 8px; }
.mobile-header strong { margin-top: 5px; font-size: 15px; }
.mobile-student {
  margin: -1px 12px 0; padding: 11px; display: flex; align-items: center; gap: 9px;
  border-radius: 0 0 12px 12px; background: white; box-shadow: 0 5px 13px rgba(16,40,63,.08);
}
.student-avatar {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: white; background: var(--green); font-size: 10px; font-weight: 800;
}
.mobile-student strong, .mobile-student small { display: block; }
.mobile-student strong { font-size: 9px; }.mobile-student small { color: var(--muted); font-size: 7px; margin-top: 2px; }
.mobile-content { padding: 12px; }
.mobile-alert { padding: 10px; border-radius: 9px; color: #674900; background: var(--yellow-soft); font-size: 8px; line-height: 1.5; }
.mobile-kpis { margin-top: 10px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mobile-kpi { padding: 10px; border-radius: 9px; background: white; }
.mobile-kpi strong { display: block; font-size: 16px; }.mobile-kpi span { color: var(--muted); font-size: 7px; }
.mobile-list { margin-top: 10px; padding: 9px; border-radius: 9px; background: white; }
.mobile-list h4 { margin: 0 0 7px; font-size: 8px; }
.mobile-list div { padding: 6px 0; display: flex; justify-content: space-between; border-top: 1px solid #eef2f4; font-size: 7px; }
.mobile-nav { position: absolute; left: 17px; right: 17px; bottom: 17px; padding: 9px; display: flex; justify-content: space-around; border-radius: 0 0 22px 22px; background: white; }
.mobile-tab { border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.mobile-tab.active { color: var(--blue); }

.future-badge {
  display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #5d4300; background: var(--yellow);
  font-size: 8px; font-weight: 900; letter-spacing: .07em;
}

.modal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(4,16,25,.58); backdrop-filter: blur(3px); }
.modal {
  width: min(720px, calc(100vw - 30px)); max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 24px; position: fixed; z-index: 81; left: 50%; top: 50%; transform: translate(-50%,-50%);
  border-radius: 18px; background: white; box-shadow: 0 30px 80px rgba(0,0,0,.3);
}
.modal-close { position: absolute; right: 13px; top: 9px; border: 0; background: transparent; font-size: 27px; color: var(--muted); }
.modal h2 { margin-top: 0; padding-right: 30px; }
.modal p, .modal li { color: var(--muted); font-size: 11px; line-height: 1.65; }
.modal .source-list { padding-left: 18px; }
.modal-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.modal-stat { padding: 13px; border-radius: 11px; background: var(--canvas); }
.modal-stat strong { display: block; font-size: 20px; }
.modal-stat span { color: var(--muted); font-size: 8px; }

.toast-container { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 9px; }
.toast {
  width: min(330px, calc(100vw - 36px)); padding: 12px 14px; border-radius: 11px;
  color: white; background: var(--navy); box-shadow: var(--shadow); font-size: 10px;
  animation: toastIn .2s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

.empty-state { padding: 45px 20px; text-align: center; border: 1px dashed #b9c8d2; border-radius: 14px; background: white; }
.empty-state strong { display: block; font-size: 17px; }
.empty-state p { color: var(--muted); font-size: 11px; }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .module-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: 20px 0 50px rgba(0,0,0,.25); }
  .sidebar.open { transform: translateX(0); }
  .main { width: 100%; margin-left: 0; }
  #menuToggle { display: inline-flex; }
  .user-chip div:last-child { display: none; }
  .topbar { padding: 13px 15px; }
  .content { padding: 18px 15px 30px; }
  .hero { grid-template-columns: 1fr; }
  .phone-section { grid-template-columns: 1fr; }
}
@media (max-width: 660px) {
  #demoBanner { justify-content: flex-start; padding-left: 10px; }
  #demoBanner span { display: none; }
  .top-actions .icon-button { display: none; }
  .page-heading p:last-child { display: none; }
  .content { padding: 14px 10px 25px; }
  .kpi-grid, .grid-2, .grid-3, .grid-4, .module-grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; gap: 6px; }
  .hero { padding: 18px; }
  .hero h2 { font-size: 25px; }
  .phone-section { padding: 18px 10px; }
  .phone-section > div:first-child { padding: 0 8px; }
  .phone-feature-grid { grid-template-columns: 1fr; }
  .modal-stat-grid { grid-template-columns: 1fr; }
}
