:root {
    color-scheme: light;
    --ink: #17324d;
    --muted: #617386;
    --paper: #f4f1e9;
    --mint: #dceaf6;
    --teal: #2c6fb7;
    --coral: #c45c43;
    --slate: #62758b;
    --line: rgba(23, 50, 77, .15);
    font-family: Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); }
a { color: inherit; }
.eyebrow { color: var(--coral); font: 700 11px/1.2 Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.intro { max-width: 580px; color: var(--muted); font: 18px/1.6 Arial, sans-serif; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 0; text-decoration: none; font: 700 12px Arial, sans-serif; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.button-primary { color: #fff; background: var(--ink); }
.button-quiet { min-height: 36px; color: var(--ink); border: 1px solid var(--line); background: transparent; }
.empty-actions { display: flex; align-items: flex-end; justify-content: center; gap: 12px; flex-direction: column; }
.empty-actions .button { width: 190px; min-height: 44px; }
.technical-link { gap: 7px; white-space: nowrap; }
.technical-icon { display: inline-block; font: 400 16px/1 Arial, sans-serif; }
.admin-nav { display: flex; align-items: center; gap: 18px; font: 700 12px Arial, sans-serif; }
.admin-nav a { color: var(--muted); text-decoration: none; }
.admin-nav a.active, .admin-nav a:hover { color: var(--coral); }
.text-link { display: inline-block; margin-top: 32px; color: var(--teal); font-weight: 700; text-decoration: none; }

.health-page { background: linear-gradient(135deg, var(--paper), var(--mint)); }
.health-shell { width: min(920px, calc(100% - 32px)); margin: 0 auto; padding: 72px 0; }
.health-shell h1 { max-width: 650px; margin: 16px 0; font: 500 clamp(40px, 8vw, 76px)/.95 Georgia, serif; }
.checks { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 48px; }
.check { padding: 24px; border: 1px solid var(--line); background: rgba(255,255,255,.65); }
.check strong { display: block; margin-bottom: 8px; font: 700 14px Arial, sans-serif; }
.check p { margin: 0; color: var(--muted); font: 15px/1.5 Arial, sans-serif; }
.status-ok { color: #215d96; }
.status-error { color: #ad442f; }

.login-page { display: grid; height: 100vh; height: 100dvh; min-height: 100vh; min-height: 100dvh; grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr); background: var(--ink); }
.login-aside { display: flex; flex-direction: column; justify-content: center; gap: 12vh; padding: 7vh clamp(28px, 6vw, 88px); color: #fff; background: linear-gradient(155deg, #081c2e, #123e5a); }
.login-aside h1 { max-width: 460px; margin: 0; font: 500 clamp(42px, 6vw, 78px)/.95 Georgia, serif; }
.login-aside p { max-width: 390px; margin: 22px 0 0; color: rgba(255,255,255,.72); font: 16px/1.6 Arial, sans-serif; }
.login-aside .eyebrow { color: #cde2d7; }
.login-footer { color: rgba(255,255,255,.55); font: 12px Arial, sans-serif; }
.login-panel { display: grid; place-items: center; padding: 32px; background: var(--paper); }
.login-card { width: min(420px, 100%); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: inherit; font: 700 22px Georgia, serif; text-decoration: none; }
.login-logo { display: block; width: min(280px, 100%); height: auto; }
.brand-mark { display: inline-grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #fff; background: var(--coral); font: 700 23px Georgia, serif; }
.login-card h2 { margin: 48px 0 8px; font: 500 44px/.95 Georgia, serif; }
.login-card > p { margin: 0 0 32px; color: var(--muted); line-height: 1.5; }
.field { display: block; margin-top: 18px; color: var(--ink); font: 700 12px Arial, sans-serif; }
.field input { display: block; width: 100%; margin-top: 8px; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); outline: 0; color: var(--ink); background: transparent; font: 16px Arial, sans-serif; }
.field input:focus { border-color: var(--teal); box-shadow: 0 1px 0 var(--teal); }
.login-submit { width: 100%; margin-top: 32px; }
.alert { margin: 18px 0; padding: 13px 14px; color: #8f3427; background: #f6dcd4; font: 14px/1.4 Arial, sans-serif; }
.login-note { margin-top: 22px; color: var(--muted); font: 12px/1.5 Arial, sans-serif; }

.dashboard-page { background: linear-gradient(135deg, var(--paper), #e4eff7); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: clamp(18px, 3vw, 42px); min-height: 72px; padding: 12px clamp(20px, 5vw, 72px); border-bottom: 1px solid rgba(255,255,255,.14); background: #173b61; box-shadow: 0 4px 18px rgba(23,50,77,.16); }
.topbar .brand { flex: 0 0 auto; }
.header-logo { display: block; width: 136px; height: auto; }
.topbar-nav { display: flex; align-items: center; min-width: 0; margin-left: auto; overflow-x: auto; font: 700 12px Arial, sans-serif; white-space: nowrap; scrollbar-width: none; }
.topbar-nav::-webkit-scrollbar { display: none; }
.topbar-nav a { padding: 5px 14px; color: #b9d8ed; text-decoration: none; }
.topbar-nav a + a { border-left: 1px solid rgba(185,216,237,.28); }
.topbar-nav a.active, .topbar-nav a:hover { color: #fff; }
.topbar-actions { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.user-chip { color: #74d9d6; font: 700 12px Arial, sans-serif; }
.topbar-logout { display: inline-grid; width: 32px; height: 32px; place-items: center; padding-left: 14px; border-left: 1px solid rgba(185,216,237,.28); color: #b9d8ed; font: 700 24px/1 Arial, sans-serif; text-decoration: none; white-space: nowrap; }
.topbar-logout:hover { color: #fff; }
.dashboard-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 64px 0; }
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.dashboard-heading h1 { margin: 12px 0 8px; font: 500 clamp(42px, 6vw, 70px)/.95 Georgia, serif; }
.dashboard-heading p { margin: 0; color: var(--muted); font: 16px/1.5 Arial, sans-serif; }
.connection { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; color: var(--teal); font: 700 12px Arial, sans-serif; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 6px rgba(44,111,183,.13); }
.hospital-status-strip { display: grid; align-items: center; gap: 20px; grid-template-columns: 1.5fr .7fr .7fr auto; margin-top: 28px; padding: 18px 22px; border-left: 4px solid var(--teal); background: rgba(255,255,255,.7); }
.hospital-status-strip > div { display: flex; align-items: center; gap: 9px; }
.hospital-status-strip strong { font: 700 13px Arial, sans-serif; }
.hospital-status-strip small { color: var(--muted); font: 12px Arial, sans-serif; }
.status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 6px rgba(44,111,183,.13); }
.status-dot.status-warning { background: var(--coral); box-shadow: 0 0 0 6px rgba(196,92,67,.13); }
.status-dot.status-empty { background: var(--slate); box-shadow: 0 0 0 6px rgba(83,104,114,.13); }
.hospital-actions { justify-content: end; gap: 8px !important; }
.hospital-actions .button { white-space: nowrap; }
.device-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 24px; }
.device-card { padding: 22px; border-top: 4px solid var(--teal); background: rgba(255,255,255,.72); }
.device-card.device-alarm { border-color: var(--coral); }
.device-card.device-offline { border-color: var(--slate); }
.device-card-top { display: flex; align-items: center; gap: 8px; color: var(--teal); font: 700 10px Arial, sans-serif; letter-spacing: .08em; }
.device-card-top strong { margin-left: auto; color: currentColor; font-size: 12px; letter-spacing: .04em; }
.device-alarm .device-card-top { color: var(--coral); }
.device-offline .device-card-top { color: var(--slate); }
.device-state-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px rgba(44,111,183,.12); }
.device-card h2 { margin: 26px 0 6px; font: 500 30px/1.05 Georgia, serif; }
.device-card-link { text-decoration: none; }
.device-card-link:hover { color: var(--coral); }
.device-mac { margin: 0; color: var(--muted); font: 12px monospace; }
.device-card-data { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 30px; }
.device-card-data > div { padding: 16px 18px; border: 1px solid rgba(24,51,49,.1); background: rgba(255,255,255,.52); }
.device-card-data strong, .device-card-data small { display: block; }
.device-card-data strong { font: 500 34px/.95 Georgia, serif; }
.device-card-data small { margin-top: 5px; color: var(--muted); font: 11px Arial, sans-serif; }
.device-detail-link { display: inline-block; margin-top: 24px; color: var(--teal); font: 700 12px Arial, sans-serif; text-decoration: none; }
.device-detail-link:hover, .monitor-device-link:hover, .monitor-detail-link:hover { color: var(--coral); }
.monitor-device-link { color: inherit; font-weight: inherit; text-decoration: none; }
.monitor-detail-link { color: var(--teal); font: 700 11px Arial, sans-serif; text-decoration: none; }
.device-card-empty { padding: 22px; border: 1px dashed var(--line); color: var(--muted); font: 14px Arial, sans-serif; }
.device-detail-shell { padding-top: 52px; }
.device-detail-stats { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin-top: 32px; }
.gas-detail-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.gas-detail-card { padding: 18px; border: 1px solid var(--line); border-top: 4px solid var(--teal); background: rgba(255,255,255,.7); }
.gas-detail-alarm { border-color: var(--coral); }
.gas-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--teal); font: 700 10px Arial, sans-serif; }
.gas-detail-alarm .gas-detail-head { color: var(--coral); }
.gas-detail-card > strong { display: block; margin-top: 24px; font: 500 32px/1 Georgia, serif; }
.gas-detail-card > strong small { font: 14px Arial, sans-serif; }
.gas-detail-card p { margin: 10px 0 4px; color: var(--muted); font: 12px Arial, sans-serif; }
.gas-detail-card time { color: var(--muted); font: 11px Arial, sans-serif; }
.pressure-chart { display: flex; align-items: end; gap: 8px; height: 220px; padding: 24px 8px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.pressure-point { display: flex; align-items: center; justify-content: end; gap: 6px; flex: 0 0 42px; height: 100%; flex-direction: column; }
.pressure-bar { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 8px; color: #fff; background: var(--teal); font: 700 9px Arial, sans-serif; }
.pressure-alarm { background: var(--coral); }
.pressure-bar span { transform: translateY(-16px); color: var(--ink); white-space: nowrap; }
.pressure-point small { padding-bottom: 8px; color: var(--muted); font: 10px Arial, sans-serif; }
.chart-axis { display: flex; justify-content: space-between; padding-top: 8px; color: var(--muted); font: 11px Arial, sans-serif; }
.device-chart-filters { display: flex; align-items: end; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.device-chart-filters label { color: var(--muted); font: 700 10px Arial, sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.device-chart-filters input, .device-chart-filters select { display: block; margin-top: 6px; padding: 8px; border: 1px solid var(--line); color: var(--ink); background: transparent; font: 13px Arial, sans-serif; }
.stats-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin-top: 48px; }
.admin-stats-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 28px; }
.admin-stats-grid .stat-card { min-height: 145px; }
.stat-card { min-height: 170px; padding: 22px; border-top: 4px solid var(--teal); background: rgba(255,255,255,.65); }
.stat-card span { display: block; color: var(--muted); font: 700 12px Arial, sans-serif; }
.stat-card strong { display: block; margin: 22px 0 8px; font: 500 52px/.9 Georgia, serif; }
.stat-card small { color: var(--muted); font: 12px Arial, sans-serif; }
.stat-coral { border-color: var(--coral); }
.stat-slate { border-color: var(--slate); }
.empty-state { display: grid; align-items: center; gap: 30px; grid-template-columns: 130px 1fr auto; margin-top: 32px; padding: 36px; border: 1px solid var(--line); background: rgba(255,255,255,.52); }
.empty-state h2 { margin: 10px 0; font: 500 30px/1 Georgia, serif; }
.empty-state p { max-width: 560px; margin: 0; color: var(--muted); font: 15px/1.6 Arial, sans-serif; }
.empty-orbit { display: grid; width: 104px; height: 104px; place-items: center; border: 1px solid rgba(44,111,183,.3); border-radius: 50%; }
.empty-orbit span { width: 54px; height: 54px; border: 10px solid rgba(44,111,183,.2); border-top-color: var(--teal); border-radius: 50%; }
.monitor-panel { margin-top: 32px; padding: 28px; border: 1px solid var(--line); background: rgba(255,255,255,.62); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-heading h2 { margin: 8px 0 0; font: 500 30px/1 Georgia, serif; }
.section-meta { color: var(--muted); font: 12px Arial, sans-serif; }
.refresh-time { color: var(--coral); font-weight: 700; }
.monitor-note { margin: 7px 0 0; color: var(--muted); font: 12px/1.4 Arial, sans-serif; }
.monitor-filters { display: flex; align-items: end; gap: 12px; margin: 22px 0 12px; padding-top: 16px; border-top: 1px solid rgba(24,51,49,.1); }
.monitor-filters label { color: var(--muted); font: 700 10px Arial, sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.monitor-filters select { display: block; margin-top: 6px; padding: 8px 24px 8px 9px; border: 1px solid var(--line); color: var(--ink); background: transparent; font: 13px Arial, sans-serif; }
.filter-count { margin-bottom: 9px; color: var(--muted); font: 12px Arial, sans-serif; }
.table-scroll { overflow-x: auto; }
.monitor-table { width: 100%; min-width: 760px; border-collapse: collapse; text-align: left; font: 13px Arial, sans-serif; }
.monitor-table th { padding: 0 14px 12px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.monitor-table td { padding: 15px 14px 15px 0; border-bottom: 1px solid rgba(24,51,49,.1); white-space: nowrap; }
.monitor-table tr:last-child td { border-bottom: 0; }
.reading-alarm td:first-child { color: var(--coral); font-weight: 700; }
.gas-code { display: inline-block; min-width: 40px; padding: 5px 7px; border-radius: 2px; color: #fff; background: #000; font: 700 11px Arial, sans-serif; text-align: center; }
.gas-oxy { background: #00b050; }
.gas-air { color: #000; background: #ffff00; }
.gas-vac { color: #000; background: #fff; border: 1px solid var(--line); }
.gas-n2o { background: #4472c4; }
.gas-nit { background: #000; }
.gas-co2 { color: #000; background: #a6a6a6; }
.gas-int { background: #ff0000; }
.gas-wag { background: #7030a0; }
.state-badge { display: inline-block; padding: 5px 8px; font: 700 10px Arial, sans-serif; letter-spacing: .04em; }
.state-normal { color: #215d96; background: #dcebf8; }
.state-alarm { color: #913523; background: #f6d8d0; }
.table-empty { margin: 0; color: var(--muted); font: 15px/1.5 Arial, sans-serif; }
.admin-shell { padding-top: 52px; }
.admin-form-panel { margin-top: 32px; padding: 28px; border: 1px solid var(--line); background: rgba(255,255,255,.62); }
.hospital-form { display: grid; gap: 8px 18px; grid-template-columns: repeat(3, 1fr); }
.hospital-form .field { margin-top: 12px; }
.hospital-form select { display: block; width: 100%; margin-top: 8px; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; font: 16px Arial, sans-serif; }
.form-actions { display: flex; align-items: end; margin-top: 12px; }
.success-message { margin-top: 26px; padding: 13px 14px; color: #215d96; background: #dcebf8; font: 14px/1.4 Arial, sans-serif; }
.success-message code { display: inline-block; margin-top: 7px; padding: 6px 8px; color: var(--ink); background: rgba(255,255,255,.7); font: 12px monospace; overflow-wrap: anywhere; }
.search-form { display: flex; gap: 10px; }
.search-form input { width: min(280px, 42vw); padding: 10px 12px; border: 1px solid var(--line); color: var(--ink); background: transparent; font: 13px Arial, sans-serif; }
.table-action { padding: 6px 8px; border: 1px solid rgba(196,92,67,.3); color: var(--coral); background: transparent; font: 700 10px Arial, sans-serif; cursor: pointer; }
.device-action-form { display: inline-block; margin: 2px 4px 2px 0; }
.device-edit-form input { width: 140px; margin: 2px 4px 2px 0; padding: 6px; border: 1px solid var(--line); color: var(--ink); background: transparent; font: 12px Arial, sans-serif; }
.device-edit-form input[type="number"] { width: 90px; }
.hospital-table { min-width: 1040px; }
.incident-filters { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; }
.incident-filters label { color: var(--muted); font: 700 11px Arial, sans-serif; }
.incident-filters input, .incident-filters select { display: block; margin-top: 7px; padding: 10px; border: 1px solid var(--line); color: var(--ink); background: transparent; font: 13px Arial, sans-serif; }
.report-page { background: #fff; }
.report-shell { width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: 48px 0; color: var(--ink); }
.report-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 28px; border-bottom: 2px solid var(--ink); }
.report-header h1 { margin: 12px 0 6px; font: 500 clamp(36px, 5vw, 62px)/.95 Georgia, serif; }
.report-header p { margin: 0; color: var(--muted); font: 15px Arial, sans-serif; }
.report-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.report-meta { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); padding: 20px 0; border-bottom: 1px solid var(--line); }
.report-meta strong, .report-meta span { display: block; }
.report-meta strong { margin-bottom: 5px; color: var(--coral); font: 700 10px Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.report-meta span { font: 13px Arial, sans-serif; }
.report-table { margin-top: 28px; min-width: 980px; }
.report-row-alarm td { color: var(--ink); }
.report-status-cell { font-weight: 700; }
.report-status-cell-alarm { color: #b42318; }
.report-status-cell-normal { color: #1d5f8f; }
.report-footer { margin-top: 28px; color: var(--muted); font: 11px Arial, sans-serif; }
.map-shell { padding-top: 52px; }
.map-legend { display: flex; gap: 14px; color: var(--muted); font: 12px Arial, sans-serif; }
.map-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.legend-normal { background: var(--teal); }
.legend-alarm { background: var(--coral); }
.legend-offline { background: var(--slate); }
.map-panel { position: relative; min-height: 520px; margin-top: 32px; overflow: hidden; border: 1px solid var(--line); background: #dfe9e4; }
#device-map { width: 100%; height: 520px; }
.map-empty { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--muted); font: 15px Arial, sans-serif; }
.map-note { color: var(--muted); font: 12px/1.5 Arial, sans-serif; }

.button,
.field input,
.hospital-form select,
.device-chart-filters input,
.device-chart-filters select,
.monitor-filters select,
.incident-filters input,
.incident-filters select,
.search-form input,
.table-action,
.device-edit-form input {
    border-radius: 7px;
}
.button-primary,
.button-quiet,
.table-action {
    border: 1px solid rgba(23, 50, 77, .12);
}
.field input,
.hospital-form select,
.device-chart-filters input,
.device-chart-filters select,
.monitor-filters select,
.incident-filters input,
.incident-filters select,
.search-form input,
.device-edit-form input {
    padding: 11px 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .48);
}
.check,
.hospital-status-strip,
.device-card,
.device-card-empty,
.gas-detail-card,
.stat-card,
.empty-state,
.monitor-panel,
.admin-form-panel,
.map-panel {
    border: 1px solid rgba(24, 51, 49, .1);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(23, 50, 77, .05);
}
.device-card,
.gas-detail-card,
.stat-card {
    border-top-width: 4px;
}
.stat-card.stat-teal,
.device-card.device-normal,
.gas-detail-card:not(.gas-detail-alarm) {
    border-top-color: var(--teal);
}
.stat-card.stat-coral,
.device-card.device-alarm,
.gas-detail-card.gas-detail-alarm {
    border-top-color: var(--coral);
}
.stat-card.stat-slate,
.device-card.device-offline {
    border-top-color: var(--slate);
}
.hospital-status-strip {
    border-left-width: 4px;
}
.alert,
.success-message,
.success-message code,
.state-badge,
.gas-code {
    border-radius: 6px;
}
.topbar {
    box-shadow: 0 4px 18px rgba(23,50,77,.16);
}

@media print {
    .no-print { display: none !important; }
    .report-shell { width: 100%; padding: 0; }
    .report-header { padding-bottom: 16px; }
    .report-header h1 { font-size: 32px; }
    .report-meta { padding: 12px 0; }
    .report-table { margin-top: 14px; min-width: 0; font-size: 9px; }
    .report-table th, .report-table td { padding: 7px 6px 7px 0; }
}

@media (max-width: 760px) {
    .login-page { display: block; height: auto; min-height: 100vh; min-height: 100dvh; }
    .login-aside { min-height: 38dvh; gap: 7vh; padding: 6vh 8vw; }
    .login-aside h1 { margin-top: 52px; font-size: 48px; }
    .login-panel { min-height: 62dvh; padding: 7vh 8vw; }
    .dashboard-heading { align-items: start; flex-direction: column; }
    .stats-grid { grid-template-columns: 1fr; }
    .empty-state { grid-template-columns: 1fr; }
    .empty-orbit { width: 76px; height: 76px; }
    .topbar { align-items: stretch; gap: 10px; flex-wrap: wrap; }
    .topbar-nav { order: 3; width: 100%; margin-left: 0; }
    .topbar-actions { margin-left: auto; }
    .hospital-status-strip { align-items: start; grid-template-columns: 1fr 1fr; }
    .hospital-actions { justify-content: start; grid-column: 1 / -1; flex-wrap: wrap; }
    .device-cards { grid-template-columns: 1fr; }
    .device-detail-stats { grid-template-columns: 1fr; }
    .monitor-panel { padding: 20px; }
    .section-heading { align-items: start; flex-direction: column; }
    .monitor-filters { align-items: start; flex-wrap: wrap; }
    .admin-nav { gap: 12px; }
    .hospital-form { grid-template-columns: 1fr; }
    .search-form { width: 100%; }
    .search-form input { width: 100%; }
    .report-header { align-items: start; flex-direction: column; }
    .report-meta { grid-template-columns: 1fr; }
    .map-legend { align-items: start; flex-direction: column; gap: 8px; }
    #device-map, .map-panel { height: 420px; min-height: 420px; }
}
