:root {
  color-scheme: light;
  --ink: #163747;
  --muted: #667e8a;
  --teal: #087e78;
  --teal-dark: #096662;
  --teal-light: #e5f6f0;
  --amber: #b36a1d;
  --amber-light: #fff5e7;
  --line: #dce6e8;
  --surface: #fff;
  --page: #f4f7f8;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: linear-gradient(180deg, #edf7fc 0px, #f4f7f8 340px, #f4f7f8 100%); color: var(--ink); font-family: "Noto Sans Hebrew", "Segoe UI", Arial, sans-serif; font-size: 15px; -webkit-font-smoothing: antialiased; }
button { font: inherit; }
button:focus-visible { outline: 3px solid #84d1cb; outline-offset: 2px; }
.layout { max-width: 1020px; margin: auto; padding: 0 18px 44px; }
.app-header { padding: 0 0 12px; }
.hero-art { width: 100%; height: 132px; position: relative; overflow: hidden; background: linear-gradient(180deg, #eaf6ff, #fbfdff); border-radius: 0 0 24px 24px; margin-bottom: 18px; }
.hero-meadow { position: absolute; inset-inline-start: 0; inset-block-end: 0; width: min(100%, 570px); height: auto; object-fit: contain; object-position: bottom left; -webkit-mask-image: linear-gradient(to right, #000 74%, transparent 100%); mask-image: linear-gradient(to right, #000 74%, transparent 100%); }
.brand-row { padding: 0 2px; display: flex; align-items: center; gap: 12px; }
h1 { margin: 0; font-size: clamp(22px, 4.5vw, 30px); letter-spacing: -.6px; font-weight: 800; }
.brand-text p { margin: 5px 0 0; font-size: 13px; color: var(--muted); }
.status-cluster { margin-top: 20px; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.overall-status { width: fit-content; border-radius: 30px; background: #edf2f4; display: flex; align-items: center; gap: 8px; color: #627581; font-weight: 700; font-size: 12px; padding: 8px 12px; }
.overall-status.connected { background: var(--teal-light); color: var(--teal-dark); }
.overall-status.warn { background: var(--amber-light); color: #996022; }
.status-dot { width: 7px; height: 7px; background: #a8b6bc; border-radius: 50%; }
.overall-status.connected .status-dot { background: #14a584; }
.overall-status.warn .status-dot { background: #e2a333; }
.overall-status.error { background: #fff0ec; color: #a43d32; }
.overall-status.error .status-dot { background: #e36657; }
.refresh-mini {
  --p: 0%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: conic-gradient(var(--teal) var(--p), #d8e5e7 0);
  display: grid;
  place-items: center;
}
.refresh-mini span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f4f7f8;
  display: block;
}
.refresh-mini.error { background: conic-gradient(#d96c5f var(--p), #eadfdd 0); }
.refresh-subtle { margin-top: 9px; padding-inline: 2px; color: var(--muted); font-size: 12px; }
.stats { display: flex; align-items: center; justify-content: space-around; gap: 8px; margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px 8px; box-shadow: 0 5px 25px rgba(31,62,77,.035); }
.stats > div { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.stat-figure { font-size: 27px; line-height: 1; font-weight: 850; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.stat-separator { height: 31px; width: 1px; background: var(--line); }
.hives { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; margin-top: 15px; }
.hive { min-width: 0; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 26px rgba(31,62,77,.045); border-radius: 21px; padding: 16px; }
.hive-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.hive-title-area { display: flex; align-items: center; gap: 10px; }
.hive-icon { display: grid; place-items: center; border-radius: 13px; width: 39px; height: 39px; background: #fff5e2; font-size: 21px; }
.hive h2 { font-size: 19px; font-weight: 800; margin: 0; }
.hive-meta { margin-top: 3px; font-size: 11px; color: var(--muted); }
.hive-tag, .probe-tag { font-size: 11px; font-weight: 700; border-radius: 99px; padding: 6px 9px; white-space: nowrap; background: var(--amber-light); color: #94601d; }
.hive-tag.live,.probe-tag.live { background: var(--teal-light); color: var(--teal-dark); }
.hive-tag.offline,.probe-tag.offline { background: #fff0ec; color: #a43d32; }
.probes { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.probe { border-radius: 15px; border: 1px solid #e7ecee; background: #f9fbfb; padding: 12px 10px; min-width: 0; }
.probe-title { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin: 0 0 11px; }
.probe h3 { font-size: 13px; margin: 0; font-weight: 800; }
.probe-tag { font-size: 10px; padding: 3px 6px; }
.measure { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-top: 10px; }
.measure-label { font-size: 12px; color: #6d828c; white-space: nowrap; }
.measure-num { font-size: clamp(17px, 3.6vw, 23px); font-weight: 800; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.measure-num.temperature { color: #206c91; }
.measure-num.humidity { color: #167e6b; }
.probe-warning { margin: 8px 0 0; color: #9c6928; font-size: 11px; }
.fan-section { margin-top: 17px; }
.section-label { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 750; margin: 0 0 9px; }
.section-subtle { margin-inline-start: auto; color: var(--muted); font-weight: 500; font-size: 11px; }
.speed-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.speed-button { display: flex; align-items: center; justify-content: center; padding: 11px 2px; text-align: center; font-size: 13px; font-weight: 700; border: 1px solid #d7e1e5; border-radius: 11px; color: #4a6673; background: #fafcfd; cursor: pointer; min-width: 0; transition: background .12s ease, transform .12s ease; }
.speed-button:active { transform: scale(.97); }
.speed-button[aria-pressed="true"] { background: var(--teal); color: #fff; border-color: var(--teal); box-shadow: 0 2px 6px rgba(8,126,120,.16); }
.automation { margin-top: 12px; border: 1px solid #d9e8e7; width: 100%; background: #eef7f5; color: var(--teal-dark); font-size: 13px; font-weight: 750; border-radius: 12px; padding: 12px 10px; cursor: pointer; }
.automation svg { vertical-align: middle; width: 16px; height: 16px; margin-left: 5px; }
.footer { border-top: 1px solid #dde8e9; margin-top: 23px; padding: 17px 4px 0; }
.footer-title { color: #456a77; font-weight: 750; font-size: 12px; }
.footer p { line-height: 1.8; font-size: 12px; color: var(--muted); margin: 7px 0 0; }
.toast { position: fixed; bottom: max(20px,env(safe-area-inset-bottom)); left: 16px; right: 16px; max-width: 420px; margin: auto; text-align: center; background: #143c46; color: white; border-radius: 14px; padding: 13px 16px; font-size: 13px; box-shadow: 0 9px 30px #1b3d4c38; z-index: 100; }
.toast[hidden] { display: none; }
@media (max-width: 360px) { .layout { padding-inline: 11px; } .hive { padding: 11px; } .probes { gap: 7px; } .probe { padding: 11px 7px; } .measure-label { font-size: 11px; } .measure-num { font-size: 17px; } }
@media (min-width: 660px) { .hero-art { height: 148px; } .hero-meadow { width: 570px; } .layout { padding: 0 26px 40px; } .hives { grid-template-columns: repeat(2,minmax(0,1fr)); } .app-header { padding-top: 36px; } }
@media (min-width: 1000px) { .hives { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { transition: none !important; scroll-behavior: auto !important; } }
