:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-blue: #eef5ff;
  --border: #dbe5f0;
  --border-strong: #c7d4e3;
  --text: #0f172a;
  --text-soft: #475569;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #dbeafe;
  --sidebar: #071226;
  --sidebar-hover: #10203a;
  --sidebar-active: #1d4ed8;
  --success: #0f766e;
  --success-soft: #ccfbf1;
  --warning: #b45309;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --violet: #7c3aed;
  --violet-soft: #ede9fe;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.hidden {
  display: none !important;
}

.material-symbols-rounded {
  display: inline-block;
  width: 1em;
  height: 1em;
  font-family: "Material Symbols Rounded";
  font-weight: 600;
  font-style: normal;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
}

.brand-mark,
.icon-btn,
.kpi-icon,
.nav-btn .material-symbols-rounded,
.primary-btn .material-symbols-rounded,
.secondary-btn .material-symbols-rounded,
.ghost-btn .material-symbols-rounded,
.danger-btn .material-symbols-rounded,
.action-item .material-symbols-rounded,
.alert-card .material-symbols-rounded {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-mark .material-symbols-rounded,
.icon-btn .material-symbols-rounded,
.kpi-icon .material-symbols-rounded,
.nav-btn .material-symbols-rounded,
.primary-btn .material-symbols-rounded,
.secondary-btn .material-symbols-rounded,
.ghost-btn .material-symbols-rounded,
.danger-btn .material-symbols-rounded,
.action-item .material-symbols-rounded,
.alert-card .material-symbols-rounded {
  flex: 0 0 auto;
  margin: 0;
  line-height: 1;
  transform: translateY(0);
}

body.auth-pending .app-shell {
  opacity: 0;
  visibility: hidden;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  background: var(--sidebar);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  color: #fff;
  background: transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1rem;
  font-weight: 800;
}

.brand-copy small {
  color: #a8b5cc;
  font-size: 0.78rem;
  font-weight: 600;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  margin-top: 28px;
}

.nav-btn {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  text-align: left;
  transition: background-color 160ms ease, color 160ms ease;
}

.nav-btn:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.nav-btn.active {
  background: var(--sidebar-active);
  color: #fff;
}

.nav-btn .material-symbols-rounded {
  color: currentColor;
  font-size: 1.25rem;
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-foot strong {
  display: block;
  font-size: 0.82rem;
}

.sidebar-foot small {
  display: block;
  margin-top: 2px;
  color: #a8b5cc;
  font-size: 0.74rem;
  line-height: 1.35;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.status-dot.syncing {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.status-dot.error {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 24px;
  background: rgba(244, 247, 251, 0.96);
  border-bottom: 1px solid var(--border);
}

.topbar-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.topbar-title strong {
  font-size: 0.95rem;
}

.topbar-title span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

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

.sidebar-toggle-btn {
  display: none !important;
}

.icon-btn,
.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.row-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-md);
  font-weight: 750;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.icon-btn {
  width: 38px;
  min-width: 38px;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
}

.primary-btn {
  padding: 0 15px;
  color: #fff;
  background: var(--primary);
}

.primary-btn:hover {
  background: var(--primary-strong);
}

.secondary-btn,
.ghost-btn,
.row-btn {
  padding: 0 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

.secondary-btn:hover,
.ghost-btn:hover,
.row-btn:hover,
.icon-btn:hover {
  background: #f8fafc;
  border-color: var(--border-strong);
}

.danger-btn,
.danger-row {
  padding: 0 12px;
  color: #991b1b;
  background: var(--danger-soft);
  border: 1px solid #fecaca;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.profile-menu {
  position: relative;
}

.profile-avatar-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  font-weight: 800;
}

.profile-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(280px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.08);
}

.profile-dropdown span {
  display: block;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.profile-dropdown strong {
  display: block;
  margin: 6px 0 12px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.page {
  padding: 22px 24px 32px;
}

.view {
  display: none;
}

.view.show {
  display: block;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.page-heading h1 {
  color: var(--text);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}

.page-heading p,
.section-head p,
.muted {
  margin-top: 5px;
  color: var(--text-soft);
  line-height: 1.55;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

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

.field.wide {
  grid-column: span 2;
}

.field.span-2,
.span-2 {
  grid-column: span 2;
}

.field.compact-field {
  min-width: 180px;
}

.field span,
.section-label {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--text);
  outline: none;
}

.field input,
.field select {
  padding: 0 12px;
}

.field textarea {
  min-height: 96px;
  padding: 11px 12px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

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

.kpi-grid.seven {
  grid-template-columns: repeat(7, minmax(150px, 1fr));
}

.kpi-grid.six {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}

.kpi-grid.four {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.kpi-card,
.panel-card,
.report-card,
.drawer-stats article,
.mini-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.kpi-card {
  min-width: 0;
  min-height: 142px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: 14px;
}

.kpi-card.health-card {
  background: #f8fbff;
}

.kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.kpi-icon.blue {
  color: var(--primary);
  background: var(--primary-soft);
}

.kpi-icon.green {
  color: var(--success);
  background: var(--success-soft);
}

.kpi-icon.amber {
  color: var(--warning);
  background: var(--warning-soft);
}

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

.kpi-icon.violet {
  color: var(--violet);
  background: var(--violet-soft);
}

.kpi-icon.navy {
  color: #fff;
  background: var(--sidebar);
}

.kpi-card > div > strong {
  display: block;
  color: var(--text);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
}

.kpi-card > div > span {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.3;
}

.kpi-card > div > small {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.panel-card {
  min-width: 0;
  padding: 16px;
}

.panel-card h2,
.report-card h2,
.settings-grid h2 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}

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

.chart-wrap {
  position: relative;
  min-height: 310px;
}

.chart-wrap.compact {
  min-height: 250px;
}

.chart-wrap.donut {
  min-height: 260px;
}

.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.donut-layout {
  display: grid;
  grid-template-columns: minmax(180px, 1fr);
  gap: 14px;
}

.metric-list {
  display: grid;
  gap: 8px;
}

.metric-list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.metric-list-row span,
.metric-list-row strong {
  font-size: 0.84rem;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: 102px repeat(4, minmax(72px, 1fr));
  gap: 7px;
  overflow-x: auto;
}

.heatmap-cell {
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 750;
}

.heatmap-label,
.heatmap-day {
  color: var(--text-soft);
  background: var(--surface-soft);
}

.heatmap-day {
  justify-content: start;
  padding-left: 10px;
}

.heatmap-value {
  color: #0f172a;
  background: #eef5ff;
}

.funnel-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.funnel-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.funnel-step > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.funnel-step strong,
.funnel-step small {
  display: block;
}

.funnel-step strong {
  font-weight: 800;
}

.funnel-step small {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.data-table {
  min-width: 860px;
}

.students-table {
  min-width: 1180px;
}

.activities-table,
.challenge-table {
  min-width: 1040px;
}

.data-table th,
.data-table td {
  padding: 12px 13px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--text-muted);
  background: var(--surface-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
}

.data-table td {
  color: #1e293b;
  font-size: 0.84rem;
  line-height: 1.45;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

.empty-cell,
.empty-note {
  color: var(--text-muted) !important;
  text-align: center;
  padding: 24px 12px !important;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--text-soft);
  background: #eef2f7;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.active,
.status-pill.good,
.status-pill.approved {
  color: var(--success);
  background: var(--success-soft);
}

.status-pill.inactive,
.status-pill.moderate,
.status-pill.upcoming,
.status-pill.not-provided {
  color: var(--warning);
  background: var(--warning-soft);
}

.status-pill.deactivated,
.status-pill.needs-attention,
.status-pill.needs-review,
.status-pill.gps-issue {
  color: var(--danger);
  background: var(--danger-soft);
}

.status-pill.ended,
.status-pill.joined {
  color: var(--primary);
  background: var(--primary-soft);
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.person-cell span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.person-cell strong {
  overflow-wrap: anywhere;
}

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

.row-btn {
  min-height: 30px;
  padding: 0 9px;
  color: var(--primary);
  background: var(--primary-soft);
  border-color: #bfdbfe;
  font-size: 0.76rem;
}

.alert-grid {
  display: grid;
  gap: 10px;
}

.alert-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.alert-card.needs-review {
  border-color: #fecaca;
  background: #fff7f7;
}

.alert-card .material-symbols-rounded {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--danger);
  background: var(--danger-soft);
}

.alert-card strong,
.alert-card small {
  display: block;
}

.alert-card strong {
  font-size: 1.1rem;
  font-weight: 800;
}

.alert-card small {
  color: var(--text-muted);
  font-weight: 700;
}

.monthly-insight-card {
  background: #f8fbff;
}

.insight-text {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
}

.action-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.action-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #cfe0f6;
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text-soft);
  line-height: 1.45;
}

.action-item .material-symbols-rounded {
  color: var(--primary);
  margin-top: 1px;
}

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

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.form-message {
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.challenge-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
  margin-bottom: 14px;
}

.status-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.mini-card-list {
  display: grid;
  gap: 9px;
}

.mini-card {
  padding: 12px;
}

.mini-card strong,
.mini-card small {
  display: block;
}

.mini-card strong {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
}

.mini-card small {
  margin-top: 5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.mini-card.warning {
  border-color: #fecaca;
  background: #fff7f7;
}

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

.report-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.report-card p {
  color: var(--text-soft);
  line-height: 1.55;
}

.report-card small {
  color: var(--text-muted);
}

.report-card div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.report-preview {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.preview-metric,
.preview-action {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.preview-metric span,
.preview-action span {
  display: block;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.preview-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1.1rem;
  font-weight: 800;
}

.preview-action {
  grid-column: span 6;
}

.preview-action p {
  margin-top: 8px;
  color: var(--text);
  line-height: 1.6;
}

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

.detail-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.detail-list dt {
  color: var(--text-muted);
  font-weight: 700;
}

.detail-list dd {
  color: var(--text);
  text-align: right;
}

.system-status-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.system-status-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--text-soft);
}

.drawer-backdrop,
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.38);
}

.student-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 50;
  width: min(720px, calc(100vw - 32px));
  max-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.drawer-head h2 {
  margin-top: 5px;
  font-size: 1.25rem;
  font-weight: 800;
}

.drawer-head p {
  margin-top: 4px;
  color: var(--text-muted);
}

.drawer-body {
  display: grid;
  gap: 14px;
  padding: 16px;
  overflow: auto;
}

.drawer-action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.drawer-stats article {
  padding: 12px;
}

.drawer-stats span,
.drawer-stats strong {
  display: block;
}

.drawer-stats span {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.drawer-stats strong {
  margin-top: 6px;
  font-size: 1.05rem;
  font-weight: 800;
}

.drawer-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.drawer-panel h3 {
  font-size: 0.95rem;
  font-weight: 800;
}

.startup-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.startup-card {
  width: min(520px, 100%);
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.startup-card h1 {
  font-size: 1.4rem;
}

.startup-card p {
  margin: 10px 0 16px;
  color: var(--text-soft);
  line-height: 1.55;
}

@media (max-width: 1440px) {
  .kpi-grid.seven {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    left: 0;
    z-index: 45;
    width: 272px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    display: block !important;
  }

  .sidebar-toggle-btn {
    display: inline-flex !important;
  }

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

  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8 {
    grid-column: span 12;
  }

  .challenge-layout,
  .status-board {
    grid-template-columns: 1fr;
  }

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

  .preview-action {
    grid-column: span 3;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: 10px 14px;
  }

  .page {
    padding: 16px;
  }

  .page-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar,
  .kpi-grid.seven,
  .kpi-grid.six,
  .kpi-grid.four,
  .form-grid,
  .report-card-grid,
  .settings-grid,
  .drawer-stats {
    grid-template-columns: 1fr;
  }

  .field.wide,
  .field.span-2,
  .span-2 {
    grid-column: auto;
  }

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

  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8 {
    grid-column: auto;
  }

  .chart-wrap {
    min-height: 250px;
  }

  .chart-wrap.compact {
    min-height: 220px;
  }

  .heatmap-grid {
    grid-template-columns: 92px repeat(4, 74px);
  }

  .funnel-steps,
  .report-preview {
    grid-template-columns: 1fr;
  }

  .preview-action {
    grid-column: auto;
  }

  .section-head {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
