:root {
  --pink: #ec4899;
  --blue: #60a5fa;
  --purple: #a78bfa;
  --success: #22c55e;
  --warning: #facc15;
  --danger: #ef4444;
  --text: #334155;
}

body {
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(135deg, #fce7f3 0%, #dbeafe 100%);
  font-family: "Segoe UI", Tahoma, sans-serif;
}

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 260px; padding: 22px;
  background: rgba(255,255,255,.82); backdrop-filter: blur(14px);
  box-shadow: 0 20px 55px rgba(148, 61, 116, .16); z-index: 100;
  transition: width .25s ease, transform .25s ease, padding .25s ease;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: #be185d; margin-bottom: 24px; }
.sidebar-collapse-btn {
  margin-left: auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: #be185d;
  background: #fce7f3;
}
.brand-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--pink), var(--purple)); }
.brand-logo-wrap {
  position: relative;
  overflow: hidden;
  animation: logoFloat 3.8s ease-in-out infinite;
  box-shadow: 0 12px 28px rgba(236, 72, 153, .28);
}
.brand-logo-wrap::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,.55), transparent 65%);
  transform: translateX(-90%) rotate(18deg);
  animation: logoShine 3.2s ease-in-out infinite;
}
.brand-logo-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.sidebar .nav-link { color: #475569; border-radius: 16px; padding: 12px 14px; font-weight: 650; }
.sidebar .nav-link i { width: 24px; color: var(--pink); }
.sidebar .nav-link.active, .sidebar .nav-link:hover { background: linear-gradient(90deg, #fce7f3, #dbeafe); color: #be185d; }
.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-parent { margin-bottom: 0; }
.nav-submenu {
  margin: 0 0 6px 18px;
  padding-left: 14px;
  border-left: 2px solid #fbcfe8;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-sublink {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  text-decoration: none;
  border-radius: 14px;
  padding: 8px 12px;
  font-weight: 650;
  font-size: .94rem;
}
.nav-sublink i { color: var(--pink); width: 22px; }
.nav-sublink:hover, .nav-sublink.active {
  background: rgba(252, 231, 243, .88);
  color: #be185d;
}
.sidebar-user { position: absolute; bottom: 22px; left: 22px; right: 22px; padding: 14px; border-radius: 18px; background: #fff; box-shadow: 0 12px 30px rgba(236,72,153,.13); }
.main-content {
  margin-left: 260px;
  width: calc(100% - 260px);
  min-height: 100vh;
  box-sizing: border-box;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: margin-left .25s ease, width .25s ease;
}
.sidebar-toggle {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 140;
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 14px 30px rgba(190, 24, 93, .24);
}
.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  background: rgba(15, 23, 42, .34);
  backdrop-filter: blur(2px);
}
body.sidebar-collapsed .sidebar { width: 86px; padding: 18px 12px; }
body.sidebar-collapsed .main-content { margin-left: 86px; width: calc(100% - 86px); }
body.sidebar-collapsed .brand span:not(.brand-icon),
body.sidebar-collapsed .sidebar .nav-link,
body.sidebar-collapsed .nav-sublink,
body.sidebar-collapsed .sidebar-user { font-size: 0; }
body.sidebar-collapsed .sidebar-user { display: none; }
body.sidebar-collapsed .brand {
  justify-content: center;
  margin-bottom: 28px;
}
body.sidebar-collapsed .sidebar-collapse-btn { display: none; }
body.sidebar-collapsed .sidebar nav {
  align-items: center;
  gap: 8px !important;
}
body.sidebar-collapsed .nav-group {
  width: 100%;
  align-items: center;
  gap: 8px;
}
body.sidebar-collapsed .sidebar .nav-link,
body.sidebar-collapsed .nav-sublink {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  justify-content: center;
  padding: 0;
  margin: 0 auto;
  border-radius: 16px;
  line-height: 1;
  overflow: hidden;
}
body.sidebar-collapsed .sidebar .nav-link i,
body.sidebar-collapsed .nav-sublink i {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin: 0;
}
body.sidebar-collapsed .sidebar .nav-link.active,
body.sidebar-collapsed .sidebar .nav-link:hover,
body.sidebar-collapsed .nav-sublink.active,
body.sidebar-collapsed .nav-sublink:hover {
  background: linear-gradient(135deg, #fce7f3, #dbeafe);
  box-shadow: 0 10px 22px rgba(236,72,153,.12);
}
body.sidebar-collapsed .nav-submenu {
  width: 100%;
  margin: 0;
  padding: 0;
  border-left: 0;
  align-items: center;
  gap: 8px;
}
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; }
.eyebrow { margin: 0; color: #be185d; font-weight: 800; letter-spacing: 0; }
h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.35rem); font-weight: 850; color: #4c1d95; }
.filter-panel, .panel, .auth-card, .admin-card {
  background: rgba(255,255,255,.88); border: 1px solid rgba(255,255,255,.85);
  border-radius: 22px; box-shadow: 0 18px 45px rgba(129, 87, 156, .13); padding: 20px;
}
.summary-card {
  min-height: 154px; background: #fff; border-radius: 22px; padding: 20px;
  box-shadow: 0 18px 42px rgba(236,72,153,.15); display: flex; flex-direction: column; gap: 10px;
}
.summary-card i { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; font-size: 1.7rem; color: #fff; background: linear-gradient(135deg, var(--pink), #f9a8d4); }
.summary-card.blue i { background: linear-gradient(135deg, var(--blue), #93c5fd); }
.summary-card.purple i { background: linear-gradient(135deg, var(--purple), #c4b5fd); }
.summary-card span { color: #64748b; font-weight: 700; }
.summary-card strong { font-size: 1.85rem; color: #1e293b; }
.panel-title { font-weight: 850; color: #be185d; margin-bottom: 14px; font-size: 1.05rem; }
.area-chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.chart-panel-area { height: 460px; }
.chart-panel-area canvas {
  display: block;
  width: 100% !important;
  height: 370px !important;
  min-height: 0;
  max-height: 370px;
}
.chart-row {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr);
  gap: 24px;
  align-items: stretch;
}
.chart-panel-quarter, .chart-panel-donut { height: 430px; }
.chart-panel-quarter canvas {
  display: block;
  width: 100% !important;
  height: 340px !important;
  min-height: 0;
  max-height: 340px;
}
.chart-panel-donut {
  display: flex;
  flex-direction: column;
}
.chart-panel-donut canvas {
  flex: 1;
  display: block;
  width: 100% !important;
  height: 340px !important;
  min-height: 0;
  max-height: 340px;
}
.score-report-panel { overflow: hidden; }
.score-report-note { color: #64748b; font-weight: 700; }
.score-report-pill {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px;
  padding: 10px 16px; color: #9d174d;
  background: linear-gradient(135deg, rgba(252,231,243,.95), rgba(219,234,254,.95));
  font-weight: 900; box-shadow: 0 12px 28px rgba(236,72,153,.12);
}
.score-summary-card {
  min-height: 118px; border-radius: 20px; padding: 16px;
  background: rgba(255,255,255,.94); box-shadow: 0 14px 32px rgba(129,87,156,.12);
  border: 1px solid rgba(255,255,255,.9); display: grid;
  grid-template-columns: 44px 1fr; column-gap: 12px; align-items: center;
}
.score-summary-card i {
  width: 44px; height: 44px; border-radius: 16px; display: grid; place-items: center;
  color: #fff; font-size: 1.35rem; background: linear-gradient(135deg, #ec4899, #f9a8d4);
  box-shadow: 0 12px 26px rgba(236,72,153,.18); grid-row: span 2;
}
.score-summary-card.blue i { background: linear-gradient(135deg, #60a5fa, #bfdbfe); }
.score-summary-card.purple i { background: linear-gradient(135deg, #a78bfa, #ddd6fe); }
.score-summary-card span { color: #64748b; font-weight: 850; line-height: 1.35; }
.score-summary-card strong { color: #0f172a; font-size: clamp(1.35rem, 2vw, 1.9rem); font-weight: 950; line-height: 1; }
.score-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.score-table-card {
  border-radius: 20px; background: rgba(255,255,255,.8);
  border: 1px solid rgba(236,72,153,.12); overflow: hidden;
}
.score-table-title {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  font-weight: 950; color: #be185d;
  background: linear-gradient(135deg, rgba(252,231,243,.9), rgba(219,234,254,.72));
}
.score-table { margin: 0; table-layout: fixed; }
.score-table th {
  text-align: center; vertical-align: middle; color: #9d174d; font-size: .82rem;
  line-height: 1.25; background: #fce7f3; border-color: rgba(236,72,153,.12);
}
.score-table td {
  text-align: center; vertical-align: middle; font-size: .86rem; font-weight: 800;
  border-color: rgba(148,163,184,.18);
}
.score-table .score-area-head { width: 32%; }
.score-table .score-area { text-align: left; color: #334155; font-weight: 950; word-break: break-word; }
.score-dm-head { background: #fce7f3 !important; }
.score-ht-head { background: #dbeafe !important; color: #1d4ed8 !important; }
.score-percent { color: #0f172a; font-variant-numeric: tabular-nums; }
.score-level {
  display: inline-flex; min-width: 58px; justify-content: center; padding: 5px 8px;
  border-radius: 999px; background: rgba(167,139,250,.14); color: #5b21b6; font-weight: 950;
}
.score-point { color: #be185d; font-weight: 950; }
.score-total {
  display: inline-flex; min-width: 64px; justify-content: center; padding: 7px 10px;
  border-radius: 999px; font-weight: 950; font-variant-numeric: tabular-nums;
}
.score-good { background: #dcfce7; color: #15803d; box-shadow: 0 0 18px rgba(34,197,94,.18); }
.score-watch { background: #fef9c3; color: #a16207; box-shadow: 0 0 18px rgba(250,204,21,.16); }
.score-risk { background: #fee2e2; color: #b91c1c; box-shadow: 0 0 18px rgba(239,68,68,.13); }
.score-total-row td { background: linear-gradient(135deg, rgba(252,231,243,.75), rgba(219,234,254,.75)); font-weight: 950; }
.criteria-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.criteria-strip div {
  flex: 1 1 260px; border-radius: 16px; padding: 12px 14px;
  background: rgba(255,255,255,.72); border: 1px solid rgba(236,72,153,.12);
  color: #475569; font-weight: 800;
}
.pdf-dashboard {
  display: grid;
  gap: 22px;
}
.pdf-report-section {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 22px;
  border: 4px solid rgba(236,72,153,.72);
  background:
    radial-gradient(circle at top left, rgba(252,231,243,.95), rgba(255,241,242,.72) 42%, rgba(255,255,255,.9) 100%);
  box-shadow: 0 24px 54px rgba(190,24,93,.12);
  animation: reportIn .55s ease both;
}
.pdf-report-section::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.72);
  pointer-events: none;
}
.ht-report {
  border-color: rgba(3,105,161,.92);
  background:
    radial-gradient(circle at top left, rgba(224,242,254,.95), rgba(239,246,255,.82) 45%, rgba(255,255,255,.9) 100%);
  box-shadow: 0 24px 54px rgba(3,105,161,.13);
}
@keyframes reportIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.report-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.report-header h2 {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
  padding: 12px 22px;
  border-radius: 18px;
  color: #fff7ed;
  background: linear-gradient(135deg, #be185d, #ec4899);
  font-size: clamp(1.35rem, 2.2vw, 2.05rem);
  font-weight: 950;
  box-shadow: 0 15px 28px rgba(236,72,153,.22);
}
.ht-report .report-header h2 {
  color: #eff6ff;
  background: linear-gradient(135deg, #0369a1, #0ea5e9);
  box-shadow: 0 15px 28px rgba(3,105,161,.18);
}
.report-header h2 span {
  font-size: .78em;
}
.report-header p {
  margin: 0;
  color: #9d174d;
  font-weight: 850;
}
.ht-report .report-header p { color: #075985; }
.report-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}
.report-chip {
  min-width: 164px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 3px;
  border-radius: 14px;
  border: 1px solid rgba(236,72,153,.24);
  background: rgba(253,242,248,.88);
  padding: 9px 13px;
  box-shadow: 0 12px 24px rgba(236,72,153,.1);
}
.ht-report .report-chip {
  border-color: rgba(3,105,161,.35);
  background: rgba(239,246,255,.9);
}
.report-chip span {
  font-weight: 950;
  color: #9d174d;
  font-size: .82rem;
  line-height: 1.2;
}
.ht-report .report-chip span { color: #075985; }
.report-chip strong {
  justify-self: start;
  color: #111827;
  font-size: 1.35rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}
.report-chip.accent {
  background: linear-gradient(135deg, #fce7f3, #f472b6);
}
.ht-report .report-chip.accent {
  background: linear-gradient(135deg, #bae6fd, #38bdf8);
}
.report-chart-grid,
.report-table-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 20px;
}
.report-table-grid { margin-top: 18px; }
.report-chart-card,
.report-table-card {
  min-width: 0;
  border-radius: 14px;
  padding: 14px;
  background: rgba(255,255,255,.42);
}
.report-chart-card h3,
.report-table-card h3 {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 16px;
  color: #9d174d;
  background: linear-gradient(90deg, #fce7f3, rgba(252,231,243,0));
  font-size: clamp(1rem, 1.45vw, 1.35rem);
  font-weight: 950;
  border-radius: 12px 0 0 12px;
}
.ht-report .report-chart-card h3,
.ht-report .report-table-card h3 {
  color: #075985;
  background: linear-gradient(90deg, #e0f2fe, rgba(224,242,254,0));
}
.report-chart-card canvas {
  width: 100% !important;
  height: 300px !important;
}
.report-metric-table {
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(249,168,212,.72);
  background: rgba(253,242,248,.9);
  table-layout: fixed;
  border-radius: 18px;
  border-collapse: separate;
  border-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 14px 30px rgba(236,72,153,.08);
}
.ht-report .report-metric-table {
  border-color: rgba(96,165,250,.72);
  background: rgba(240,249,255,.9);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 14px 30px rgba(96,165,250,.08);
}
.report-metric-table th {
  color: #9d174d;
  background: linear-gradient(135deg, #fce7f3, #fbcfe8) !important;
  border: 0;
  border-right: 1px solid rgba(236,72,153,.24);
  border-bottom: 1px solid rgba(236,72,153,.28);
  text-align: center;
  font-size: .98rem;
  font-weight: 950;
  vertical-align: middle;
}
.ht-report .report-metric-table th {
  color: #075985;
  background: linear-gradient(135deg, #e0f2fe, #bfdbfe) !important;
  border-color: rgba(14,165,233,.28);
}
.report-metric-table td {
  border: 0;
  border-right: 1px solid rgba(236,72,153,.2);
  border-bottom: 1px solid rgba(236,72,153,.22);
  text-align: center;
  font-size: .96rem;
  font-weight: 850;
  padding: 11px 10px;
  color: #111827;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.ht-report .report-metric-table td { border-color: rgba(14,165,233,.26); }
.report-metric-table td:first-child {
  text-align: left;
  word-break: break-word;
}
.report-metric-table th:last-child,
.report-metric-table td:last-child { border-right: 0; }
.report-metric-table tbody tr:last-child td { border-bottom: 0; }
.report-metric-table thead th:first-child { border-top-left-radius: 16px; }
.report-metric-table thead th:last-child { border-top-right-radius: 16px; }
.report-metric-table tbody tr:last-child td:first-child { border-bottom-left-radius: 16px; }
.report-metric-table tbody tr:last-child td:last-child { border-bottom-right-radius: 16px; }
.report-total-row td {
  background: linear-gradient(135deg, #fce7f3, #f9a8d4) !important;
  color: #9d174d;
  font-weight: 950;
}
.ht-report .report-total-row td {
  background: linear-gradient(135deg, #e0f2fe, #93c5fd) !important;
  color: #075985;
}
.area-chart-grid,
.chart-row {
  display: none;
}
.score-report-panel,
.table-panel {
  display: none !important;
}
.filter-panel + section.row.g-3.mt-1,
.filter-panel [class*="col-"]:has(#quarter) {
  display: none !important;
}
.filtered-summary-panel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 20px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.86);
  box-shadow: 0 18px 45px rgba(129, 87, 156, .13);
}
.filtered-summary-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--pink), var(--blue), var(--purple));
}
.filtered-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.filtered-summary-scope {
  color: #64748b;
  font-weight: 750;
}
.filtered-summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 9px 14px;
  color: #9d174d;
  background: linear-gradient(135deg, #fce7f3, #dbeafe);
  font-weight: 900;
  white-space: nowrap;
}
.filtered-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.filtered-summary-card {
  position: relative;
  min-height: 118px;
  border-radius: 20px;
  padding: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(252,231,243,.52));
  border: 1px solid rgba(249,168,212,.36);
  box-shadow: 0 16px 34px rgba(236,72,153,.12);
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
}
.filtered-summary-card::after {
  content: "";
  position: absolute;
  right: -36px;
  top: -38px;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
}
.filtered-summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), #f9a8d4);
  box-shadow: 0 12px 26px rgba(236,72,153,.2);
  font-size: 1.35rem;
}
.filtered-summary-card.blue {
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(219,234,254,.62));
  border-color: rgba(147,197,253,.38);
}
.filtered-summary-card.blue .filtered-summary-icon,
.filtered-summary-card.good .filtered-summary-icon {
  background: linear-gradient(135deg, var(--blue), #93c5fd);
  box-shadow: 0 12px 26px rgba(96,165,250,.2);
}
.filtered-summary-card.watch .filtered-summary-icon {
  background: linear-gradient(135deg, #fbbf24, #fde68a);
  color: #713f12;
}
.filtered-summary-card.risk .filtered-summary-icon {
  background: linear-gradient(135deg, #fb7185, #fecdd3);
}
.filtered-summary-card span {
  display: block;
  color: #64748b;
  font-weight: 900;
  line-height: 1.35;
}
.filtered-summary-card strong {
  display: block;
  color: #0f172a;
  font-size: clamp(1.45rem, 1.8vw, 1.85rem);
  font-weight: 950;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.filtered-summary-card small {
  color: #64748b;
  font-weight: 750;
}
.report-table-card {
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 16px 34px rgba(120,53,15,.08);
}
.ht-report .report-table-card {
  box-shadow: 0 16px 34px rgba(3,105,161,.08);
}
.report-metric-table {
  border-radius: 14px;
  border-collapse: separate;
  border-spacing: 0;
  box-shadow: 0 12px 26px rgba(120,53,15,.08);
}
.report-metric-table thead th {
  padding: 9px 8px !important;
  white-space: normal;
}
.report-metric-table tbody tr:nth-child(even) td {
  background: rgba(255,255,255,.55);
}
.report-area-name {
  display: inline-block;
  font-weight: 900;
  color: #334155;
  line-height: 1.28;
}
.report-metric-table td:not(:first-child),
.report-metric-table th:not(:first-child) {
  text-align: center;
}
.report-metric-table td:first-child,
.report-metric-table th:first-child {
  width: 42%;
}
.report-metric-table td:nth-child(2),
.report-metric-table td:nth-child(3),
.report-metric-table th:nth-child(2),
.report-metric-table th:nth-child(3) {
  width: 18%;
}
.report-metric-table td:nth-child(4),
.report-metric-table th:nth-child(4) {
  width: 22%;
}
.metric-percent {
  display: inline-flex;
  min-width: 84px;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 950;
  font-size: .98rem;
  font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,.72);
}
.metric-percent.good {
  color: #047857;
  background: #dcfce7;
}
.metric-percent.watch {
  color: #a16207;
  background: #fef3c7;
}
.metric-percent.risk {
  color: #b91c1c;
  background: #fee2e2;
}
.report-total-row .metric-percent {
  color: #9d174d;
  background: rgba(255,255,255,.88);
  box-shadow: 0 0 0 2px rgba(255,255,255,.38);
}
.ht-report .report-total-row .metric-percent {
  color: #075985;
  background: rgba(255,255,255,.9);
}
.btn-pink { background: var(--pink); border-color: var(--pink); color: #fff; font-weight: 750; border-radius: 14px; }
.btn-pink:hover { background: #db2777; border-color: #db2777; color: #fff; }
.btn-blue { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 750; border-radius: 14px; }
.btn-yellow { background: var(--warning); border-color: var(--warning); color: #713f12; font-weight: 750; border-radius: 14px; }
.btn-outline-pink { border-color: var(--pink); color: var(--pink); border-radius: 14px; font-weight: 750; }
.form-control, .form-select { border-radius: 14px; border-color: #fbcfe8; }
.table thead th {
  background: #fce7f3 !important;
  color: #9d174d;
  white-space: normal;
  word-break: keep-all;
  line-height: 1.16;
  min-height: 58px;
  padding: 12px 5px !important;
  text-align: center !important;
  vertical-align: middle !important;
}
.table-panel .table {
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  width: 100% !important;
  margin-bottom: 0 !important;
}
.table-panel .table-responsive {
  overflow-x: hidden;
  width: 100%;
}
.table-panel td, .table-panel th {
  vertical-align: middle;
  text-align: center;
}
.table-panel tbody td {
  padding: 12px 6px;
  line-height: 1.32;
}
.table-panel tbody tr { min-height: 58px; }
.table-panel .col-year { width: 5.2% !important; min-width: 0; }
.table-panel .col-level { width: 6.7% !important; min-width: 0; }
.table-panel .col-disease { width: 4.3% !important; min-width: 0; }
.table-panel .col-number { width: 5.5% !important; min-width: 0; }
.table-panel .col-percent { width: 7.2% !important; min-width: 0; }
.table-panel .col-status { width: 10.5% !important; min-width: 0; }
.table-panel .col-area {
  width: 19% !important;
  min-width: 0;
  max-width: none;
  font-weight: 800;
  color: #334155;
  line-height: 1.45;
  text-align: left !important;
  word-break: normal;
  overflow-wrap: anywhere;
}
.table-panel td.col-number,
.table-panel td.col-year,
.table-panel td.col-level,
.table-panel td.col-disease,
.table-panel td.col-percent,
.table-panel td.col-status {
  padding-left: 4px;
  padding-right: 4px;
}
.table-panel td.col-status,
.table-panel th.col-status {
  padding-left: 8px !important;
  padding-right: 8px !important;
}
.table-panel tbody td:not(.col-area) { font-variant-numeric: tabular-nums; }
.table-panel .badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: min(100%, 108px);
  min-width: 0;
  max-width: 100%;
  border-radius: 999px;
  padding: 8px 8px;
  font-size: .82rem;
  font-weight: 900;
  white-space: nowrap;
  line-height: 1.2;
  text-align: center;
}
.dataTables_wrapper .dataTables_filter label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.dataTables_wrapper .dataTables_filter input { margin-left: 0; }
.page-jump {
  position: fixed;
  right: 10px;
  bottom: 96px;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 50;
}
.page-jump.show { display: flex; }
.page-jump-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 14px 30px rgba(190, 24, 93, .22);
}
.page-jump-btn:hover { filter: brightness(.96); transform: translateY(-1px); }
.quarter-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  background: #fce7f3;
  margin-left: auto;
}
.quarter-btn {
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #9d174d;
  font-weight: 800;
  padding: 8px 14px;
}
.quarter-btn.active, .quarter-btn:hover { background: var(--pink); color: #fff; }
.badge-status-success { background: #dcfce7; color: #166534; }
.badge-status-warning { background: #fef9c3; color: #854d0e; }
.badge-status-danger { background: #fee2e2; color: #991b1b; }
.table-panel .badge-status-success {
  position: relative;
  animation: statusSuccessGlow 2.8s ease-in-out infinite;
}
.table-panel .badge-status-warning {
  position: relative;
  animation: statusWarningPulse 1.9s ease-in-out infinite;
}
.table-panel .badge-status-danger {
  position: relative;
  animation: statusDangerAlert 1.45s ease-in-out infinite;
}
.table-panel .badge-status-success::after,
.table-panel .badge-status-warning::after,
.table-panel .badge-status-danger::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
}
.table-panel .badge-status-success::after {
  background: linear-gradient(90deg, transparent, rgba(34,197,94,.22), transparent);
  animation: statusShine 3.2s ease-in-out infinite;
}
.table-panel .badge-status-warning::after {
  box-shadow: inset 0 0 0 1px rgba(250,204,21,.38);
  animation: statusRing 1.9s ease-in-out infinite;
}
.table-panel .badge-status-danger::after {
  box-shadow: inset 0 0 0 1px rgba(239,68,68,.34);
  animation: statusRing 1.45s ease-in-out infinite;
}
.auth-wrap {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(252,231,243,.94), rgba(219,234,254,.94)),
    repeating-linear-gradient(90deg, rgba(236,72,153,.06) 0 1px, transparent 1px 62px);
  animation: authBackdrop 14s ease-in-out infinite alternate;
}
.auth-wrap::before {
  content: "";
  position: absolute;
  inset: auto -8% 8% -8%;
  height: 118px;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg width='760' height='118' viewBox='0 0 760 118' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 68 H82 L105 48 L128 88 L156 68 H246 L276 30 L311 98 L346 68 H466 L489 50 L512 86 L544 68 H636 L665 36 L702 92 L760 68' stroke='%23EC4899' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M0 76 H82 L105 56 L128 96 L156 76 H246 L276 38 L311 106 L346 76 H466 L489 58 L512 94 L544 76 H636 L665 44 L702 100 L760 76' stroke='%2360A5FA' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' opacity='.48'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 760px 118px;
  filter: drop-shadow(0 5px 12px rgba(236,72,153,.11));
  animation: authHeartbeat 12s linear infinite;
}
.auth-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.7), transparent 42%);
  opacity: .78;
}
.auth-card {
  width: min(100%, 560px);
  position: relative;
  z-index: 1;
}
.auth-card-wide { width: min(100%, 620px); }
.auth-card-polished {
  overflow: hidden;
  padding: 30px 32px;
  border: 1px solid rgba(255,255,255,.86);
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(18px);
  box-shadow:
    0 24px 60px rgba(88, 66, 137, .16),
    inset 0 1px 0 rgba(255,255,255,.86);
  animation: authCardIn .62s cubic-bezier(.22, 1, .36, 1) both;
}
.auth-ambient-line {
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--pink), var(--blue), var(--purple), var(--pink));
  background-size: 220% 100%;
  animation: authLineFlow 4.5s ease-in-out infinite;
}
.auth-brand {
  margin-bottom: 20px;
  transform-origin: left center;
  animation: authBrandIn .72s .12s cubic-bezier(.22, 1, .36, 1) both;
  position: relative;
  isolation: isolate;
}
.auth-brand > span:not(.auth-ecg-trail) {
  position: relative;
  z-index: 2;
}
.auth-brand > span:not(.auth-ecg-trail):not(.brand-icon) {
  padding: 2px 12px 2px 0;
  background: linear-gradient(90deg, rgba(255,255,255,.96) 0 78%, rgba(255,255,255,0));
  border-radius: 999px;
}
.auth-brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(190, 24, 93, .22);
  animation: logoFloat 3.8s ease-in-out infinite;
}
.auth-brand-icon::after {
  content: "";
  position: absolute;
  inset: -60%;
  background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,.62), transparent 65%);
  transform: translateX(-80%) rotate(18deg);
  animation: logoShine 3.2s ease-in-out infinite;
}
.auth-ecg-trail {
  position: absolute;
  left: 52px;
  right: 0;
  top: 50%;
  height: 42px;
  transform: translateY(-50%);
  z-index: 1;
  opacity: .82;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent 0 118px, #000 164px 76%, transparent 100%);
}
.auth-ecg-trail svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.auth-ecg-trail path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
}
.auth-ecg-shadow {
  stroke: rgba(96,165,250,.22);
  stroke-width: 3;
  filter: drop-shadow(0 5px 9px rgba(96,165,250,.16));
  animation: authEcgRun 4.6s cubic-bezier(.55, 0, .22, 1) infinite;
}
.auth-ecg-line {
  stroke: rgba(236,72,153,.42);
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(236,72,153,.22));
  animation: authEcgRun 4.6s cubic-bezier(.55, 0, .22, 1) infinite;
  animation-delay: .08s;
}
.auth-heading {
  margin-bottom: 22px;
  animation: authItemIn .58s .2s ease both;
}
.auth-heading .eyebrow { color: #db2777; }
.auth-subtitle {
  margin: 0;
  color: #64748b;
  font-size: .94rem;
  font-weight: 650;
}
.auth-form {
  animation: authItemIn .58s .28s ease both;
}
.auth-input-wrap {
  position: relative;
}
.auth-input-wrap i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #db2777;
  opacity: .78;
  z-index: 2;
}
.auth-input-wrap .form-control {
  min-height: 46px;
  padding-left: 44px;
  border-color: #f9a8d4;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}
.auth-input-wrap .form-control:focus {
  border-color: var(--pink);
  background: #fff;
  box-shadow: 0 0 0 .22rem rgba(236,72,153,.13), 0 12px 24px rgba(236,72,153,.09);
  transform: translateY(-1px);
}
.auth-submit {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--pink), #db2777);
  box-shadow: 0 15px 28px rgba(236,72,153,.28);
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}
.auth-submit i {
  font-size: 1.35rem;
  transition: transform .22s ease;
}
.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(236,72,153,.34);
  filter: saturate(1.06);
}
.auth-submit:hover i { transform: translateX(3px); }
.auth-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  animation: authItemIn .58s .36s ease both;
}
.auth-links a {
  color: #be185d;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(236,72,153,.28);
}
.auth-links a:hover {
  color: #2563eb;
  border-color: rgba(96,165,250,.48);
}
.auth-links span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #f9a8d4;
}
.privacy-modal {
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 34px 90px rgba(88, 66, 137, .28);
}
.privacy-modal .modal-header {
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.8), transparent 28%),
    linear-gradient(90deg, #fce7f3, #dbeafe);
  color: #9d174d;
  border-bottom: 0;
}
.privacy-modal .modal-title {
  margin: 0;
  font-weight: 900;
  line-height: 1.25;
}
.privacy-modal .modal-body {
  padding: 22px 24px 8px;
}
.privacy-modal .modal-footer {
  border-top: 0;
  padding: 16px 24px 24px;
}
.privacy-icon {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 16px 34px rgba(190,24,93,.22);
  animation: privacyIconFloat 3s ease-in-out infinite;
}
.privacy-icon::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 24px;
  border: 1px solid rgba(236,72,153,.24);
  animation: privacyIconRing 2.2s ease-in-out infinite;
}
.privacy-icon i {
  font-size: 1.55rem;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.12));
}
.privacy-eyebrow {
  color: #db2777;
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.privacy-notice-list {
  display: grid;
  gap: 12px;
}
.privacy-notice-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(249,168,212,.58);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(252,231,243,.45));
}
.privacy-notice-item > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #be185d;
  background: #fce7f3;
  box-shadow: inset 0 0 0 1px rgba(236,72,153,.12);
  animation: privacyMiniPulse 2.6s ease-in-out infinite;
}
.privacy-notice-item strong {
  display: block;
  color: #9d174d;
  font-weight: 900;
  margin-bottom: 3px;
}
.privacy-notice-item p {
  margin: 0;
  color: #475569;
  font-weight: 650;
  line-height: 1.65;
}
.privacy-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  color: #475569;
  background: linear-gradient(90deg, #eff6ff, #fdf2f8);
  font-size: .9rem;
  font-weight: 750;
}
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.admin-card { text-decoration: none; color: inherit; }
.admin-card i { font-size: 2rem; color: var(--pink); }
.logo-setting-box {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border: 1px dashed #f9a8d4;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, #fdf2f8);
}
.setting-logo-preview { width: 96px; height: 96px; border-radius: 28px; font-size: 2.4rem; }
.site-footer {
  position: relative;
  margin-top: auto;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 18px 45px rgba(129, 87, 156, .13);
  border: 1px solid rgba(255,255,255,.85);
}
.main-content > :not(.site-footer):last-of-type {
  margin-bottom: 28px;
}
.footer-pulse {
  height: 54px;
  background: linear-gradient(90deg, #fce7f3, #dbeafe);
}
.footer-pulse svg { width: 100%; height: 100%; }
.footer-pulse path {
  fill: none;
  stroke: var(--pink);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px rgba(236,72,153,.42));
  stroke-dasharray: 920;
  stroke-dashoffset: 920;
  animation: heartWave 4s linear infinite;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo { width: 46px; height: 46px; border-radius: 16px; }
.footer-version {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9d174d;
  font-weight: 800;
  padding: 9px 14px;
  border-radius: 999px;
  background: #fce7f3;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.03); }
}
@keyframes logoShine {
  0%, 55% { transform: translateX(-90%) rotate(18deg); }
  78%, 100% { transform: translateX(90%) rotate(18deg); }
}
@keyframes heartWave {
  0% { stroke-dashoffset: 920; opacity: .45; }
  35% { opacity: 1; }
  100% { stroke-dashoffset: -920; opacity: .75; }
}
@keyframes statusSuccessGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(34,197,94,0); transform: translateY(0); }
  50% { box-shadow: 0 8px 18px rgba(34,197,94,.22); transform: translateY(-1px); }
}
@keyframes statusWarningPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(250,204,21,.18); transform: scale(1); }
  50% { box-shadow: 0 0 0 5px rgba(250,204,21,.12); transform: scale(1.025); }
}
@keyframes statusDangerAlert {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.14); transform: translateX(0); }
  35% { box-shadow: 0 0 0 5px rgba(239,68,68,.1); transform: translateX(-1px); }
  65% { transform: translateX(1px); }
}
@keyframes statusShine {
  0%, 48% { opacity: 0; transform: translateX(-40%); }
  62% { opacity: .85; }
  100% { opacity: 0; transform: translateX(42%); }
}
@keyframes statusRing {
  0%, 100% { opacity: .2; transform: scale(.94); }
  50% { opacity: .9; transform: scale(1.02); }
}
@keyframes authBackdrop {
  0% { background-position: 0% 50%, 0 0; }
  100% { background-position: 100% 50%, 46px 0; }
}
@keyframes authHeartbeat {
  0% { background-position-x: 0; opacity: .14; }
  35% { opacity: .22; }
  100% { background-position-x: 760px; opacity: .18; }
}
@keyframes authCardIn {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes authBrandIn {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes authItemIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes authLineFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes authEcgRun {
  0% { stroke-dashoffset: 520; opacity: 0; transform: translateX(-6px); }
  14% { opacity: 1; }
  62% { stroke-dashoffset: 0; opacity: 1; transform: translateX(0); }
  100% { stroke-dashoffset: -520; opacity: 0; transform: translateX(8px); }
}
@keyframes privacyIconFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.03); }
}
@keyframes privacyIconRing {
  0%, 100% { opacity: .22; transform: scale(.94); }
  50% { opacity: .8; transform: scale(1.07); }
}
@keyframes privacyMiniPulse {
  0%, 100% { transform: scale(1); box-shadow: inset 0 0 0 1px rgba(236,72,153,.12); }
  50% { transform: scale(1.04); box-shadow: inset 0 0 0 1px rgba(236,72,153,.22), 0 8px 16px rgba(236,72,153,.08); }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    width: min(82vw, 300px);
    min-height: 100vh;
    transform: translateX(-110%);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-overlay { display: block; }
  .sidebar-toggle { display: grid; }
  .sidebar-collapse-btn { display: none; }
  .sidebar-user { position: static; margin-top: 18px; }
  .main-content { width: 100%; margin-left: 0; padding: 74px 18px 18px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .area-chart-grid { grid-template-columns: 1fr; }
  .chart-row { grid-template-columns: 1fr; }
  .footer-content { align-items: flex-start; flex-direction: column; }
  body.sidebar-collapsed .main-content { width: 100%; margin-left: 0; }
  body.sidebar-collapsed .sidebar { width: min(82vw, 300px); padding: 22px; }
  body.sidebar-collapsed .brand span:not(.brand-icon),
  body.sidebar-collapsed .sidebar .nav-link,
  body.sidebar-collapsed .nav-sublink,
  body.sidebar-collapsed .sidebar-user { font-size: inherit; }
  body.sidebar-collapsed .sidebar-user { display: block; }
}

/* Typography system */
:root { --font-main: "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif; }
html, body, button, input, select, textarea, .dataTables_wrapper {
  font-family: var(--font-main);
  letter-spacing: 0;
}
body {
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
.brand {
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.25;
}
.sidebar .nav-link {
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.35;
}
.nav-sublink {
  font-size: .9rem;
  font-weight: 800;
}
.eyebrow {
  font-size: .9rem;
  font-weight: 900;
}
h1 {
  font-size: clamp(1.65rem, 2.35vw, 2.25rem);
  font-weight: 900;
  line-height: 1.25;
}
h2, .h2 { font-size: 1.55rem; font-weight: 900; line-height: 1.3; }
h3, .h3 { font-size: 1.3rem; font-weight: 850; line-height: 1.35; }
h4, .h4 { font-size: 1.12rem; font-weight: 850; line-height: 1.4; }
.panel-title {
  font-size: 1.03rem;
  font-weight: 900;
  line-height: 1.4;
}
.summary-card span {
  font-size: .96rem;
  font-weight: 800;
  line-height: 1.45;
}
.summary-card strong {
  font-size: clamp(1.55rem, 1.9vw, 1.95rem);
  font-weight: 900;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.form-label {
  font-size: .92rem;
  font-weight: 800;
  color: #475569;
}
.form-control, .form-select, .btn {
  font-size: .94rem;
}
.btn, .quarter-btn {
  font-weight: 850;
}
.table thead th {
  font-size: .8rem;
  font-weight: 900;
  line-height: 1.16;
}
.table-panel tbody td,
.table td {
  font-size: .84rem;
}
.table-panel .col-area {
  font-weight: 850;
}
.table-panel .badge,
.badge {
  font-weight: 850;
}
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate,
.dataTables_wrapper .dt-buttons .btn {
  font-size: .9rem;
}
.admin-card h3 {
  font-size: 1.1rem;
  font-weight: 850;
}
.admin-card p,
.footer-content,
.sidebar-user {
  font-size: .94rem;
}
.footer-version {
  font-size: .92rem;
  font-weight: 850;
}

@media (max-width: 900px) {
  body { font-size: 14px; }
  h1 { font-size: clamp(1.45rem, 6vw, 1.9rem); }
  .summary-card strong { font-size: 1.55rem; }
  .panel-title { font-size: 1rem; }
  .score-report-grid { grid-template-columns: 1fr; }
  .score-table { min-width: 720px; }
  .score-table-card .table-responsive { overflow-x: auto; }
  .pdf-report-section { padding: 16px; border-width: 3px; }
  .report-header { flex-direction: column; }
  .report-chip-row { justify-content: flex-start; }
  .report-chart-grid,
  .report-table-grid { grid-template-columns: 1fr; }
  .report-chart-card canvas { height: 260px !important; }
  .report-table-card { overflow-x: auto; }
  .report-metric-table { min-width: 620px; }
  .filtered-summary-head { flex-direction: column; }
  .filtered-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .filtered-summary-grid { grid-template-columns: 1fr; }
}

/* Final report table color overrides */
.dm-report .report-metric-table thead th {
  color: #9d174d !important;
  background: linear-gradient(135deg, #fce7f3, #fbcfe8) !important;
  border-color: rgba(236,72,153,.28) !important;
}
.ht-report .report-metric-table thead th {
  color: #075985 !important;
  background: linear-gradient(135deg, #e0f2fe, #bfdbfe) !important;
  border-color: rgba(14,165,233,.28) !important;
}
.report-metric-table {
  border-radius: 18px !important;
}
.report-metric-table thead th {
  font-size: 1rem !important;
  padding: 8px 10px !important;
  line-height: 1.12 !important;
  vertical-align: middle !important;
}
.report-metric-table tbody td {
  font-size: 1rem !important;
  padding: 7px 10px !important;
  line-height: 1.18 !important;
  vertical-align: middle !important;
}
.report-metric-table .report-area-name {
  font-size: 1rem;
  line-height: 1.18;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.report-metric-table .metric-percent {
  font-size: 1rem;
  padding-top: 4px;
  padding-bottom: 4px;
}
