*{box-sizing:border-box}
:root{
  --bg:#06111f;
  --bg-soft:#091a2c;
  --panel:rgba(10,30,49,.82);
  --panel-2:rgba(13,37,59,.72);
  --line:rgba(151,194,225,.13);
  --text:#edf6ff;
  --muted:#8da5bd;
  --muted-2:#607a94;
  --cyan:#45c7ff;
  --cyan-2:#1798d4;
  --green:#39e6a4;
  --yellow:#ffd166;
  --blue:#56a8ff;
  --shadow:0 22px 55px rgba(0,0,0,.22);
}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100vh;
  color:var(--text);
  background:
    radial-gradient(circle at 50% -15%,rgba(28,119,177,.20),transparent 36%),
    radial-gradient(circle at 100% 35%,rgba(0,187,255,.055),transparent 30%),
    var(--bg);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased;
}
body:before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:linear-gradient(rgba(255,255,255,.012) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.012) 1px,transparent 1px);
  background-size:46px 46px;
  mask-image:linear-gradient(to bottom,#000,transparent 80%);
}
.ambient{position:fixed;width:420px;height:420px;border-radius:50%;filter:blur(90px);opacity:.09;pointer-events:none}
.ambient-a{background:#008fcb;left:-220px;top:35%}
.ambient-b{background:#1b6cff;right:-250px;top:5%}
.topbar{
  height:78px;
  padding:0 max(24px,5vw);
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  background:rgba(4,15,27,.78);
  backdrop-filter:blur(18px);
  position:sticky;
  top:0;
  z-index:10;
}
.brand{display:flex;align-items:center;gap:12px;color:var(--text);text-decoration:none}
.brand-mark{
  width:38px;height:38px;border-radius:11px;
  display:grid;place-items:center;
  background:linear-gradient(145deg,rgba(69,199,255,.18),rgba(69,199,255,.04));
  border:1px solid rgba(69,199,255,.24);
}
.brand-mark svg{width:22px;height:22px;fill:none;stroke:var(--cyan);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.brand strong{display:block;font-size:16px;letter-spacing:2px}
.brand small{display:block;color:var(--muted);font-size:10px;margin-top:2px;letter-spacing:.3px}
.top-status{
  display:flex;align-items:center;gap:9px;
  padding:8px 12px;border:1px solid var(--line);
  border-radius:12px;background:rgba(11,31,50,.72)
}
.status-dot{width:8px;height:8px;border-radius:50%;background:#8794a3;box-shadow:0 0 0 4px rgba(135,148,163,.07)}
.top-status.online .status-dot{background:var(--green);box-shadow:0 0 14px rgba(57,230,164,.7)}
.top-status.maintenance .status-dot{background:#f5b642;box-shadow:0 0 14px rgba(245,182,66,.65)}
.top-status.sleep .status-dot{background:#55b8ff;box-shadow:0 0 14px rgba(85,184,255,.7)}
.top-status.sleep b{color:#55b8ff}
.status-label{display:block;color:var(--muted-2);font-size:8px;letter-spacing:1.3px;font-weight:800}
.top-status b{display:block;font-size:11px;letter-spacing:1px;color:#c7d5e3;margin-top:1px}
.top-status.online b{color:var(--green)}
.top-status.maintenance b{color:#f5b642}
main{width:min(1380px,90%);margin:auto;padding:42px 0 30px}
.hero{
  display:flex;justify-content:space-between;align-items:flex-end;
  gap:30px;margin-bottom:28px
}
.eyebrow{display:flex;align-items:center;gap:8px;color:var(--cyan);font-size:10px;font-weight:800;letter-spacing:2px}
.eyebrow span{width:7px;height:7px;border-radius:50%;background:var(--cyan);box-shadow:0 0 12px rgba(69,199,255,.7)}
.hero h1{font-size:clamp(38px,5vw,58px);line-height:1;margin:11px 0 10px;letter-spacing:-2px}
.hero p{margin:0;max-width:650px;color:var(--muted);font-size:14px;line-height:1.65}
.live-meta{text-align:right;min-width:180px}
.live-badge{
  display:inline-flex;align-items:center;gap:7px;
  padding:7px 10px;border:1px solid rgba(57,230,164,.18);
  border-radius:999px;background:rgba(57,230,164,.055);
  color:var(--green);font-size:9px;font-weight:800;letter-spacing:1.1px
}
.live-badge i{width:6px;height:6px;border-radius:50%;background:var(--green);box-shadow:0 0 10px rgba(57,230,164,.7)}
.update-label{margin-top:13px;color:var(--muted-2);font-size:9px;letter-spacing:1.3px;font-weight:800}
.live-meta strong{display:block;margin-top:4px;color:#dce9f5;font-size:12px}
.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin-bottom:18px}
.metric-card{
  position:relative;overflow:hidden;
  min-height:154px;padding:18px 19px;
  background:linear-gradient(145deg,rgba(14,38,61,.88),rgba(7,24,40,.90));
  border:1px solid var(--line);
  border-radius:17px;
  box-shadow:var(--shadow);
  transition:transform .2s ease,border-color .2s ease,background .2s ease
}
.metric-card:after{
  content:"";position:absolute;width:100px;height:100px;border-radius:50%;
  right:-50px;bottom:-60px;opacity:.08;background:var(--accent,var(--cyan));filter:blur(4px)
}
.metric-card:hover{transform:translateY(-2px);border-color:rgba(125,191,226,.24);background:linear-gradient(145deg,rgba(17,44,70,.94),rgba(8,27,45,.94))}
.metric-card.temperature{--accent:#ff9d5c}
.metric-card.humidity{--accent:#57b8ff}
.metric-card.pressure{--accent:#9d9cff}
.metric-card.water{--accent:#38d7c1}
.metric-card.solar{--accent:#ffd166}
.metric-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.metric-head>span{font-size:9px;letter-spacing:1.45px;font-weight:800;color:#7894ae}
.metric-icon{
  width:34px;height:34px;border-radius:10px;display:grid;place-items:center;
  background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.07)
}
.metric-icon svg{width:18px;height:18px;fill:none;stroke:var(--accent,var(--cyan));stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.metric-value{display:flex;align-items:baseline;gap:6px;margin-top:21px}
.metric-value strong{font-size:30px;line-height:1;font-weight:760;letter-spacing:-.7px}
.metric-value small{font-size:11px;color:#8ba3b9;font-weight:650}
.metric-caption{margin-top:9px;color:var(--muted-2);font-size:10px}
.section-panel{
  padding:20px 20px 18px;margin-top:14px;
  background:linear-gradient(145deg,rgba(11,33,54,.90),rgba(7,23,39,.92));
  border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)
}
.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:14px}
.section-kicker{font-size:9px;color:var(--cyan);font-weight:800;letter-spacing:1.6px;margin-bottom:4px}
.section-head h2{margin:0;font-size:16px;letter-spacing:-.2px}
.section-head p{margin:5px 0 0;color:var(--muted-2);font-size:11px}
select{
  min-width:110px;padding:8px 10px;border-radius:9px;
  border:1px solid rgba(255,255,255,.1);
  background:#0a2035;color:#dce8f5;outline:0;font-size:11px
}
select:focus{border-color:rgba(69,199,255,.4)}
.chart-note{display:flex;align-items:center;gap:7px;color:var(--muted-2);font-size:10px}
.chart-note span{width:7px;height:7px;border-radius:50%;background:var(--cyan);box-shadow:0 0 9px rgba(69,199,255,.5)}
.chart-wrap{height:300px;position:relative}
.chart-wrap.large{height:335px}
footer{
  display:flex;justify-content:center;align-items:center;gap:9px;
  padding:26px 0 12px;color:#4f6881;font-size:9px;letter-spacing:1.1px
}
.footer-brand{color:#7892aa;font-weight:800}
.footer-separator{opacity:.45}
@media(max-width:1050px){
  .metric-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:680px){
  .topbar{height:70px;padding:0 18px}
  .brand strong{font-size:14px}.brand small{font-size:9px}
  .top-status{padding:7px 9px}.status-label{display:none}
  main{width:92%;padding-top:30px}
  .hero{flex-direction:column;align-items:flex-start;gap:20px}
  .hero h1{font-size:42px}
  .live-meta{text-align:left}
  .metric-grid{grid-template-columns:repeat(2,1fr);gap:10px}
  .metric-card{min-height:140px;padding:15px}
  .metric-value strong{font-size:25px}
  .section-panel{padding:16px 14px}
  .section-head{align-items:flex-start}
  .section-head p{max-width:230px}
  .chart-wrap{height:260px}.chart-wrap.large{height:290px}
  footer{flex-wrap:wrap;padding-bottom:20px}
}
@media(max-width:430px){
  .metric-grid{grid-template-columns:1fr}
  .metric-card{min-height:130px}
  .metric-value{margin-top:17px}
  .hero h1{font-size:38px}
}


.partners-panel{
  margin-top:14px;
  padding:20px 26px 22px;
  background:linear-gradient(145deg,rgba(11,33,54,.70),rgba(7,23,39,.78));
  border:1px solid rgba(151,194,225,.10);
  border-radius:18px;
  box-shadow:0 18px 45px rgba(0,0,0,.16);
}

.partner-row{
  display:block;
  width:100%;
  text-align:center;
}

.partner-title{
  display:block;
  width:100%;
  margin:0 0 8px;
  text-align:center;
}

.partner-title span{
  color:#6685a2;
  font-size:9px;
  font-weight:800;
  letter-spacing:2px;
  line-height:1.55;
}

.partner-logos{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:center;
  gap:22px;
  width:100%;
  min-width:0;
}

.partner-logo{
  flex:0 0 170px;
  width:170px;
  height:58px;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:.62;
  transition:opacity .2s ease,transform .2s ease;
}

.partner-logo:hover{
  opacity:.88;
  transform:translateY(-1px);
}

.partner-logo img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
}

.logo-3dlab img{height:54px}
.logo-veltrix img{height:50px}
.logo-uthm img{height:56px}
.logo-fkee img{height:52px}
.logo-innocube img{height:48px}

.partner-divider{
  flex:0 0 1px;
  width:1px;
  height:32px;
  background:rgba(151,194,225,.13);
}

.partner-separator{
  width:62%;
  height:1px;
  margin:8px auto;
  background:linear-gradient(90deg,transparent,rgba(151,194,225,.13),transparent);
}

@media(max-width:900px){
  .partner-logos{
    gap:14px;
  }

  .partner-logo{
    flex-basis:150px;
    width:150px;
  }
}

@media(max-width:700px){
  .partner-logos{
    gap:8px;
  }

  .partner-logo{
    flex-basis:125px;
    width:125px;
    height:52px;
  }

  .partner-divider{
    height:28px;
  }

  .logo-3dlab img{height:46px}
  .logo-veltrix img{height:43px}
  .logo-uthm img{height:48px}
  .logo-fkee img{height:44px}
  .logo-innocube img{height:41px}
}

@media(max-width:480px){
  .partners-panel{
    padding:18px 12px 20px;
  }

  .partner-logos{
    flex-wrap:wrap;
    row-gap:6px;
  }

  .partner-logo{
    flex-basis:120px;
    width:120px;
  }

  .partner-divider{
    display:none;
  }
}

/* Tasik FKEE icon — used in header and browser tab */
.brand-mark{
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.brand-mark img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}

/* =========================================================
   Theme system
   Dark = existing Tasik FKEE theme
   Light = soft off-white / warm neutral
   ========================================================= */
:root{
  --page-bg:#061426;
  --page-bg-2:#081b30;
  --surface:#0b2136;
  --surface-2:#0d263e;
  --surface-soft:rgba(11,33,54,.70);
  --border:rgba(151,194,225,.10);
  --border-strong:rgba(151,194,225,.16);
  --text:#f3f7fb;
  --text-soft:#8da8c1;
  --text-muted:#6685a2;
  --accent:#35a8ff;
  --grid:rgba(151,194,225,.055);
  --shadow:rgba(0,0,0,.18);
  --chart-text:#8da8c1;
}

html[data-theme="light"]{
  --page-bg:#f1f3f0;
  --page-bg-2:#e9eeeb;
  --surface:#f8faf8;
  --surface-2:#eef2ef;
  --surface-soft:rgba(248,250,248,.92);
  --border:rgba(35,55,70,.11);
  --border-strong:rgba(35,55,70,.17);
  --text:#17232d;
  --text-soft:#62727d;
  --text-muted:#71828d;
  --accent:#168bd2;
  --grid:rgba(35,55,70,.055);
  --shadow:rgba(28,42,50,.10);
  --chart-text:#647680;
}

/* Page */
html[data-theme="light"] body{
  background:
    radial-gradient(circle at 50% -15%, rgba(22,139,210,.055), transparent 36%),
    linear-gradient(180deg,var(--page-bg-2),var(--page-bg));
  color:var(--text);
}

html[data-theme="light"] body::before{
  opacity:.35;
}

html[data-theme="light"] .topbar{
  background:rgba(241,243,240,.92);
  border-bottom-color:var(--border);
  box-shadow:0 8px 30px rgba(30,45,55,.04);
}

html[data-theme="light"] .card,
html[data-theme="light"] .partners-panel,
html[data-theme="light"] .chart-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .info-card{
  background:linear-gradient(145deg,var(--surface),var(--surface-2));
  border-color:var(--border);
  box-shadow:0 18px 45px var(--shadow);
}

html[data-theme="light"] .brand strong,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] .value,
html[data-theme="light"] .footer-brand{
  color:var(--text);
}

html[data-theme="light"] .brand small,
html[data-theme="light"] .subtitle,
html[data-theme="light"] .muted,
html[data-theme="light"] .card-subtitle{
  color:var(--text-soft);
}

html[data-theme="light"] .partner-title span,
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .section-label{
  color:#658096;
}

html[data-theme="light"] .partner-separator{
  background:linear-gradient(90deg,transparent,rgba(35,55,70,.13),transparent);
}

html[data-theme="light"] .partner-divider{
  background:rgba(35,55,70,.13);
}

html[data-theme="light"] .partner-logo{
  opacity:.68;
}

html[data-theme="light"] .theme-toggle{
  background:rgba(255,255,255,.70);
  border-color:var(--border-strong);
  color:#435560;
}

html[data-theme="light"] .theme-toggle:hover{
  background:#fff;
  border-color:rgba(22,139,210,.25);
}

html[data-theme="light"] .top-status{
  background:rgba(255,255,255,.58);
  border-color:var(--border);
}

html[data-theme="light"] select,
html[data-theme="light"] .range-select{
  background:#f8faf8;
  color:var(--text);
  border-color:var(--border-strong);
}

html[data-theme="light"] footer{
  color:#71828d;
}

html[data-theme="light"] .chart-card canvas{
  /* Keep Chart.js canvas transparent; JS controls grid/text colors. */
  filter:none;
}

/* Theme button */
.theme-toggle{
  appearance:none;
  border:1px solid rgba(151,194,225,.14);
  background:rgba(8,27,48,.72);
  color:#a9bfd2;
  min-height:34px;
  padding:0 11px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font:inherit;
  font-size:11px;
  font-weight:700;
  letter-spacing:.2px;
  cursor:pointer;
  transition:background .2s ease,border-color .2s ease,color .2s ease,transform .15s ease;
}

.theme-toggle:hover{
  background:rgba(13,38,62,.95);
  border-color:rgba(53,168,255,.28);
  color:#d7e7f4;
}

.theme-toggle:active{
  transform:translateY(1px);
}

.theme-icon{
  font-size:15px;
  line-height:1;
}

.theme-toggle-label{
  min-width:31px;
  text-align:left;
}

@media(max-width:700px){
  .theme-toggle{
    width:34px;
    min-width:34px;
    padding:0;
    gap:0;
  }
  .theme-toggle-label{
    display:none;
  }
}

/* Header actions: theme control immediately left of system status */
.header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  margin-left:auto;
}

.header-actions .theme-toggle{
  flex:0 0 auto;
}

.header-actions .top-status{
  flex:0 0 auto;
}

@media(max-width:700px){
  .header-actions{
    gap:7px;
  }
}

/* =========================================================
   LIGHT MODE V2 — softer blue-grey surfaces + dark partner card
   ========================================================= */

/* Main light-mode palette */
html[data-theme="light"] body{
  background:
    radial-gradient(circle at 8% 35%, rgba(77,183,222,.085), transparent 28%),
    radial-gradient(circle at 94% 28%, rgba(113,157,201,.075), transparent 30%),
    linear-gradient(180deg,#f3f5f2 0%,#edf1ef 100%);
}

/* Header */
html[data-theme="light"] .topbar{
  background:rgba(248,250,248,.94);
  border-bottom-color:rgba(42,65,79,.10);
}

/* Hero text */
html[data-theme="light"] .hero .subtitle{
  color:#7891a5;
}

html[data-theme="light"] .hero .eyebrow,
html[data-theme="light"] .section-kicker{
  color:#238fca;
}

/* Sensor cards: soft blue-grey instead of dark navy */
html[data-theme="light"] .metric-card{
  background:linear-gradient(145deg,#e5edf1 0%,#dce7ed 100%);
  border-color:rgba(54,83,101,.13);
  box-shadow:0 16px 35px rgba(42,65,79,.10);
}

html[data-theme="light"] .metric-card:hover{
  background:linear-gradient(145deg,#eaf1f4 0%,#e0eaf0 100%);
  border-color:rgba(35,143,202,.20);
}

html[data-theme="light"] .metric-head>span{
  color:#6d8799;
}

html[data-theme="light"] .metric-value strong{
  color:#1c3444;
}

html[data-theme="light"] .metric-value small{
  color:#607989;
}

html[data-theme="light"] .metric-caption{
  color:#708695;
}

html[data-theme="light"] .metric-icon{
  background:rgba(255,255,255,.30);
  border-color:rgba(54,83,101,.13);
}

/* History / solar cards */
html[data-theme="light"] .section-panel{
  background:linear-gradient(145deg,#e3ebef 0%,#dbe6ec 100%);
  border-color:rgba(54,83,101,.13);
  box-shadow:0 18px 40px rgba(42,65,79,.10);
}

html[data-theme="light"] .section-head h2{
  color:#203747;
}

html[data-theme="light"] .section-head p,
html[data-theme="light"] .chart-note{
  color:#718694;
}

html[data-theme="light"] select{
  background:#f8faf9;
  color:#263d4d;
  border-color:rgba(54,83,101,.16);
}

/* Project logos: deliberately darker than the page so the logos retain contrast */
html[data-theme="light"] .partners-panel{
  background:
    radial-gradient(circle at 15% 15%,rgba(69,199,255,.045),transparent 35%),
    linear-gradient(145deg,#193246 0%,#142b3d 55%,#12283a 100%);
  border-color:rgba(69,199,255,.13);
  box-shadow:
    0 20px 45px rgba(33,55,68,.15),
    inset 0 1px 0 rgba(255,255,255,.035);
}

html[data-theme="light"] .partner-title span{
  color:#8eabc0;
}

html[data-theme="light"] .partner-separator{
  background:linear-gradient(90deg,transparent,rgba(143,181,207,.18),transparent);
}

html[data-theme="light"] .partner-divider{
  background:rgba(143,181,207,.18);
}

html[data-theme="light"] .partner-logo{
  opacity:.82;
}

html[data-theme="light"] .partner-logo:hover{
  opacity:1;
}

html[data-theme="light"] footer{
  color:#718492;
}

html[data-theme="light"] footer .footer-brand{
  color:#304756;
}

/* Keep the light-mode toggle/status controls subtle */
html[data-theme="light"] .theme-toggle{
  background:rgba(255,255,255,.72);
  color:#435965;
}

html[data-theme="light"] .top-status{
  background:rgba(255,255,255,.66);
}

/* Mobile: keep the dark logo panel visually distinct but not heavy */
@media(max-width:700px){
  html[data-theme="light"] .partners-panel{
    box-shadow:0 14px 32px rgba(33,55,68,.12);
  }
}

/* =========================================================
   LIGHT MODE V3 — partner card blends with the page
   while keeping strong logo contrast
   ========================================================= */
html[data-theme="light"] .partners-panel{
  background:
    radial-gradient(circle at 18% 20%,rgba(104,187,216,.055),transparent 34%),
    radial-gradient(circle at 82% 80%,rgba(255,255,255,.035),transparent 38%),
    linear-gradient(145deg,#294252 0%,#263f4f 52%,#233c4b 100%);
  border-color:rgba(78,116,135,.20);
  box-shadow:
    0 18px 38px rgba(42,65,79,.11),
    inset 0 1px 0 rgba(255,255,255,.045);
}

html[data-theme="light"] .partner-title span{
  color:#9bb2c2;
}

html[data-theme="light"] .partner-separator{
  background:linear-gradient(90deg,transparent,rgba(184,210,223,.16),transparent);
}

html[data-theme="light"] .partner-divider{
  background:rgba(184,210,223,.17);
}

html[data-theme="light"] .partner-logo{
  opacity:.88;
  filter:drop-shadow(0 3px 8px rgba(0,0,0,.08));
  transition:opacity .2s ease,filter .2s ease;
}

html[data-theme="light"] .partner-logo:hover{
  opacity:1;
  filter:drop-shadow(0 4px 10px rgba(0,0,0,.14));
}

/* =========================================================
   LIGHT MODE V4 — faded partner panel that blends into page
   Darker only where the logos sit, softer toward the edges.
   ========================================================= */
html[data-theme="light"] .partners-panel{
  background:
    radial-gradient(
      ellipse 72% 88% at 50% 50%,
      rgba(39,67,82,.94) 0%,
      rgba(48,77,91,.88) 42%,
      rgba(74,101,113,.58) 68%,
      rgba(191,207,208,.30) 88%,
      rgba(225,232,229,.10) 100%
    );
  border-color:rgba(91,119,131,.17);
  box-shadow:
    0 16px 34px rgba(42,65,79,.08),
    inset 0 1px 0 rgba(255,255,255,.055);
}

html[data-theme="light"] .partners-panel::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  background:
    linear-gradient(
      90deg,
      rgba(237,242,239,.22) 0%,
      transparent 18%,
      transparent 82%,
      rgba(237,242,239,.22) 100%
    );
  opacity:.65;
}

html[data-theme="light"] .partner-logo{
  opacity:.90;
  filter:drop-shadow(0 2px 7px rgba(0,0,0,.08));
}

html[data-theme="light"] .partner-logo:hover{
  opacity:1;
  filter:drop-shadow(0 3px 9px rgba(0,0,0,.13));
}

/* =========================================================
   LIGHT MODE V5 — tighter, subtler logo-card fade
   Keeps the darker focus behind the logos only.
   ========================================================= */
html[data-theme="light"] .partners-panel{
  background:
    radial-gradient(
      ellipse 48% 58% at 50% 50%,
      rgba(40,69,84,.88) 0%,
      rgba(53,81,94,.72) 34%,
      rgba(92,116,126,.34) 60%,
      rgba(211,222,221,.08) 78%,
      transparent 100%
    );
  border-color:rgba(91,119,131,.13);
  box-shadow:
    0 14px 30px rgba(42,65,79,.06),
    inset 0 1px 0 rgba(255,255,255,.045);
}

html[data-theme="light"] .partners-panel::after{
  background:
    linear-gradient(
      90deg,
      rgba(237,242,239,.10) 0%,
      transparent 24%,
      transparent 76%,
      rgba(237,242,239,.10) 100%
    );
  opacity:.45;
}

html[data-theme="light"] .partner-logo{
  opacity:.94;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,.08));
}

html[data-theme="light"] .partner-logo:hover{
  opacity:1;
  filter:drop-shadow(0 3px 8px rgba(0,0,0,.12));
}

/* =========================================================
   LIGHT MODE V6 — fade only at the CARD EDGES
   Darker center keeps the logos prominent; edges blend
   softly into the off-white page.
   ========================================================= */
html[data-theme="light"] .partners-panel{
  background:
    radial-gradient(
      ellipse 76% 78% at 50% 50%,
      #294757 0%,
      #294757 58%,
      rgba(41,71,87,.90) 70%,
      rgba(41,71,87,.58) 84%,
      rgba(41,71,87,.18) 96%,
      rgba(41,71,87,0) 100%
    );
  border-color:rgba(78,108,120,.16);
  box-shadow:
    0 10px 28px rgba(42,65,79,.045),
    inset 0 0 0 1px rgba(255,255,255,.025);
}

/* Remove the previous center-overlay fade. */
html[data-theme="light"] .partners-panel::after{
  background:none;
  opacity:0;
}

html[data-theme="light"] .partner-logo{
  opacity:.96;
  filter:drop-shadow(0 2px 7px rgba(0,0,0,.10));
}

html[data-theme="light"] .partner-logo:hover{
  opacity:1;
  filter:drop-shadow(0 3px 9px rgba(0,0,0,.14));
}

/* =========================================================
   LIGHT MODE V7 — full perimeter fade
   The center stays readable while TOP / BOTTOM / LEFT /
   RIGHT edges all fade smoothly into the page.
   ========================================================= */
html[data-theme="light"] .partners-panel{
  background:
    radial-gradient(
      ellipse 62% 72% at 50% 50%,
      rgba(41,71,87,1) 0%,
      rgba(41,71,87,.98) 42%,
      rgba(41,71,87,.86) 58%,
      rgba(41,71,87,.55) 72%,
      rgba(41,71,87,.22) 86%,
      rgba(41,71,87,0) 100%
    );
  border-color:rgba(91,119,131,.10);
  box-shadow:none;
}

/* Remove the old edge overlay so the new fade controls the
   entire perimeter consistently. */
html[data-theme="light"] .partners-panel::after{
  display:none;
}

/* Keep the logo area crisp against the softer perimeter. */
html[data-theme="light"] .partner-logo{
  opacity:.96;
  filter:drop-shadow(0 2px 7px rgba(0,0,0,.10));
}

html[data-theme="light"] .partner-logo:hover{
  opacity:1;
  filter:drop-shadow(0 3px 9px rgba(0,0,0,.14));
}

/* =========================================================
   LIGHT MODE V8 — clean solid partner card
   A muted blue-grey surface replaces the fade so the
   partner section feels intentional and the logos pop.
   ========================================================= */
html[data-theme="light"] .partners-panel{
  background:#294757;
  border:1px solid rgba(47,75,89,.18);
  box-shadow:
    0 12px 28px rgba(42,65,79,.08),
    inset 0 1px 0 rgba(255,255,255,.045);
}

html[data-theme="light"] .partners-panel::after{
  display:none;
}

html[data-theme="light"] .partner-title span{
  color:#a9bdc9;
}

html[data-theme="light"] .partner-separator{
  background:linear-gradient(90deg,transparent,rgba(181,207,220,.16),transparent);
}

html[data-theme="light"] .partner-divider{
  background:rgba(181,207,220,.18);
}

html[data-theme="light"] .partner-logo{
  opacity:.94;
  filter:drop-shadow(0 2px 7px rgba(0,0,0,.12));
}

html[data-theme="light"] .partner-logo:hover{
  opacity:1;
  filter:drop-shadow(0 3px 9px rgba(0,0,0,.16));
}


/* Dedicated water-level history */
.water-level-panel {
  margin-bottom: 18px;
}

@media (max-width: 700px) {
  .water-level-panel {
    margin-bottom: 14px;
  }
}


/* Standalone history range selector */
.history-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
}

.history-toolbar > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-right: auto;
}

.history-toolbar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--accent);
}

.history-toolbar-text {
  font-size: 12px;
  color: var(--muted);
}

.history-toolbar select {
  min-width: 110px;
  height: 36px;
}

@media (max-width: 700px) {
  .history-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .history-toolbar > div {
    display: block;
    margin-right: 0;
  }

  .history-toolbar-text {
    display: block;
    margin-top: 3px;
  }

  .history-toolbar select {
    width: 100%;
  }
}


/* Historical-data label on chart panels */
.section-panel {
  position: relative;
}

.historical-data {
  position: absolute;
  top: 20px;
  right: 22px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.historical-data .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 45%, transparent);
}

@media (max-width: 700px) {
  .historical-data {
    top: 18px;
    right: 18px;
    font-size: 10px;
  }
}


/* Theme toggle: compact control immediately left of System Status */
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.theme-toggle {
  min-height: 38px;
  min-width: 72px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

@media (max-width: 700px) {
  .header-actions {
    gap: 7px;
  }

  .theme-toggle {
    min-width: 42px;
    width: 42px;
    padding: 0;
  }

  .theme-toggle .theme-label {
    display: none;
  }
}


/* =========================================================
   V22 THEME TOGGLE FIX
   Explicit light-mode surfaces for the current dashboard UI.
   ========================================================= */
html[data-theme="light"] .metric-card{
  background:linear-gradient(145deg,#e5edf1 0%,#dce7ed 100%);
  border-color:rgba(54,83,101,.13);
  box-shadow:0 16px 35px rgba(42,65,79,.10);
}
html[data-theme="light"] .metric-card:hover{
  background:linear-gradient(145deg,#eaf1f4 0%,#e0eaf0 100%);
}
html[data-theme="light"] .metric-head>span{color:#6d8799}
html[data-theme="light"] .metric-value strong{color:#1c3444}
html[data-theme="light"] .metric-value small{color:#607989}
html[data-theme="light"] .metric-caption{color:#708695}
html[data-theme="light"] .metric-icon{
  background:rgba(255,255,255,.30);
  border-color:rgba(54,83,101,.13);
}
html[data-theme="light"] .section-panel{
  background:linear-gradient(145deg,#e3ebef 0%,#dbe6ec 100%);
  border-color:rgba(54,83,101,.13);
  box-shadow:0 18px 40px rgba(42,65,79,.10);
}
html[data-theme="light"] .section-head h2{color:#203747}
html[data-theme="light"] .section-head p,
html[data-theme="light"] .chart-note{color:#718694}
html[data-theme="light"] .history-toolbar{
  background:rgba(255,255,255,.48);
  border-color:rgba(54,83,101,.12);
}
html[data-theme="light"] .history-toolbar-text{color:#718694}
html[data-theme="light"] .topbar{
  background:rgba(248,250,248,.94);
  border-bottom-color:rgba(42,65,79,.10);
}
html[data-theme="light"] .brand{color:#17232d}
html[data-theme="light"] .brand strong{color:#17232d}
html[data-theme="light"] .brand small{color:#62727d}
html[data-theme="light"] .top-status{
  background:rgba(255,255,255,.66);
  border-color:rgba(35,55,70,.11);
}
html[data-theme="light"] .top-status b{color:#62727d}
html[data-theme="light"] .top-status.online b{color:#159d75}
html[data-theme="light"] .live-meta strong{color:#304756}
html[data-theme="light"] .update-label{color:#71828d}
html[data-theme="light"] .history-toolbar select,
html[data-theme="light"] select{
  background:#f8faf9;
  color:#263d4d;
  border-color:rgba(54,83,101,.16);
}
html[data-theme="light"] .theme-toggle{
  background:rgba(255,255,255,.72);
  color:#435965;
  border-color:rgba(54,83,101,.16);
}
html[data-theme="light"] .theme-toggle:hover{
  background:#fff;
  border-color:rgba(22,139,210,.25);
}


/* =========================================================
   TASIK KEMAJUAN HERO
   Cinematic aerial image generated for the UTHM IoT portal.
   ========================================================= */
.hero.hero-image{
  position:relative;
  min-height:300px;
  padding:48px 44px;
  border:1px solid rgba(69,199,255,.14);
  border-radius:18px;
  overflow:hidden;
  background:
    linear-gradient(90deg,rgba(3,13,24,.94) 0%,rgba(3,13,24,.76) 38%,rgba(3,13,24,.28) 72%,rgba(3,13,24,.46) 100%),
    linear-gradient(180deg,rgba(2,10,18,.08) 20%,rgba(2,10,18,.72) 100%),
    url("tasik-kemajuan-header.png") center 52% / cover no-repeat;
  box-shadow:0 26px 70px rgba(0,0,0,.30);
}
.hero.hero-image::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(90deg,rgba(69,199,255,.045),transparent 55%);
}
.hero.hero-image .hero-copy,
.hero.hero-image .live-meta{
  position:relative;
  z-index:1;
}
.hero.hero-image .hero-copy{
  max-width:780px;
}
.hero.hero-image h1{
  text-shadow:0 5px 24px rgba(0,0,0,.42);
}
.hero.hero-image p{
  color:#d3e1ec;
  text-shadow:0 2px 12px rgba(0,0,0,.55);
}
.hero.hero-image .eyebrow{
  color:#5fd1ff;
}
.hero.hero-image .live-meta{
  padding:15px 17px;
  border:1px solid rgba(151,194,225,.15);
  border-radius:14px;
  background:rgba(3,15,27,.48);
  backdrop-filter:blur(10px);
}
@media(max-width:760px){
  .hero.hero-image{
    min-height:420px;
    padding:32px 24px;
    background-position:center 50%;
  }
  .hero.hero-image .live-meta{
    width:100%;
    text-align:left;
  }
}


/* =========================================================
   LIGHT MODE — CINEMATIC HERO CONTRAST FIX
   Keep the photo dark/cinematic, but restore white hero
   typography so it remains readable in light mode.
   ========================================================= */
html[data-theme="light"] .hero.hero-image{
  color:#f7fbff;
  background:
    linear-gradient(90deg,rgba(2,13,24,.91) 0%,rgba(2,13,24,.72) 43%,rgba(2,13,24,.32) 76%,rgba(2,13,24,.46) 100%),
    linear-gradient(180deg,rgba(2,10,18,.10) 18%,rgba(2,10,18,.68) 100%),
    url("tasik-kemajuan-header.png") center 52% / cover no-repeat;
  border-color:rgba(22,139,210,.18);
  box-shadow:0 22px 55px rgba(28,42,50,.16);
}

html[data-theme="light"] .hero.hero-image h1{
  color:#f8fbff !important;
  text-shadow:0 4px 20px rgba(0,0,0,.48);
}

html[data-theme="light"] .hero.hero-image p{
  color:#dce9f2 !important;
  text-shadow:0 2px 10px rgba(0,0,0,.55);
}

html[data-theme="light"] .hero.hero-image .eyebrow{
  color:#4fc7ff !important;
  text-shadow:0 2px 10px rgba(0,0,0,.35);
}

html[data-theme="light"] .hero.hero-image .eyebrow span{
  background:#4fc7ff;
  box-shadow:0 0 12px rgba(79,199,255,.85);
}

html[data-theme="light"] .hero.hero-image .live-meta{
  background:rgba(4,19,32,.68);
  border-color:rgba(111,213,255,.18);
  box-shadow:0 12px 30px rgba(0,0,0,.16);
}

html[data-theme="light"] .hero.hero-image .live-badge{
  background:rgba(57,230,164,.08);
  border-color:rgba(57,230,164,.24);
}

html[data-theme="light"] .hero.hero-image .update-label{
  color:#9db5c5 !important;
}

html[data-theme="light"] .hero.hero-image .live-meta strong{
  color:#eef8ff !important;
}


/* =========================================================
   LIGHT MODE — HERO LIVE-DATA CARD
   Light glass card so it blends with the light page while
   remaining readable over the cinematic header image.
   ========================================================= */
html[data-theme="light"] .hero.hero-image .live-meta{
  background:rgba(248,250,248,.88);
  border:1px solid rgba(54,83,101,.14);
  border-radius:16px;
  padding:14px 16px;
  color:#263d4d;
  box-shadow:
    0 12px 28px rgba(28,42,50,.13),
    inset 0 1px 0 rgba(255,255,255,.72);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

html[data-theme="light"] .hero.hero-image .live-badge{
  background:rgba(57,190,137,.10);
  border-color:rgba(39,164,116,.22);
  color:#16845f;
}

html[data-theme="light"] .hero.hero-image .update-label{
  color:#71828d !important;
}

html[data-theme="light"] .hero.hero-image .live-meta strong{
  color:#263d4d !important;
}


/* =========================================================
   LIGHT MODE — HEADER CARD MATCHES PAGE SURFACE
   The photo remains visible as a subtle background layer,
   while the card itself uses the same soft light surface
   as the dashboard cards below.
   ========================================================= */
html[data-theme="light"] .hero.hero-image{
  color:#294052;
  background:
    linear-gradient(90deg,rgba(226,236,241,.94) 0%,rgba(226,236,241,.88) 46%,rgba(226,236,241,.68) 78%,rgba(226,236,241,.80) 100%),
    linear-gradient(180deg,rgba(226,236,241,.76) 0%,rgba(226,236,241,.90) 100%),
    url("tasik-kemajuan-header.png") center 52% / cover no-repeat;
  border:1px solid rgba(111,139,154,.18);
  box-shadow:0 14px 34px rgba(65,91,105,.10);
}

html[data-theme="light"] .hero.hero-image h1{
  color:#263d4d !important;
  text-shadow:none;
}

html[data-theme="light"] .hero.hero-image p{
  color:#526b7a !important;
  text-shadow:none;
}

html[data-theme="light"] .hero.hero-image .eyebrow{
  color:#1699d3 !important;
  text-shadow:none;
}

html[data-theme="light"] .hero.hero-image .eyebrow span{
  background:#27b6eb;
  box-shadow:0 0 10px rgba(39,182,235,.35);
}

html[data-theme="light"] .hero.hero-image .live-meta{
  background:rgba(231,239,243,.88);
  border:1px solid rgba(111,139,154,.16);
  box-shadow:0 10px 24px rgba(65,91,105,.08);
}


/* =========================================================
   LIGHT MODE — TASIK KEMAJUAN HERO
   Match the main UTHM IoT portal's cinematic hero style.
   The page remains light, while the hero is intentionally
   a dark photo banner with high-contrast typography.
   ========================================================= */
html[data-theme="light"] .hero.hero-image{
  color:#f7fbff;
  background:
    linear-gradient(90deg,rgba(2,11,19,.93) 0%,rgba(2,11,19,.78) 40%,rgba(2,11,19,.34) 76%,rgba(2,11,19,.48) 100%),
    linear-gradient(180deg,rgba(2,10,18,.08) 10%,rgba(2,10,18,.78) 100%),
    url("tasik-kemajuan-header.png") center 52% / cover no-repeat;
  border:1px solid rgba(18,91,124,.55);
  box-shadow:0 18px 42px rgba(0,0,0,.16);
}

html[data-theme="light"] .hero.hero-image h1{
  color:#f7fbff !important;
  text-shadow:0 4px 20px rgba(0,0,0,.50);
}

html[data-theme="light"] .hero.hero-image p{
  color:#d9e8f2 !important;
  text-shadow:0 2px 10px rgba(0,0,0,.55);
}

html[data-theme="light"] .hero.hero-image .eyebrow{
  color:#38bfff !important;
  text-shadow:0 2px 10px rgba(0,0,0,.45);
}

html[data-theme="light"] .hero.hero-image .eyebrow span{
  background:#38bfff;
  box-shadow:0 0 12px rgba(56,191,255,.75);
}

html[data-theme="light"] .hero.hero-image .live-meta{
  background:rgba(5,20,32,.72);
  border:1px solid rgba(93,190,229,.20);
  color:#eef8ff;
  box-shadow:0 12px 30px rgba(0,0,0,.18);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

html[data-theme="light"] .hero.hero-image .live-badge{
  background:rgba(57,230,164,.08);
  border-color:rgba(57,230,164,.28);
  color:#5be9b1;
}

html[data-theme="light"] .hero.hero-image .update-label{
  color:#91aebe !important;
}

html[data-theme="light"] .hero.hero-image .live-meta strong{
  color:#f0f8fc !important;
}


/* =========================================================
   TASIK KEMAJUAN HERO — FULL-BLEED PORTAL STYLE
   No card treatment: no rounded container, no framed border.
   The image blends directly into the dashboard background.
   ========================================================= */
.hero.hero-image{
  position:relative;
  width:100%;
  min-height:330px;
  margin:0;
  padding:56px 48px 42px;
  border:0 !important;
  border-radius:0 !important;
  overflow:hidden;
  box-shadow:none !important;
  background:
    linear-gradient(90deg,rgba(2,11,19,.94) 0%,rgba(2,11,19,.78) 40%,rgba(2,11,19,.30) 78%,rgba(2,11,19,.46) 100%),
    linear-gradient(180deg,rgba(2,10,18,.04) 10%,rgba(2,10,18,.84) 100%),
    url("tasik-kemajuan-header.png") center 52% / cover no-repeat;
}

.hero.hero-image::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(180deg,rgba(2,10,18,0) 58%,rgba(2,10,18,.72) 100%);
}

.hero.hero-image::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:1px;
  background:rgba(54,180,232,.20);
  pointer-events:none;
}

.hero.hero-image .hero-copy,
.hero.hero-image .live-meta{
  position:relative;
  z-index:2;
}

.hero.hero-image .hero-copy{
  max-width:780px;
}

.hero.hero-image h1{
  text-shadow:0 4px 20px rgba(0,0,0,.52);
}

.hero.hero-image p{
  text-shadow:0 2px 10px rgba(0,0,0,.55);
}

.hero.hero-image .live-meta{
  background:rgba(4,18,30,.58);
  border:1px solid rgba(93,190,229,.18);
  box-shadow:0 10px 28px rgba(0,0,0,.14);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

/* Light mode keeps the exact same cinematic hero treatment.
   The page beneath remains the light dashboard surface. */
html[data-theme="light"] .hero.hero-image{
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:
    linear-gradient(90deg,rgba(2,11,19,.92) 0%,rgba(2,11,19,.75) 40%,rgba(2,11,19,.30) 78%,rgba(2,11,19,.45) 100%),
    linear-gradient(180deg,rgba(2,10,18,.03) 10%,rgba(2,10,18,.82) 100%),
    url("tasik-kemajuan-header.png") center 52% / cover no-repeat;
}

html[data-theme="light"] .hero.hero-image h1{
  color:#f7fbff !important;
  text-shadow:0 4px 20px rgba(0,0,0,.52);
}

html[data-theme="light"] .hero.hero-image p{
  color:#d9e8f2 !important;
  text-shadow:0 2px 10px rgba(0,0,0,.55);
}

html[data-theme="light"] .hero.hero-image .eyebrow{
  color:#38bfff !important;
}

html[data-theme="light"] .hero.hero-image .live-meta{
  background:rgba(4,18,30,.58);
  border:1px solid rgba(93,190,229,.18);
  color:#eef8ff;
}


/* =========================================================
   TASIK KEMAJUAN HERO — USE THE FULL AVAILABLE WIDTH
   Remove the inner max-width/side gutters around the hero.
   ========================================================= */
.hero.hero-image{
  width:100vw;
  max-width:none !important;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
  border-left:0 !important;
  border-right:0 !important;
}

@media(max-width:760px){
  .hero.hero-image{
    width:100%;
    margin-left:0;
    margin-right:0;
  }
}


/* =========================================================
   TASIK KEMAJUAN HERO — TOP ALIGNMENT + SENSOR GAP
   ========================================================= */

/* Keep the aerial photo anchored to the top edge of the hero. */
.hero.hero-image{
  background-position:center top !important;
  margin-bottom:30px !important;
}

/* Give the first sensor row a clean breathing space below the hero. */
.hero.hero-image + .metrics,
.hero.hero-image + .sensor-grid,
.hero.hero-image + .cards-grid{
  margin-top:0 !important;
}

/* If the dashboard uses a generic grid wrapper immediately after
   the hero, preserve the 30px visual separation. */
.hero.hero-image ~ .metrics:first-of-type,
.hero.hero-image ~ .sensor-grid:first-of-type{
  margin-top:30px !important;
}


/* =========================================================
   TASIK KEMAJUAN HERO — MOVE PHOTO UP TO REMOVE TOP VOID
   Keep the sensor-card gap unchanged.
   ========================================================= */
.hero.hero-image{
  margin-top:-44px !important;
  background-position:center top !important;
}


/* =========================================================
   MOBILE — FULL-WIDTH TASIK KEMAJUAN PHOTO
   Let the hero image reach the phone's left/right edges,
   regardless of the dashboard content wrapper width.
   ========================================================= */
@media (max-width:760px){
  .hero.hero-image{
    width:100vw !important;
    max-width:none !important;
    margin-left:calc(50% - 50vw) !important;
    margin-right:calc(50% - 50vw) !important;
    border-left:0 !important;
    border-right:0 !important;
    border-radius:0 !important;
    background-size:cover !important;
    background-position:center top !important;
    margin-bottom:30px !important;
  }

  .hero.hero-image .hero-copy{
    width:100%;
    max-width:none;
  }

  .hero.hero-image .live-meta{
    width:100%;
    box-sizing:border-box;
  }
}


/* UTHM IoT main website navigation — added without changing the original dashboard layout */
.main-site-button{
  display:inline-flex;align-items:center;gap:8px;
  height:40px;padding:0 13px;
  border:1px solid rgba(69,199,255,.34);
  border-radius:11px;
  background:linear-gradient(180deg,rgba(13,42,66,.92),rgba(8,27,44,.92));
  color:#e8f5ff;text-decoration:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 5px 18px rgba(0,0,0,.12);
  transition:border-color .18s ease,background .18s ease,transform .18s ease;
  white-space:nowrap;
}
.main-site-button:hover{
  border-color:rgba(69,199,255,.7);
  background:linear-gradient(180deg,rgba(16,52,79,.98),rgba(9,31,50,.98));
  transform:translateY(-1px);
}
.main-site-button:active{transform:translateY(0)}
.main-site-arrow{font-size:21px;line-height:1;color:#45c7ff;margin-top:-1px}
.main-site-name{font-size:12px;font-weight:800;letter-spacing:.3px}
.main-site-label{font-size:8px;font-weight:800;letter-spacing:1px;color:#7892aa}
.header-actions{gap:10px}
@media(max-width:680px){
  .main-site-button{height:38px;padding:0 10px;gap:6px;border-radius:10px}
  .main-site-name{font-size:11px}
  .main-site-label{display:none}
  .main-site-arrow{font-size:19px}
  .header-actions{gap:7px}
}

/* UTHM IoT navigation occupies the original dashboard brand position. */
.topbar > .main-site-button{
  flex:0 0 auto;
}

/* =========================================================
   WATER LEVEL STATUS
   NORMAL  : below 80 cm
   WARNING : 80–100 cm
   ALERT   : above 100 cm
   ========================================================= */
.metric-head > .water-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:58px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid transparent;
  font-size:8px;
  line-height:1;
  letter-spacing:1px;
  font-weight:850;
  white-space:nowrap;
}
.water-status.neutral{
  color:#7894ae;
  background:rgba(120,148,174,.08);
  border-color:rgba(120,148,174,.14);
}
.water-status.water-normal{
  color:#58e6b1;
  background:rgba(57,230,164,.10);
  border-color:rgba(57,230,164,.28);
}
.water-status.water-warning{
  color:#ffd166;
  background:rgba(255,209,102,.10);
  border-color:rgba(255,209,102,.28);
}
.water-status.water-alert{
  color:#ff7b7b;
  background:rgba(255,91,91,.10);
  border-color:rgba(255,91,91,.30);
}

.metric-card.water.water-normal{--accent:#39e6a4}
.metric-card.water.water-warning{--accent:#ffd166}
.metric-card.water.water-alert{--accent:#ff5b5b}

.metric-card.water.water-normal{
  border-color:rgba(57,230,164,.20);
}
.metric-card.water.water-warning{
  border-color:rgba(255,209,102,.22);
}
.metric-card.water.water-alert{
  border-color:rgba(255,91,91,.24);
}

html[data-theme="light"] .water-status.neutral{
  color:#6d8799;
  background:rgba(54,83,101,.06);
  border-color:rgba(54,83,101,.12);
}
html[data-theme="light"] .water-status.water-normal{
  color:#159d75;
  background:rgba(39,190,137,.09);
  border-color:rgba(39,164,116,.22);
}
html[data-theme="light"] .water-status.water-warning{
  color:#a87400;
  background:rgba(255,193,7,.10);
  border-color:rgba(193,143,0,.22);
}
html[data-theme="light"] .water-status.water-alert{
  color:#c33b3b;
  background:rgba(220,68,68,.08);
  border-color:rgba(200,60,60,.22);
}
