	  :root {
    --bg-primary: #f4f7fb;
    --bg-secondary: #eef2f8;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafd;
    --accent-teal: #00b894;
    --accent-blue: #2563eb;
    --accent-violet: #7c3aed;
    --accent-rose: #e11d48;
    --accent-amber: #d97706;
    --accent-emerald: #059669;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: rgba(15,23,42,0.08);
    --border-light: rgba(15,23,42,0.05);
    --glow-teal: rgba(0,184,148,0.08);
    --glow-blue: rgba(37,99,235,0.07);
    --risk-safe: #059669;
    --risk-normal: #2563eb;
    --risk-warn: #d97706;
    --risk-high: #dc2626;
    --risk-critical: #9f1239;
  }

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

  body {
    font-family: 'IBM Plex Sans Thai', 'Sarabun', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
  }

  body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
      radial-gradient(ellipse 900px 700px at 5% 10%, rgba(0,184,148,0.04) 0%, transparent 60%),
      radial-gradient(ellipse 700px 600px at 90% 80%, rgba(37,99,235,0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
  }

  /* NAVBAR */
  .navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 12px rgba(15,23,42,0.06);
    padding: 0 28px;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
  }

  .brand-icon {
    width: 38px; height: 38px;
    /*background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
    border-radius: 10px;*/
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    /*box-shadow: 0 4px 12px rgba(0,184,148,0.25);*/
  }
	.brand-icon img {width: 45px; height: auto;}

  .brand-text h1 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.0px;
  }

  .brand-text p {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0px;
  }

  .date-range {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
  }

  .date-badge {
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--accent-blue);
    font-weight: 500;
  }

  .navbar-filters {
    display: flex;
    gap: 8px;
    margin-left: auto;
    align-items: center;
    flex-shrink: 0;
  }

  .filter-select {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    padding: 7px 30px 7px 12px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.2s;
  }

  .filter-select:hover {
    border-color: var(--accent-blue);
    color: var(--text-primary);
  }

  .btn-search {
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
    border: none;
    border-radius: 8px;
    color: #fff;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(0,184,148,0.3);
  }

  .btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,184,148,0.35);
  }

  /* LAYOUT */
  .container {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 28px;
  }

  /* PAGE HEADER */
  .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
  }

  .page-title {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .live-dot {
    width: 8px; height: 8px;
    background: var(--accent-teal);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
    box-shadow: 0 0 8px var(--accent-teal);
  }

  @keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.8); }
  }

  .page-date {
    font-size: 13px;
    color: var(--text-secondary);
  }

  .tab-group {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
  }

  .tab {
    padding: 6px 16px;
    border-radius: 7px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s;
  }

  .tab.active {
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
    color: white;
    box-shadow: 0 2px 8px rgba(0,184,148,0.25);
  }

  /* MAIN GRID — map full width, stats as top summary row */
  .main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
	  width: 70%;
  }

  /* Stats strip — horizontal summary cards */
  .stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
  }

  .stat-summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 1px 4px rgba(15,23,42,0.06);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s;
  }

  .stat-summary-card:hover {
    border-color: rgba(37,99,235,0.2);
    box-shadow: 0 4px 16px rgba(15,23,42,0.09);
    transform: translateY(-1px);
  }

  .stat-summary-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.0px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .stat-summary-label .lbl-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .stat-summary-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
  }

  .stat-summary-sub {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
  }

  .stat-summary-bar {
    height: 3px;
    border-radius: 2px;
    margin-top: 6px;
    background: #f1f5f9;
    overflow: hidden;
  }

  .stat-summary-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease;
  }

  /* Age distribution card — spans wider */
  .age-dist-card {
    grid-column: span 2;
  }

  .age-dist-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 2px;
  }

  .age-dist-row {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .age-dist-label {
    font-size: 11px;
    color: var(--text-secondary);
    width: 62px;
    flex-shrink: 0;
    font-weight: 500;
  }

  .age-dist-bar-wrap {
    flex: 1;
    height: 7px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
  }

  .age-dist-bar {
    height: 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 1s ease;
  }

  .age-dist-val {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    width: 58px;
    text-align: right;
    flex-shrink: 0;
  }

  /* CARDS */
  .card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    animation: fadeInUp 0.5s ease both;
    box-shadow: 0 1px 4px rgba(15,23,42,0.06);
  }

  .card:hover {
    border-color: rgba(37,99,235,0.2);
    box-shadow: 0 8px 32px rgba(15,23,42,0.1), 0 2px 8px rgba(15,23,42,0.06);
    transform: translateY(-1px);
  }

  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .card-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
  }

  /* STATS SIDEBAR */
  .stats-card .stat-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
  }

  .stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(15,23,42,0.04);
  }

  .stat-row:last-child { border-bottom: none; }

  .stat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-secondary);
  }

  .stat-icon {
    width: 28px; height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
  }

  .stat-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
  }

  .stat-unit {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 400;
  }

  /* Age breakdown */
  .age-breakdown {
    padding: 12px 20px;
  }

  .age-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
  }

  .age-label {
    font-size: 11.5px;
    color: var(--text-muted);
    width: 70px;
    flex-shrink: 0;
  }

  .age-bar-wrap {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.04);
    border-radius: 3px;
    overflow: hidden;
  }

  .age-bar {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue));
    width: 0%;
    transition: width 1s ease;
  }

  .age-count {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    width: 50px;
    text-align: right;
  }

  /* Health risk card */
  .risk-card {
    margin: 16px 20px;
    background: linear-gradient(135deg, rgba(225,29,72,0.05), rgba(220,38,38,0.03));
    border: 1px solid rgba(225,29,72,0.15);
    border-radius: 12px;
    padding: 14px;
  }

  .risk-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
  }

  .risk-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-rose);
  }

  .risk-count {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
  }

  .risk-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
  }

  .risk-items {
    margin-top: 12px;
    display: grid;
    gap: 6px;
  }

  .risk-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
    border: 1px solid rgba(15,23,42,0.06);
  }

  .risk-item-label {
    font-size: 11.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .risk-item-val {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
  }

  /* Totals footer */
  .stats-footer {
    padding: 14px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border-top: 1px solid var(--border-light);
  }

  .footer-stat {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
  }

  .footer-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .footer-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-teal);
    font-variant-numeric: tabular-nums;
  }

  .footer-stat-unit {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 400;
  }

  /* MAP — full width */
  .map-card {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    width: 100%;
  }

  #leaflet-map {
    width: 100%;
    height: 600px;
    border-radius: 16px;
    z-index: 1;
  }

  .map-card .map-tabs {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 500;
  }

  .map-card .map-legend {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Override Leaflet attribution to match theme */
  .leaflet-control-attribution {
    font-size: 9px !important;
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(4px);
    border-radius: 6px 0 0 0 !important;
    padding: 2px 6px !important;
  }

  .leaflet-control-zoom a {
    border-radius: 8px !important;
    color: var(--text-secondary) !important;
    font-weight: 700 !important;
  }

  /* Custom marker pulse */
  .pulse-marker {
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2.5px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    position: relative;
  }

  .pulse-marker::after {
    content: '';
    position: absolute;
    top: -5px; left: -5px;
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 2px solid currentColor;
    animation: markerPulse 2s infinite;
    opacity: 0.5;
  }

  @keyframes markerPulse {
    0% { transform: scale(0.6); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
  }

  /* SVG Map of Thailand */
  .map-svg-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .map-tabs {
    display: flex;
    gap: 4px;
  }

  .map-tab {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 11.5px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 1px 6px rgba(15,23,42,0.08);
  }

  .map-tab.active {
    background: rgba(0,184,148,0.1);
    border-color: var(--accent-teal);
    color: var(--accent-teal);
  }

  .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    color: var(--text-secondary);
    box-shadow: 0 1px 4px rgba(15,23,42,0.08);
  }

  .legend-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  /* HEALTH STATUS TABS */
  .health-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
	  margin-bottom: 20px;
  }

  .health-tab {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.05);
  }

  .health-tab.active {
    background: rgba(0,184,148,0.08);
    border-color: var(--accent-teal);
    color: var(--accent-teal);
  }

  .health-tab-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent-teal);
  }

  /* CHARTS SECTION */
  .charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
  }

  .chart-card {
    animation-delay: 0.1s;
  }

  .chart-card .card-header {
    padding: 16px 20px 10px;
  }

  .chart-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
  }

  .chart-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
  }

  .chart-body {
    padding: 12px 16px 16px;
  }

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

  /* Modern chart card enhancements */
  .disease-chart-card {
    position: relative;
    overflow: hidden;
  }

  .disease-chart-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    /*background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue), var(--accent-violet));*/
    border-radius: 16px 16px 0 0;
    z-index: 2;
  }

  .disease-card-header {
    background: linear-gradient(135deg, rgba(248,250,252,0.8), rgba(255,255,255,1));
  }

  /* Chart stat badges */
  .chart-stat-row {
    display: flex;
    gap: 8px;
    padding: 0 20px 14px;
    flex-wrap: wrap;
  }

  .chart-stat-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid transparent;
  }

  .chart-stat-badge-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .chart-trend-up   { color: #dc2626; background: rgba(220,38,38,0.07);  border-color: rgba(220,38,38,0.15); }
  .chart-trend-down { color: #059669; background: rgba(5,150,105,0.07);  border-color: rgba(5,150,105,0.15); }
  .chart-trend-flat { color: #d97706; background: rgba(217,119,6,0.07);  border-color: rgba(217,119,6,0.15); }

  /* Risk table — refined */
  .risk-table-section {
    padding: 0 16px 16px;
  }

  .risk-table-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    padding-left: 4px;
  }

  /* Risk table */
  .risk-table-wrap {
    padding: 0 16px 16px;
    overflow-x: auto;
  }

  table.risk-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 11px;
    background: #f8fafc;
    border-radius: 10px;
    overflow: hidden;
  }

  .risk-table thead tr:first-child {
    background: rgba(15,23,42,0.03);
  }

  .risk-table th {
    padding: 8px 10px;
    text-align: center;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
    font-size: 11px;
  }

  .risk-table td {
    padding: 8px 10px;
    text-align: center;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    background: #fff;
  }

  .risk-table tbody tr:last-child td { border-bottom: none; }
  .risk-table tbody tr td:first-child {
    background: rgba(15,23,42,0.02);
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    padding-left: 14px;
  }

  .risk-table tbody tr:hover td { background: rgba(37,99,235,0.03); }

  .risk-label-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
  }

  .risk-color-dot {
    width: 8px; height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
  }

  .thead-risk-safe { color: var(--risk-safe) !important; }
  .thead-risk-normal { color: var(--risk-normal) !important; }
  .thead-risk-warn { color: var(--risk-warn) !important; }
  .thead-risk-high { color: var(--risk-high) !important; }
  .thead-risk-critical { color: var(--risk-critical) !important; }

  /* Assessment panel */
  .assessment-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
  }

  .assessment-header {
    padding: 14px 20px;
    /*background: linear-gradient(135deg, rgba(0,212,170,0.08), rgba(59,130,246,0.05));*/
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .assessment-icon {
    width: 30px; height: 30px;
    /*background: linear-gradient(135deg, var(--accent-rose), #ff6b6b);*/
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
  }

  .assessment-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
  }

  .assessment-subtitle {
    font-size: 11px;
    color: var(--text-muted);
  }

  .assessment-body {
    padding: 14px 20px;
  }

  .assessment-criteria {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-teal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
  }

  .assessment-list {
    list-style: none;
    display: grid;
    gap: 6px;
  }

  .assessment-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.5;
  }

  .assessment-list li::before {
    content: '▸';
    color: var(--accent-teal);
    flex-shrink: 0;
    margin-top: 1px;
  }

  /* BOTTOM CHARTS */
  .bottom-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
  }

  .bottom-card {
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    animation-delay: 0.2s;
  }

  /* ── PAIRED DISEASE ROW LAYOUT ── */
  .disease-row {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 16px;
    margin-bottom: 20px;
    align-items: start;
  }

  .disease-chart-card {
    animation-delay: 0.1s;
  }

  .disease-card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .disease-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
  }

	.disease-icon img {width: 30px; height: auto;}

  .disease-assess-card {
    box-shadow: 0 1px 4px rgba(15,23,42,0.06);
    animation-delay: 0.15s;
  }

  .assess-scale {
    margin-top: 14px;
  }

  .assess-scale-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    gap: 2px;
    margin-bottom: 4px;
  }

  .assess-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
  }

  /* Scrollbar */
  ::-webkit-scrollbar { width: 4px; height: 4px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

  /* ════════════════════════════════════════
     RESPONSIVE BREAKPOINTS
     ════════════════════════════════════════ */

  /* ── Tablet landscape / small desktop (≤1100px) ── */
  @media (max-width: 1100px) {
    .navbar { padding: 0 18px; gap: 10px; }
    .navbar-filters { gap: 6px; }
    .filter-select { padding: 6px 24px 6px 10px; font-size: 11px; }
    .btn-search { padding: 7px 14px; font-size: 12px; }
    .container { padding: 20px 18px; }
    .stats-strip { grid-template-columns: repeat(4, 1fr); }
    .age-dist-card { grid-column: span 2; }
    .disease-row { grid-template-columns: 1fr 300px; }
    #leaflet-map { height: 480px; }
  }

  /* ── Tablet portrait (≤860px) ── */
  @media (max-width: 860px) {
    .navbar {
      height: auto;
      flex-wrap: wrap;
      padding: 12px 16px;
      gap: 10px;
    }
    .navbar-brand { flex: 1; min-width: 0; }
    .navbar-divider { display: none; }
    .date-range { order: 3; width: 100%; justify-content: flex-start; }
    .navbar-filters {
      order: 4;
      width: 100%;
      margin-left: 0;
      flex-wrap: wrap;
      gap: 6px;
    }
    .filter-select { flex: 1; min-width: 130px; }
    .btn-search { width: 100%; justify-content: center; }

    .container { padding: 16px 14px; }
    .stats-strip { grid-template-columns: repeat(3, 1fr); }
    .age-dist-card { grid-column: span 3; }
    #leaflet-map { height: 420px; }
    .disease-row { grid-template-columns: 1fr; }
    .disease-assess-card { order: -1; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .section-label { margin-top: 4px; }
  }

  /* ── Mobile large (≤640px) ── */
  @media (max-width: 640px) {
    .brand-text p { display: none; }
    .brand-text h1 { font-size: 13px; }
    .container { padding: 12px 12px; }
    .stats-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .age-dist-card { grid-column: span 2; }
    .stat-summary-val { font-size: 18px; }
    #leaflet-map { height: 360px; }
    .chart-wrap { height: 150px; }
    .risk-table-wrap { padding: 0 10px 12px; }
    .risk-table { font-size: 10px; }
    .risk-table th, .risk-table td { padding: 5px 6px; }
    .disease-card-header { padding: 12px 14px; gap: 8px; }
    .disease-icon { width: 30px; height: 30px; font-size: 14px; }
    .chart-title { font-size: 12px; }
    .chart-subtitle { font-size: 10px; }
    .assessment-body { padding: 12px 14px; }
    .assessment-list li { font-size: 11px; }
    .map-legend { gap: 4px; bottom: 10px; }
    .legend-item { font-size: 10px; padding: 3px 8px; }
    .page-date { font-size: 11px; }
    .tab { padding: 5px 10px; font-size: 11px; }
    .health-tab { padding: 5px 10px; font-size: 11px; }
  }

  /* ── Mobile small (≤420px) ── */
  @media (max-width: 420px) {
    .navbar { padding: 10px 12px; }
    .brand-icon { width: 32px; height: 32px; font-size: 15px; }
    .brand-text h1 { font-size: 12px; }
    .container { padding: 10px 10px; }
    .stats-strip { grid-template-columns: 1fr 1fr; gap: 8px; }
    .age-dist-card { grid-column: span 2; }
    .stat-summary-card { padding: 10px 12px; }
    .stat-summary-val { font-size: 16px; }
    .main-grid { gap: 12px; }
    .disease-row { gap: 10px; margin-bottom: 14px; }
    .card { border-radius: 12px; }
    .assessment-card { border-radius: 12px; }
    .chart-wrap { height: 130px; }
    #leaflet-map { height: 300px; }
    .dp-dropdown { width: 260px; }
    .dp-trigger { padding: 5px 9px; font-size: 11px; }
    .dp-sep { font-size: 11px; }
  }

  @media (max-width: 540px) {
    .dp-wrapper:last-child .dp-dropdown {
      left: auto;
      right: 0;
    }
  }

  /* Pulse animation for map nodes */
  @keyframes mapPulse {
    0%, 100% { opacity: 0.6; r: 4; }
    50% { opacity: 1; r: 6; }
  }

  /* Grid divider */
  .section-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    margin-top: 8px;
    position: relative;
    /*padding-left: 14px;*/
  }

  .section-label::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    /*background: linear-gradient(180deg, var(--accent-teal), var(--accent-blue));*/
    border-radius: 2px;
  }

  .section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
  }

  /* Tooltip */
  .tooltip-badge {
    background: rgba(0,212,170,0.1);
    border: 1px solid rgba(0,212,170,0.2);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 10px;
    color: var(--accent-teal);
    font-weight: 600;
  }

  /* Chart legend */
  .chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 12px;
  }

  /* ── DATEPICKER ── */
  .dp-wrapper {
    position: relative;
  }

  .dp-trigger {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    color: var(--accent-blue);
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
  }

  .dp-trigger:hover {
    background: #e8f0fe;
    border-color: var(--accent-blue);
    color: var(--accent-blue);
  }

  .dp-trigger.active {
    background: #e8f0fe;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
  }

  .dp-sep {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    padding: 0 2px;
  }

  .dp-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(15,23,42,0.14), 0 2px 8px rgba(15,23,42,0.06);
    z-index: 9999;
    width: 280px;
    overflow: hidden;
    animation: dp-open 0.18s ease;
  }

  .dp-dropdown.open { display: block; }

  @keyframes dp-open {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }

  .dp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #f1f5f9;
  }

  .dp-nav-btn {
    width: 28px; height: 28px;
    border-radius: 7px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
    font-family: inherit;
  }

  .dp-nav-btn:hover {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
  }

  .dp-month-year {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .dp-month-select, .dp-year-select {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    text-align: center;
  }

  .dp-month-select { width: 100px; }
  .dp-year-select  { width: 70px; }

  .dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 8px 12px 4px;
    gap: 2px;
  }

  .dp-wd {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 3px 0;
  }

  .dp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 0 12px 12px;
    gap: 3px;
  }

  .dp-day {
    width: 100%; aspect-ratio: 1;
    border-radius: 8px;
    border: none;
    background: transparent;
    font-size: 12px;
    font-family: inherit;
    color: var(--text-primary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.14s;
    font-weight: 500;
  }

  .dp-day:hover:not(.dp-day-empty):not(.dp-day-selected) {
    background: #e8f0fe;
    color: var(--accent-blue);
  }

  .dp-day-empty { cursor: default; }

  .dp-day-today {
    color: var(--accent-blue);
    font-weight: 700;
    position: relative;
  }

  .dp-day-today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--accent-blue);
  }

  .dp-day-selected {
    background: var(--accent-blue) !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(37,99,235,0.35);
  }

  .dp-day-in-range {
    background: #eff6ff;
    color: var(--accent-blue);
    border-radius: 0;
  }

  .dp-day-range-start { border-radius: 8px 0 0 8px; }
  .dp-day-range-end   { border-radius: 0 8px 8px 0; }

  .dp-footer {
    padding: 10px 14px 12px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .dp-selected-display {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
  }

  .dp-confirm-btn {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
  }

  .dp-confirm-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
  }

  .dp-clear-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 6px 10px;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
  }

  .dp-clear-btn:hover {
    background: #fee2e2;
    color: var(--risk-high);
    border-color: #fca5a5;
  }

  .legend-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    color: var(--text-muted);
  }

  .legend-chip-dot {
    width: 6px; height: 6px;
    border-radius: 2px;
  }
	.date-range-wrapper {
			background: #ffffff;
			padding: 15px 25px;
			border-radius: 8px;
			border: 1px solid #e5e5e5;
	}

	.date-range {
			display: flex;
			align-items: center;
			gap: 10px;
	}

	.date-box {
			position: relative;
			width: 130px;
	}

	.date-box input {
			width: 100%;
			padding: 10px 10px 10px 45px;
			background: #f1f5fb;
			border: 1px solid #d9e1ec;
			border-radius: 10px;
			color: #2563eb;
			font-size: 12px;
			font-weight: 600;
			outline: none;
			cursor: pointer;
	}

	.date-box input::placeholder {
			color: #2563eb;
	}

	.calendar-icon {
			position: absolute;
			left: 15px;
			top: 50%;
			transform: translateY(-50%);
			width: 22px;
			height: 22px;
			stroke: #2563eb;
			pointer-events: none;
	}

	.arrow {
			font-size: 20px;
			color: #7c8798;
			font-weight: 500;
	}
	.group {
		display: flex;
		gap: 14px;
		flex-wrap: wrap;
	}

	/* hide radio */
	.group input {
		display: none;
	}

	/* pill default */
	.item {
		display: flex;
		align-items: center;
		gap: 8px;
		padding: 5px 18px;
		border-radius: 999px;
		background: #f3f4f6;
		border: 1.5px solid #e5e7eb;
		cursor: pointer;
		transition: all 0.2s ease;
	}

	/* subtle shadow */
	.item {
		box-shadow: 0 2px 4px rgba(0,0,0,0.05);
	}

	/* hover */
	.item:hover {
		background: #eef2f7;
	}

	/* dot */
	.dot {
		width: 7px;
		height: 7px;
		border-radius: 50%;
	}

	/* icon */
	.icon {
		width: 14px;
		height: 14px;
		opacity: 0.7;
	}

	/* text */
	.item span {
		font-size: 14px;
		color: #6b7280;
	}

	/* ACTIVE (เหมือนรูป) */
	.group input:checked + label {
		background: rgba(0,184,148,0.08);
		border-color: #10b981;
		box-shadow: 0 0 0 2px rgba(16,185,129,0.15);
	}

	.group input:checked + label span {
		color: #10b981;
		font-weight: 500;
	}

	/* dot colors (soft tone) */
	.green { background: #3b82f6; }   /* ฟ้า */
	.orange { background: #d97706; }
	.purple { background: #7c3aed; }
	.red { background: #e11d48; }
	.teal { background: #059669; }
	.gray { background: #64748b; }
