:root {
  color-scheme: light;
  --page: #dff2ff;
  --surface: rgb(255 255 255 / 56%);
  --surface-soft: rgb(255 255 255 / 36%);
  --glass-border: rgb(255 255 255 / 78%);
  --glass-shadow: 0 12px 34px rgb(61 115 148 / 10%), inset 0 1px 0 rgb(255 255 255 / 82%);
  --ink: #1d2927;
  --muted: #788480;
  --line: #e7ece9;
  --accent: #8A9A5B;
  --accent-deep: #56663b;
  --sage-soft: #f1f4e9;
  --sage-pale: #f8faf2;
  --teal: #168b7a;
  --sidebar: #172522;
  --green: #2e9b70;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); background: radial-gradient(ellipse at 82% 4%, rgb(255 255 255 / 76%), transparent 34%), radial-gradient(ellipse at 28% 42%, #c5e8fb 0, transparent 46%), linear-gradient(145deg, #e8f7ff 0%, #d7efff 48%, #c9e8fb 100%); background-attachment: fixed; font-size: 14px; }
button, input, select { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgb(138 154 91 / 38%); outline-offset: 3px; }

.sidebar { position: fixed; z-index: 5; inset: 0 auto 0 0; display: flex; width: 248px; flex-direction: column; padding: 28px 18px 22px; color: #c4cfcb; background-color: var(--sidebar); background-image: linear-gradient(rgb(255 255 255 / 2%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 2%) 1px, transparent 1px); background-size: 36px 36px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 40px; color: #f7faf8; text-decoration: none; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgb(255 255 255 / 16%); border-radius: 12px; color: #fff; background: linear-gradient(145deg, #aabd78, #788b4d); box-shadow: 0 6px 18px rgb(138 154 91 / 25%); font-size: 21px; font-weight: 800; }
.brand-name { font-size: 17px; font-weight: 760; letter-spacing: -.5px; }
.brand-name > span { color: #b7c98a; }
.brand-name small { display: block; margin-top: 4px; color: #84938e; font-size: 9px; font-weight: 650; letter-spacing: 1.35px; }
.nav-label, .eyebrow { margin: 0; color: #87938f; font-size: 10px; font-weight: 750; letter-spacing: 1.35px; }
.nav-label { padding: 0 11px 12px; color: #778681; }
.navigation { display: grid; gap: 6px; }
.nav-link { position: relative; display: flex; min-height: 44px; align-items: center; gap: 12px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px; color: #aab8b2; font-size: 13px; font-weight: 550; text-decoration: none; transition: background .18s, color .18s, border-color .18s; }
.nav-link > span { display: grid; width: 20px; place-items: center; color: #899a93; font-size: 17px; }
.nav-link:hover, .nav-link.active { border-color: rgb(255 255 255 / 6%); color: #f7faf8; background: rgb(255 255 255 / 8%); }
.nav-link.active::before { position: absolute; inset: 9px auto 9px -18px; width: 3px; border-radius: 0 4px 4px 0; background: #aabd78; content: ""; }
.nav-link.active > span { color: #b7c98a; }
.sidebar-bottom { margin-top: auto; padding: 17px 9px 0; border-top: 1px solid rgb(255 255 255 / 10%); }
.demo-note, .live-indicator { display: inline-flex; align-items: center; gap: 8px; color: #b7c3be; font-size: 11px; }
.sidebar-bottom p { margin: 14px 0 0; color: #e0e7e3; font-size: 12px; font-weight: 600; line-height: 1.8; }
.sidebar-bottom p span { color: #82928b; font-size: 10px; font-weight: 450; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #42bd8a; box-shadow: 0 0 0 3px rgb(66 189 138 / 13%); }

.main-content { min-height: 100vh; margin-left: 248px; }
.topbar { position: sticky; z-index: 3; top: 0; display: flex; height: 66px; align-items: center; justify-content: space-between; padding: 0 38px; border-bottom: 1px solid var(--glass-border); background: rgb(255 255 255 / 48%); box-shadow: 0 4px 20px rgb(65 112 142 / 5%); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); }
.breadcrumb { color: #87918d; font-size: 12px; }
.breadcrumb span { padding: 0 9px; color: #c1cbc6; }
.breadcrumb strong { color: #33403b; font-weight: 650; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.live-indicator { gap: 8px; padding: 7px 10px; border: 1px solid var(--glass-border); border-radius: 999px; color: #53645d; background: rgb(255 255 255 / 46%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 68%); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 10px; font-weight: 750; letter-spacing: .55px; }
.live-indicator .status-dot { width: 6px; height: 6px; }
.live-indicator[data-state="loading"] .status-dot { background: #d69a45; box-shadow: 0 0 0 3px rgb(214 154 69 / 14%); }
.live-indicator[data-state="offline"] .status-dot { background: #d7635a; box-shadow: 0 0 0 3px rgb(215 99 90 / 14%); }
.refresh-button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border: 1px solid var(--glass-border); border-radius: 7px; color: #44524c; background: rgb(255 255 255 / 54%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 85%); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 11px; font-weight: 650; cursor: pointer; transition: border-color .18s, color .18s, background .18s; }
.refresh-button:hover { border-color: #cbd5af; color: var(--accent-deep); background: var(--sage-pale); }
.refresh-button:disabled { cursor: wait; opacity: .7; }
.refresh-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.refresh-button.is-loading svg { animation: refresh-spin .8s linear infinite; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
.menu-button { display: none; }
.page-content { width: min(1320px, 100%); margin: 0 auto; padding: 36px 38px 23px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-heading .eyebrow { display: flex; align-items: center; gap: 10px; color: var(--accent-deep); }
.eyebrow-line { display: inline-block; width: 28px; height: 1px; background: var(--accent); }
.page-heading h1 { margin: 9px 0 7px; font-size: clamp(26px, 3vw, 35px); font-weight: 720; letter-spacing: -1.25px; line-height: 1.12; }
.page-heading h1 span { color: var(--accent-deep); }
.subtitle, .panel-description { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.heading-date { display: flex; align-items: center; gap: 11px; padding: 10px 13px; border: 1px solid var(--glass-border); border-radius: 9px; color: #52635c; background: rgb(255 255 255 / 46%); box-shadow: var(--glass-shadow); backdrop-filter: blur(16px) saturate(145%); -webkit-backdrop-filter: blur(16px) saturate(145%); }
.date-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; color: var(--accent-deep); background: var(--sage-soft); font-size: 19px; }
.heading-date small { display: block; margin-bottom: 3px; color: #96a09b; font-size: 8px; font-weight: 750; letter-spacing: 1px; }
.heading-date strong { display: block; color: #394641; font-size: 11px; font-weight: 650; white-space: nowrap; }

.weather-panel { margin-bottom: 17px; padding: 18px 21px 13px; }
.weather-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.weather-heading h2 { margin: 6px 0 4px; color: #26332e; font-size: 17px; font-weight: 680; letter-spacing: -.3px; }
.weather-status { color: #89958e; font-size: 10px; }
.weather-content { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.5fr); gap: 22px; align-items: stretch; margin-top: 15px; }
.weather-current { display: flex; min-width: 0; align-items: center; gap: 13px; padding: 14px 16px; border: 1px solid rgb(255 255 255 / 82%); border-radius: 11px; background: linear-gradient(135deg, rgb(255 255 255 / 62%), rgb(216 239 248 / 43%)); }
.weather-icon { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 13px; color: #6684a0; background: rgb(255 255 255 / 60%); font-size: 27px; }
.weather-current > div { min-width: 0; }
.weather-temperature { display: block; color: #344c5b; font-size: 32px; font-weight: 720; letter-spacing: -1.2px; line-height: 1; }
.weather-condition { display: block; margin-top: 6px; color: #72828a; font-size: 10px; }
.weather-feels { margin-left: auto; color: #8a9690; font-size: 9px; white-space: nowrap; }
.weather-feels strong { display: block; margin-top: 4px; color: #52635c; font-size: 11px; font-weight: 650; }
.weather-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; }
.weather-detail { min-width: 0; padding: 8px 12px; border-left: 1px solid rgb(95 126 116 / 12%); }
.weather-detail span { display: block; color: #929e97; font-size: 9px; }
.weather-detail strong { display: block; margin-top: 7px; color: #46564f; font-size: 12px; font-weight: 680; white-space: nowrap; }
.weather-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #edf0ed; color: #99a39e; font-size: 9px; }
.weather-footer a { color: #718078; text-decoration: none; }
.weather-footer a:hover { color: var(--accent-deep); text-decoration: underline; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.stat-card, .panel { min-width: 0; border: 1px solid var(--glass-border); border-radius: 14px; background: var(--surface); box-shadow: var(--glass-shadow); backdrop-filter: blur(18px) saturate(155%); -webkit-backdrop-filter: blur(18px) saturate(155%); }
.stat-card { position: relative; min-height: 145px; padding: 16px 17px 15px; overflow: hidden; }
.stat-card::after { position: absolute; right: -24px; bottom: -34px; width: 95px; height: 95px; border: 1px solid rgb(25 48 38 / 4%); border-radius: 50%; box-shadow: 0 0 0 10px rgb(25 48 38 / 2%), 0 0 0 21px rgb(25 48 38 / 1%); content: ""; pointer-events: none; }
.temperature-card { border-color: rgb(255 255 255 / 86%); background: linear-gradient(135deg, rgb(255 255 255 / 70%), rgb(228 238 208 / 38%)); }
.humidity-card { background: linear-gradient(135deg, rgb(255 255 255 / 68%), rgb(212 241 235 / 38%)); }
.pressure-card { background: linear-gradient(135deg, rgb(255 255 255 / 68%), rgb(219 231 246 / 42%)); }
.stat-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.stat-label { display: inline-flex; align-items: center; gap: 8px; color: #697771; font-size: 9px; font-weight: 750; letter-spacing: .8px; }
.stat-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; font-size: 17px; font-weight: 650; }
.icon-temperature { color: var(--accent-deep); background: #edf2df; }
.icon-humidity { color: #208b7c; background: #e6f5f0; font-size: 13px; }
.icon-pressure { color: #577eaa; background: #e8f0fa; font-size: 15px; }
.icon-updated { color: var(--accent-deep); background: var(--sage-soft); font-size: 16px; }
.metric-tag { color: #9aa49f; font-size: 8px; font-weight: 750; letter-spacing: .7px; }
.temperature-card .metric-tag { color: var(--accent-deep); }
.humidity-card .metric-tag { color: #418d7e; }
.pressure-card .metric-tag { color: #577eaa; }
.stat-card > strong { position: relative; z-index: 1; display: block; font-size: clamp(27px, 2.5vw, 34px); font-weight: 720; letter-spacing: -1.2px; line-height: 1; }
.temperature-card > strong { color: var(--accent-deep); }
.humidity-card > strong { color: #187f70; }
.pressure-card > strong { color: #426d9c; }
.stat-card > strong small { color: #87928c; font-size: 14px; font-weight: 550; letter-spacing: -.2px; }
.stat-card .time-value { font-size: clamp(22px, 2vw, 28px); letter-spacing: -.5px; }
.stat-caption { position: relative; z-index: 1; display: block; margin-top: 11px; color: #8a9690; font-size: 10px; line-height: 1.5; }
.selected-device-label { color: #697770; font-weight: 600; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(265px, .8fr); gap: 15px; align-items: stretch; }
.panel { padding: 20px 21px 15px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.panel-heading h2 { margin: 6px 0 5px; color: #26332e; font-size: 18px; font-weight: 680; letter-spacing: -.35px; }
.panel-description { max-width: 460px; font-size: 11px; }
.select-wrap select { max-width: 170px; min-height: 36px; padding: 0 30px 0 11px; border: 1px solid var(--glass-border); border-radius: 7px; outline-color: var(--accent); color: #46534d; background: rgb(255 255 255 / 56%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 78%); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 11px; font-weight: 600; }
.chart-legend { display: flex; align-items: center; gap: 8px; margin: 21px 0 4px; color: #697771; font-size: 9px; font-weight: 750; letter-spacing: .65px; }
.chart-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.legend-unit { color: #a1aaa5; font-weight: 550; }
.export-button { display: inline-flex; min-height: 31px; align-items: center; gap: 6px; margin: -5px 0 0 auto; padding: 0 9px; border: 1px solid var(--glass-border); border-radius: 6px; color: #58655f; background: rgb(255 255 255 / 48%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 76%); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 10px; font-weight: 600; cursor: pointer; transition: background .18s, border-color .18s, color .18s; }
.export-button:hover:not(:disabled) { border-color: #cbd5af; color: var(--accent-deep); background: var(--sage-pale); }
.export-button:disabled { color: #aeb7b2; background: #fafbfa; cursor: not-allowed; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-dot.red { background: var(--accent); box-shadow: 0 0 0 3px #eef2e4; }
.chart-wrap { position: relative; height: 285px; }
.chart-wrap canvas { display: block; width: 100%; height: 100%; }
.chart-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid #edf0ed; color: #99a39e; font-size: 9px; }
.chart-live { display: inline-flex; align-items: center; gap: 8px; color: #5d776b; }
.chart-live .status-dot { width: 6px; height: 6px; }
#dataStatusDot[data-state="empty"] { background: #d69a45; box-shadow: 0 0 0 3px rgb(214 154 69 / 14%); }
#dataStatusDot[data-state="offline"] { background: #d7635a; box-shadow: 0 0 0 3px rgb(215 99 90 / 12%); }

.device-heading { align-items: center; margin-bottom: 16px; }
.device-heading h2 { margin-bottom: 0; }
.device-total { padding: 5px 8px; border: 1px solid #e8eee9; border-radius: 6px; color: #63736a; background: #f7faf7; font-size: 9px; font-weight: 650; white-space: nowrap; }
.search-box { display: flex; height: 37px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--glass-border); border-radius: 7px; color: #71817a; background: rgb(255 255 255 / 42%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 76%); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: border-color .18s, box-shadow .18s; }
.search-box:focus-within { border-color: #b7c58e; box-shadow: 0 0 0 3px rgb(138 154 91 / 12%); }
.search-box > span:first-child { font-size: 18px; line-height: 1; }
.search-box input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.search-box input::placeholder { color: #a4ada8; }
.device-list { display: grid; max-height: 380px; gap: 4px; margin: 9px -5px 0; padding: 0 5px; overflow-y: auto; list-style: none; }
.device-item { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 8px; border: 1px solid transparent; border-radius: 8px; color: inherit; background: transparent; text-align: left; cursor: pointer; transition: background .16s, border-color .16s; }
.device-item:hover { background: #f7f9f7; }
.device-item.selected { border-color: rgb(255 255 255 / 88%); background: rgb(232 240 214 / 46%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 78%); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.device-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid rgb(255 255 255 / 82%); border-radius: 9px; color: #5d7d70; background: rgb(255 255 255 / 38%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 80%); font-size: 16px; }
.device-item.selected .device-icon { border-color: rgb(255 255 255 / 92%); color: var(--accent-deep); background: rgb(255 255 255 / 62%); }
.device-info { min-width: 0; flex: 1; }
.device-name { display: block; overflow: hidden; color: #3a4741; font-size: 11px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.device-meta { display: block; margin-top: 4px; color: #97a19b; font-size: 9px; }
.device-status { display: inline-flex; align-items: center; gap: 5px; color: #89958e; font-size: 8px; font-weight: 750; letter-spacing: .4px; }
.device-status .status-dot { width: 6px; height: 6px; box-shadow: none; }
.device-status.selected-status { color: var(--accent-deep); }
.device-status.selected-status .status-dot { background: var(--accent); }
.device-list-footer { display: flex; align-items: center; gap: 8px; margin-top: 9px; padding: 12px 2px 0; border-top: 1px solid #edf0ed; color: #929e97; font-size: 9px; }
.device-list-footer .status-dot { width: 6px; height: 6px; background: #8aa99b; box-shadow: none; }
.empty-state { padding: 25px 8px; color: #87938d; font-size: 11px; line-height: 1.6; text-align: center; }
.page-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 19px; padding: 14px 2px 0; border-top: 1px solid #e5eae6; color: #99a39e; font-size: 9px; }
.page-footer span:first-child { color: #617069; font-weight: 650; }
.footer-divider { padding: 0 5px; color: #c2cbc5; }
.sidebar-backdrop, .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (min-width: 1500px) { .page-content { padding-top: 43px; } .chart-wrap { height: 330px; } }
@media (max-width: 1120px) {
  .sidebar { width: 220px; }
  .main-content { margin-left: 220px; }
  .topbar { padding-right: 25px; padding-left: 25px; }
  .page-content { padding-right: 25px; padding-left: 25px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: minmax(0, 1.4fr) minmax(245px, .85fr); }
}
@media (max-width: 760px) {
  .sidebar { z-index: 8; width: 260px; transform: translateX(-100%); transition: transform .22s ease; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop { position: fixed; z-index: 7; inset: 0; width: auto; height: auto; background: rgb(14 26 22 / 42%); clip: auto; }
  .main-content { margin-left: 0; }
  .topbar { height: 58px; justify-content: flex-start; gap: 12px; padding: 0 16px; }
  .menu-button { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid var(--glass-border); border-radius: 7px; color: #52615a; background: rgb(255 255 255 / 58%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 82%); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 17px; cursor: pointer; }
  .topbar-right { margin-left: auto; gap: 8px; }
  .live-indicator { padding: 7px 8px; font-size: 9px; }
  .refresh-button { width: 35px; min-width: 35px; padding: 0; }
  .refresh-button span { display: none; }
  .page-content { padding: 26px 17px 17px; }
  .weather-content { grid-template-columns: 1fr; gap: 10px; }
  .weather-details { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .weather-detail:first-child { border-left: 0; }
  .content-grid { grid-template-columns: 1fr; }
  .devices-panel { min-height: 0; }
  .device-list { max-height: 300px; }
  .chart-wrap { height: 250px; }
}
@media (max-width: 480px) {
  .breadcrumb { font-size: 11px; }
  .topbar-right { gap: 6px; }
  .live-indicator { gap: 6px; letter-spacing: .25px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 19px; }
  .page-heading h1 { font-size: 27px; }
  .heading-date { padding: 7px 10px; }
  .heading-date strong { white-space: normal; }
  .stats-grid { gap: 9px; }
  .weather-panel { padding: 15px 13px 12px; }
  .weather-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .weather-content { margin-top: 11px; }
  .weather-current { gap: 10px; padding: 12px 10px; }
  .weather-icon { width: 40px; height: 40px; font-size: 23px; }
  .weather-temperature { font-size: 28px; }
  .weather-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weather-detail { padding: 9px 10px; }
  .weather-detail:nth-child(odd) { border-left: 0; }
  .weather-detail:nth-child(n + 3) { border-top: 1px solid rgb(95 126 116 / 12%); }
  .weather-footer { font-size: 8px; }
  .stat-card { min-height: 132px; padding: 12px 11px; }
  .stat-card-top { align-items: flex-start; flex-direction: column; gap: 7px; margin-bottom: 13px; }
  .stat-label { gap: 6px; font-size: 8px; }
  .stat-icon { width: 25px; height: 25px; }
  .metric-tag { display: none; }
  .stat-card > strong { font-size: 27px; }
  .stat-card .time-value { font-size: 20px; }
  .stat-card > strong small { font-size: 12px; }
  .stat-caption { margin-top: 9px; font-size: 9px; }
  .panel { padding: 16px 13px 13px; }
  .panel-heading { gap: 8px; }
  .panel-heading h2 { font-size: 16px; }
  .panel-description { max-width: 240px; font-size: 10px; }
  .select-wrap select { max-width: 125px; min-height: 34px; padding-right: 23px; font-size: 10px; }
  .chart-wrap { height: 215px; }
  .chart-footer { align-items: flex-start; flex-direction: column; gap: 7px; }
  .page-footer { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Clear, high-contrast operations dashboard */
:root {
  --page: #f3f6f4;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --glass-border: #e2e9e5;
  --glass-shadow: 0 2px 8px rgb(24 48 38 / 4%), 0 14px 34px rgb(24 48 38 / 4%);
  --ink: #172721;
  --muted: #61716a;
  --line: #e1e8e3;
  --accent: #477b5d;
  --accent-deep: #315c43;
  --sage-soft: #eaf2ec;
  --sage-pale: #f4f8f5;
  --teal: #167d72;
}
body {
  background: radial-gradient(ellipse at 90% 0%, #e8f2eb 0, transparent 34%), #f3f6f4;
  background-attachment: fixed;
  font-size: 15px;
}
.page-content { display: flex; flex-direction: column; gap: 18px; }
.page-heading { order: 1; margin-bottom: 0; }
.weather-panel { order: 2; margin-bottom: 0; }
.stats-grid { order: 3; margin-bottom: 0; gap: 16px; }
.content-grid { order: 4; gap: 18px; }
.page-footer { order: 5; margin-top: 0; }
.topbar {
  border-bottom-color: #e2e9e5;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 1px 4px rgb(24 48 38 / 4%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.breadcrumb, .subtitle, .panel-description { color: #596a62; }
.page-heading h1 { color: #172721; font-size: clamp(28px, 3vw, 38px); }
.heading-date, .live-indicator, .refresh-button, .select-wrap select, .search-box, .export-button {
  border-color: #dbe5de;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.live-indicator { color: #3d5548; }
.refresh-button { min-height: 44px; color: #315c43; }
.menu-button { width: 44px; height: 44px; }
.stat-card, .panel {
  border-color: #e1e8e3;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--glass-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.stat-card { min-height: 150px; padding: 18px; }
.temperature-card { background: linear-gradient(145deg, #fff 58%, #f1f6ed); }
.humidity-card { background: linear-gradient(145deg, #fff 58%, #edf7f4); }
.pressure-card { background: linear-gradient(145deg, #fff 58%, #eff4fa); }
.stat-label { color: #52645b; font-size: 10px; }
.metric-tag { color: #687a70; font-size: 9px; }
.stat-caption { color: #61716a; font-size: 11px; }
.panel { padding: 22px; }
.panel-heading h2, .weather-heading h2 { color: #172721; }
.panel-description { font-size: 12px; }
.chart-wrap { height: 300px; }
.chart-footer, .weather-footer, .page-footer { color: #63736b; font-size: 10px; }
.weather-current { border-color: #e4ece7; background: #f5f9f6; }
.weather-detail span { color: #61716a; font-size: 10px; }
.weather-detail strong { color: #30473a; font-size: 13px; }
.weather-status { color: #53665b; font-size: 11px; }
.search-box { height: 44px; }
.search-box input { font-size: 13px; }
.select-wrap select { min-height: 44px; font-size: 12px; }
.export-button { min-height: 40px; font-size: 11px; }
.device-name { color: #24392e; font-size: 13px; }
.device-meta { color: #61716a; font-size: 11px; }
.device-status { font-size: 10px; }
.device-list-footer { color: #61716a; font-size: 10px; }
.empty-state { color: #53665b; font-size: 13px; }
.nav-link { min-height: 46px; }
.nav-link:focus-visible, .device-item:focus-visible, .refresh-button:focus-visible, .menu-button:focus-visible, .export-button:focus-visible {
  outline: 3px solid #5a9670;
  outline-offset: 2px;
}

@media (max-width: 1120px) {
  .content-grid { grid-template-columns: minmax(0, 1.3fr) minmax(245px, .9fr); }
}
@media (max-width: 760px) {
  .page-content { gap: 15px; }
  .stats-grid { gap: 11px; }
  .weather-panel { padding: 18px; }
  .chart-wrap { height: 260px; }
}
@media (max-width: 480px) {
  .page-heading h1 { font-size: 28px; }
  .stat-card { min-height: 145px; padding: 13px 12px; }
  .stat-label { font-size: 9px; }
  .stat-caption { font-size: 10px; }
  .panel { padding: 17px 14px; }
  .chart-wrap { height: 225px; }
  .weather-detail span { font-size: 10px; }
  .weather-footer { font-size: 10px; }
}

/* Visual direction based on contoh-dashboard.png */
:root {
  color-scheme: dark;
  --page: #080d14;
  --surface: #111c29;
  --surface-soft: #0d1621;
  --glass-border: #2a3c50;
  --glass-shadow: 0 10px 28px rgb(0 0 0 / 28%), inset 0 1px 0 rgb(255 255 255 / 3%);
  --ink: #e8f1fb;
  --muted: #a6b8cb;
  --line: #26384b;
  --accent: #76c8ff;
  --accent-deep: #9bd8ff;
  --sage-soft: #162c3c;
  --sage-pale: #172a3a;
  --teal: #53c8b1;
  --sidebar: #09111b;
  --green: #59d19a;
}
body {
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% -18%, rgb(38 91 130 / 22%), transparent 48%),
    linear-gradient(rgb(125 173 213 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(125 173 213 / 3%) 1px, transparent 1px),
    #080d14;
  background-size: auto, 32px 32px, 32px 32px, auto;
}
.sidebar {
  color: #c4d5e6;
  border-right: 1px solid #233448;
  background-color: #09111b;
  background-image: linear-gradient(rgb(119 174 217 / 3%) 1px, transparent 1px), linear-gradient(90deg, rgb(119 174 217 / 3%) 1px, transparent 1px);
}
.brand-mark {
  border-color: #48789d;
  border-radius: 9px;
  background: linear-gradient(145deg, #3677a5, #183c5a);
  box-shadow: 0 0 18px rgb(78 174 236 / 24%);
}
.brand-name > span, .nav-link.active > span { color: #91d5ff; }
.brand-name small, .sidebar-bottom p span { color: #90a7bc; }
.nav-link { color: #aec1d3; border-radius: 5px; }
.nav-link:hover, .nav-link.active {
  border-color: #28445d;
  color: #f0f7ff;
  background: linear-gradient(90deg, rgb(60 131 183 / 22%), rgb(35 75 107 / 10%));
}
.nav-link.active::before { background: #72c8ff; box-shadow: 0 0 12px rgb(114 200 255 / 65%); }
.nav-link > span { color: #8da9c2; }
.sidebar-bottom { border-top-color: #28394c; }
.topbar {
  border-bottom-color: #2a3d52;
  background: rgb(9 17 27 / 94%);
  box-shadow: 0 5px 22px rgb(0 0 0 / 22%);
}
.breadcrumb, .subtitle, .panel-description { color: #a6b8cb; }
.breadcrumb span { color: #657f98; }
.breadcrumb strong, .panel-heading h2, .weather-heading h2 { color: #ecf5ff; }
.page-heading h1 { color: #f0f7ff; }
.page-heading h1 span { color: #91d5ff; }
.page-heading .eyebrow { color: #93cbed; }
.heading-date, .live-indicator, .refresh-button, .select-wrap select, .search-box, .export-button {
  border-color: #2c4158;
  color: #d2e2f1;
  background: #101b28;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 3%);
}
.heading-date { color: #d2e2f1; }
.heading-date small { color: #9db2c7; }
.heading-date strong { color: #e8f2fc; }
.date-icon { color: #8ed3ff; background: #173149; }
.live-indicator { color: #c8d9e9; }
.refresh-button { color: #cceaff; }
.refresh-button:hover, .export-button:hover:not(:disabled) {
  border-color: #4c91bd;
  color: #fff;
  background: #173149;
}
.menu-button { border-color: #2c4158; color: #d4e6f5; background: #101b28; }
.stat-card, .panel {
  border-color: #2b3e53;
  border-radius: 7px;
  background: linear-gradient(145deg, rgb(19 31 45 / 98%), rgb(13 22 33 / 98%));
  box-shadow: 0 9px 26px rgb(0 0 0 / 22%), inset 0 1px 0 rgb(186 222 255 / 4%);
}
.temperature-card, .humidity-card, .pressure-card, .updated-card {
  background: linear-gradient(145deg, #142234, #0e1926);
}
.temperature-card { border-top-color: #75caff; }
.humidity-card { border-top-color: #4fc6b1; }
.pressure-card { border-top-color: #83aaff; }
.updated-card { border-top-color: #b9a5ff; }
.stat-label { color: #bdd0e2; }
.metric-tag { color: #a4b8cb; }
.temperature-card .metric-tag, .temperature-card > strong { color: #a9ddff; }
.humidity-card .metric-tag, .humidity-card > strong { color: #74ddc9; }
.pressure-card .metric-tag, .pressure-card > strong { color: #a9c3ff; }
.stat-card .time-value { color: #d7c8ff; }
.stat-card > strong small { color: #a9bbce; }
.stat-caption, .selected-device-label { color: #a7bbce; }
.stat-icon { background: #1a3046; }
.icon-temperature { color: #a9ddff; background: #19354c; }
.icon-humidity { color: #7be0cc; background: #153a39; }
.icon-pressure { color: #b0c6ff; background: #202f4a; }
.icon-updated { color: #d0bdff; background: #302a49; }
.weather-current {
  border-color: #30475f;
  background: linear-gradient(120deg, #16283a, #101c29);
}
.weather-icon { color: #8ed3ff; background: #1a3248; }
.weather-temperature, .weather-feels strong { color: #e3f3ff; }
.weather-condition, .weather-feels, .weather-status { color: #aec1d4; }
.weather-detail { border-left-color: #34495e; }
.weather-detail span, .weather-detail strong { color: #b3c5d7; }
.weather-detail strong { color: #e0edf8; }
.weather-footer, .chart-footer, .page-footer { border-color: #2a3d51; color: #9db1c5; }
.weather-footer a { color: #a9dfff; }
.chart-legend { color: #c2d3e3; }
.legend-unit { color: #9db1c5; }
.legend-dot.red { background: #75caff; box-shadow: 0 0 0 3px rgb(117 202 255 / 15%); }
.export-button:disabled { border-color: #27394c; color: #8296aa; background: #0c1520; }
.chart-live { color: #b7d3e8; }
.device-total { border-color: #2b4259; color: #b9d2e5; background: #142336; }
.search-box:focus-within { border-color: #62b5e8; box-shadow: 0 0 0 3px rgb(98 181 232 / 17%); }
.search-box input { color: #e5eff8; }
.search-box input::placeholder { color: #92a7bb; }
.device-item { color: #e5eff8; }
.device-item:hover { background: #17283a; }
.device-item.selected { border-color: #345c7b; background: #162c40; box-shadow: inset 3px 0 #76c8ff; }
.device-icon { border-color: #304a62; color: #9bd8ff; background: #172b3d; box-shadow: none; }
.device-item.selected .device-icon { border-color: #3c6788; color: #b6e5ff; background: #1d3850; }
.device-name { color: #e5eff8; }
.device-meta { color: #a0b5c9; }
.device-status { color: #9cb1c5; }
.device-status.selected-status { color: #92dbff; }
.device-status.selected-status .status-dot { background: #6dcaff; }
.device-list-footer { border-color: #2a3d51; color: #9db1c5; }
.empty-state { color: #b4c5d6; }
.page-footer span:first-child { color: #cfdeec; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
.nav-link:focus-visible, .device-item:focus-visible, .refresh-button:focus-visible,
.menu-button:focus-visible, .export-button:focus-visible {
  outline: 3px solid #79caff;
  outline-offset: 2px;
}
@media (max-width: 760px) {
  body.sidebar-open .sidebar-backdrop { background: rgb(0 5 12 / 72%); }
}
