:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #243c35;
  background: #f4f6f3;
  font-synthesis: none;
  font-size: 16px;
  --green: #153c32;
  --muted: #67776f;
  --line: #dce4dc;
  --gold: #efc45d;
  --danger: #a34c25;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  padding: 11px 17px;
  font-weight: 600;
}
button:hover {
  filter: brightness(1.13);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.secondary {
  background: #edf1eb;
  color: var(--green);
  border: 1px solid var(--line);
}
button.ghost {
  background: transparent;
  color: var(--green);
  padding: 6px 8px;
}
button.small {
  font-size: 0.875rem;
  padding: 8px 12px;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
h2 {
  font-size: 1.2rem;
  font-weight: 600;
}
h3 {
  font-size: 1rem;
}
p {
  line-height: 1.6;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.875rem;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
}
.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--green);
  color: #dfebe2;
  padding: 35px 22px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  font-size: 1.6rem;
  letter-spacing: -0.8px;
  color: #fff;
  font-weight: 650;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 46px;
}
.brand .mark {
  font-size: 2.25rem;
  color: var(--gold);
}
.sidebar .eyebrow {
  color: #95b3a3;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.sidebar a {
  text-decoration: none;
  padding: 13px 14px;
  border-radius: 8px;
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 0.95rem;
}
.sidebar a.active {
  background: #2b5144;
  color: var(--gold);
}
.sidebar a:hover {
  background: #244b3f;
}
.sidebar footer {
  margin-top: auto;
  padding-top: 30px;
  font-size: 0.875rem;
  color: #b8cbbc;
}
.sidebar footer strong {
  color: #fff;
  display: block;
  margin-bottom: 5px;
}
.sidebar footer button {
  margin-top: 16px;
  border: 1px solid #547466;
  background: transparent;
}
.main {
  min-width: 0;
}
.topbar {
  height: 78px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  gap: 15px;
  font-size: 0.875rem;
}
.topbar .wordmark {
  font-weight: 600;
}
.topbar time {
  color: var(--muted);
}
.content {
  padding: 34px 38px;
  max-width: 1600px;
  margin: auto;
}
.heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 28px;
}
.heading p {
  margin: 0;
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 21px 24px;
  background: #fff;
}
.stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 550;
  margin-top: 12px;
  color: var(--green);
}
.stat .small {
  color: var(--muted);
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 22px;
  min-width: 0;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.panel-head h2 {
  margin: 0;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: 24px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.hive-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 23px;
  text-decoration: none;
  display: block;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.hive-card:hover {
  box-shadow: 0 6px 25px #173e3210;
  transform: translateY(-2px);
}
.hive-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
}
.hive-card h3 {
  font-size: 1.15rem;
  margin: 0 0 6px;
}
.hive-card .apiary-name {
  font-size: 0.875rem;
  color: var(--muted);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 5px;
  background: #edf1eb;
  color: #546258;
  font-size: 0.75rem;
  white-space: nowrap;
  font-weight: 600;
}
.chip.healthy {
  background: #e7f2e8;
  color: #336842;
}
.chip.attention {
  background: #fff0d5;
  color: #935613;
}
.chip.waiting {
  background: #eaf0f6;
  color: #4b6680;
}
.readings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.reading-label {
  font-size: 0.875rem;
  color: var(--muted);
  display: block;
  margin-bottom: 7px;
}
.reading-value {
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: -0.8px;
}
.reading-value em {
  font-size: 1rem;
  font-style: normal;
  color: var(--muted);
  padding-left: 4px;
}
.card-foot {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}
.spark {
  width: 100%;
  height: 45px;
  display: block;
  margin-top: 15px;
}
.empty {
  text-align: center;
  padding: 44px 24px;
  color: var(--muted);
}
.empty h3 {
  color: var(--green);
  margin-bottom: 8px;
  font-size: 1.15rem;
}
.empty p {
  max-width: 480px;
  margin: 0 auto 20px;
}
.alert {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.alert:last-child {
  border: 0;
  padding-bottom: 0;
}
.alert strong {
  display: block;
  font-size: 0.95rem;
  margin: 0 0 7px;
}
.alert p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.insight {
  background: #f0f5ed;
  border: 1px solid #dce6d6;
  border-radius: 10px;
  padding: 19px;
  margin-bottom: 16px;
}
.insight h3 {
  text-transform: capitalize;
  margin-bottom: 10px;
}
.insight p,
.insight li {
  font-size: 0.875rem;
  line-height: 1.6;
}
.insight ul {
  padding-left: 18px;
  margin: 8px 0;
}
.insight .source {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 12px;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.toolbar select {
  width: auto;
  min-width: 180px;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  border-left: 2px solid #d8e4d6;
  padding: 0 0 26px 22px;
  position: relative;
  margin-left: 5px;
}
.timeline li:before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #849c83;
  position: absolute;
  left: -5.5px;
  top: 5px;
}
.timeline li:last-child {
  padding-bottom: 0;
}
.timeline strong {
  font-size: 0.95rem;
}
.timeline p {
  margin: 6px 0;
  font-size: 0.875rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.timeline time {
  font-size: 0.75rem;
  color: var(--muted);
}
.chart {
  width: 100%;
  height: 250px;
  display: block;
}
.chart text {
  font-size: 12px;
  fill: #68776f;
}
.legend {
  display: flex;
  gap: 22px;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.legend span:before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 3px;
  background: #396c4d;
  vertical-align: middle;
  margin-right: 7px;
}
.legend .outdoor:before {
  background: #c69b3a;
}
.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  margin-top: 18px;
}
.detail-meta strong {
  display: block;
  font-size: 0.875rem;
  margin-top: 7px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
code {
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}
.notice {
  padding: 14px 18px;
  border-radius: 8px;
  background: #fff3d9;
  color: #825523;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 22px;
}
.notice.info {
  background: #eaf0ed;
  color: #38594b;
}
.error {
  background: #ffebe4;
  color: #9f3822;
  padding: 13px;
  border-radius: 8px;
  margin: 12px 0;
  font-size: 0.875rem;
}
.form-error:empty {
  display: none;
}
label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 16px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd7cd;
  border-radius: 7px;
  background: #fff;
  color: #243c35;
  margin-top: 7px;
  min-width: 0;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
input[type="checkbox"] {
  display: inline;
  width: auto;
  margin: 0 9px 0 0;
}
input[type="file"] {
  font-size: 0.875rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
label small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.4;
  margin-top: 6px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  max-width: 580px;
  width: calc(100% - 32px);
  max-height: 90vh;
  color: #243c35;
  box-shadow: 0 20px 80px #163b3233;
}
dialog::backdrop {
  background: #102e2770;
  backdrop-filter: blur(3px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}
.modal-head h2 {
  margin: 0;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-hero {
  background: var(--green);
  color: #e5efdf;
  padding: 10vw 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-hero h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  letter-spacing: -2px;
  color: #fff;
  margin: 25px 0;
}
.login-hero p {
  color: #b9cdbd;
  max-width: 400px;
}
.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-form form {
  width: 100%;
  max-width: 360px;
}
.login-form h2 {
  font-size: 1.75rem;
  margin-bottom: 10px;
}
.login-form button {
  width: 100%;
  margin-top: 7px;
}
.hexagons {
  font-size: 4rem;
  letter-spacing: 15px;
  color: #edc36a;
  line-height: 1;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
th,
td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.varroa-image {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  background: #f0f2ee;
  border-radius: 8px;
  display: block;
}
.image-wrap {
  position: relative;
}
.image-wrap svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.varroa-card .count {
  font-size: 2rem;
  margin: 14px 0;
}
.varroa-card .count small {
  font-size: 0.875rem;
  color: var(--muted);
}
.varroa-card details {
  font-size: 0.875rem;
  margin-top: 16px;
  line-height: 1.6;
}
.varroa-card summary {
  cursor: pointer;
}
.varroa-card details ul {
  padding-left: 20px;
}
.loading {
  padding: 80px;
  text-align: center;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  padding: 13px 22px;
  background: var(--green);
  color: white;
  border-radius: 8px;
  box-shadow: 0 5px 30px #0002;
  z-index: 5;
  display: none;
  max-width: 90vw;
  font-size: 0.875rem;
}
.acoustic {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 17px;
  margin-top: 18px;
  font-size: 0.875rem;
}
.apiary-location {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 16px 0;
  line-height: 1.7;
}
.full {
  grid-column: 1/-1;
}
.warning-text {
  color: var(--danger);
}
.help-link {
  color: #406950;
}
.checkbox-label {
  display: flex;
  align-items: center;
}
.page-error {
  padding: 35px;
}
.trend-bars {
  display: flex;
  gap: 12px;
  align-items: end;
  min-height: 110px;
  padding: 16px 0;
}
.trend-column {
  flex: 1;
  text-align: center;
  min-width: 28px;
}
.trend-column .bar {
  background: #789775;
  min-height: 3px;
  border-radius: 4px 4px 0 0;
}
.trend-column small {
  font-size: 0.75rem;
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.trend-column strong {
  font-size: 0.8rem;
  display: block;
  margin-bottom: 5px;
}
@media (min-width: 1500px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding: 30px 15px;
  }
  .content {
    padding: 28px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 12px;
  }
  .stat {
    padding: 18px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }
  .brand {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }
  .brand .mark {
    font-size: 1.6rem;
  }
  .sidebar > .eyebrow,
  .sidebar footer {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 4px;
  }
  .sidebar a {
    padding: 10px 12px;
    font-size: 0.875rem;
    white-space: nowrap;
  }
  .sidebar a .nav-icon {
    display: none;
  }
  .topbar {
    height: 55px;
    padding: 0 18px;
  }
  .content {
    padding: 24px 16px;
  }
  .heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .heading h1 {
    font-size: 1.7rem;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .stat strong {
    font-size: 1.6rem;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 19px;
  }
  .two-col {
    gap: 0;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-hero {
    padding: 32px;
  }
  .login-hero .brand {
    margin: 0;
  }
  .login-hero h1 {
    font-size: 2rem;
    margin: 20px 0 0;
  }
  .login-hero p,
  .hexagons {
    display: none;
  }
  .login-form {
    padding: 35px 24px;
  }
  .card-foot {
    flex-wrap: wrap;
  }
  .chart {
    height: 210px;
  }
  .topbar time {
    display: none;
  }
  .detail-meta {
    grid-template-columns: 1fr;
  }
  .toolbar {
    align-items: stretch;
  }
  .toolbar select {
    width: 100%;
  }
  dialog {
    padding: 22px;
  }
}
