:root{
  --bg:#eef2f5;
  --card:#fff;
  --text:#111;
  --muted:#6b7280;
  --line:#e5e7eb;
  --shadow:0 10px 28px rgba(0,0,0,.08);
  --r:14px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}

.topbar{
  position:sticky; top:0;
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 18px;
  background:#fff;
  border-bottom:1px solid var(--line);
}
.brand{font-weight:800}
.hint{color:var(--muted); font-size:13px}

.wrap{max-width:1100px; margin:22px auto; padding:0 16px;}
.twoCol{display:grid; grid-template-columns: 1.25fr .9fr; gap:16px}
@media (max-width: 980px){ .twoCol{grid-template-columns:1fr} }

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--r);
  box-shadow:var(--shadow);
  padding:18px;
}

.row{display:flex; justify-content:space-between; align-items:center; gap:12px}
.gap{gap:10px}
.h1{margin:0; font-size:22px}
.h2{margin:0 0 12px; font-size:18px}
.pill{
  font-size:13px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--muted);
}

.controls{display:flex; gap:10px; flex-wrap:wrap; margin:14px 0 16px}
.btn{
  border:1px solid var(--line);
  background:#f3f4f6;
  border-radius:10px;
  padding:10px 14px;
  cursor:pointer;
  font-weight:700;
}
.btn:hover{filter:brightness(.98)}
.btn.active{background:#000; color:#fff; border-color:#000}
.btn.danger{
  background:#fff5f5;
  color:#b91c1c;
  border-color:#b91c1c;
  font-weight:800;
}
#openDeadoutBtn,
#deadoutSubmitBtn{
  color:#b91c1c !important;
  border:2px solid #b91c1c !important;
  font-weight:800 !important;
}
.btn.small{padding:8px 10px; border-radius:10px; font-weight:700}
.btn.ghost{background:#fff}
.tabs{display:flex; gap:10px; flex-wrap:wrap}
.tab-panel{margin-top:12px}
.tab-panel.hidden{display:none !important}

.calendar{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:10px;
}
.tile{
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  min-height:88px;
  background:#fff;
}
.tile--interactive{cursor:pointer}
.tile--interactive:hover{transform:translateY(-1px); box-shadow:var(--shadow)}
.tile .d{font-weight:800; font-size:12px; color:var(--muted)}
.tile .k{margin-top:6px; font-weight:800}
.tile .v{margin-top:4px; color:var(--muted); font-size:12px; line-height:1.25}
.tile__hint{display:inline-block; margin-top:4px; font-size:11px; font-weight:700; color:#111}
.tile.good{outline:2px solid rgba(16,185,129,.25)}
.tile.warn{outline:2px solid rgba(245,158,11,.25)}
.tile.bad{outline:2px solid rgba(239,68,68,.25)}

.legend{
  margin-top:12px;
  color:var(--muted);
  font-size:13px;
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

.range-disclaimer{
  margin-top:10px;
  color:#92400e;
  background:#fffbeb;
  border:1px solid #fde68a;
  padding:8px 10px;
  border-radius:10px;
  font-size:12px;
}
.warning-box{
  margin-top:14px;
  color:#92400e;
  background:#fffbeb;
  border:1px solid #f59e0b;
  padding:10px 12px;
  border-radius:12px;
  font-size:13px;
}
.toggle-row{display:flex; align-items:center; gap:10px; margin-top:10px}
.toggle-row input{transform:scale(1.1)}
.dot{display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:-1px}
.dot.good{background:rgba(16,185,129,.35)}
.dot.warn{background:rgba(245,158,11,.35)}
.dot.bad{background:rgba(239,68,68,.35)}

.field{display:flex; flex-direction:column; gap:6px; margin:10px 0}
.field span{font-size:12px; color:var(--muted); font-weight:800}
.field input,.field select{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:12px}
@media (max-width: 680px){ .grid2{grid-template-columns:1fr} }

.hidden{display:none !important}

.authcard{margin-bottom:16px}
.authcard--hero{
  max-width:1100px;
  margin:0 auto 16px;
  background:linear-gradient(135deg, #fff 0%, #f6f8ea 100%);
}
.authrow{align-items:flex-end; flex-wrap:wrap}
.authactions{flex-wrap:wrap; justify-content:flex-end}
.authmeta{color:var(--muted); font-size:14px}
.authremember{
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}
.authremember input{
  margin:0;
}
.authinput{
  min-width:180px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
}
.authhint{
  margin-top:10px;
  color:var(--muted);
  font-size:13px;
}
.legal-card{
  margin-bottom:16px;
  border-color:#f59e0b;
  background:#fffbeb;
}
.legal-copy{
  color:#92400e;
  font-size:13px;
  line-height:1.5;
  margin-top:8px;
}
.legal-copy:first-of-type{
  margin-top:0;
}
.buildmeta{
  margin-top:12px;
  text-align:center;
  font-weight:800;
  color:#78350f;
}

.saved-apiaries-empty{
  margin-top:12px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  color:var(--muted);
}

.saved-apiaries{
  display:grid;
  gap:12px;
  margin-top:12px;
}

.saved-apiary{
  border:1px solid var(--line);
  border-radius:12px;
  padding:14px;
  background:#fff;
}

.saved-apiary__head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:10px;
  flex-wrap:wrap;
}

.saved-apiary__title{
  font-size:16px;
  font-weight:800;
}

.saved-apiary__meta{
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
  white-space:pre-line;
}

.station-card{
  margin-top:18px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:linear-gradient(180deg, #fcfdf7 0%, #f7fafc 100%);
}

.station-card__head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.station-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
  margin-top:14px;
}

.station-metric{
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  padding:12px;
}

.station-metric__label{
  display:block;
  color:var(--muted);
  font-size:12px;
  margin-bottom:6px;
}

.station-card__meta{
  margin-top:12px;
  color:var(--muted);
  font-size:13px;
}

.ai-actions{
  margin-top:12px;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}

.day-pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:6px;
}

.day-pill{
  cursor:pointer;
  user-select:none;
}

.day-pill.active{
  background:#111;
  color:#fff;
  border-color:#111;
}

.overview-body{
  margin-top:16px;
  display:grid;
  gap:10px;
}

.overview-summary{
  margin-top:12px;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}

.overview-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  flex-wrap:wrap;
}

.overview-title{
  font-weight:800;
}

.overview-meta{
  color:var(--muted);
  font-size:13px;
}

.overview-meta.why{
  margin-top:4px;
  color:#374151;
}

.overview-badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.badge{
  font-size:12px;
  font-weight:800;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--line);
  color:#111;
}

.badge.good{background:rgba(16,185,129,.12)}
.badge.warn{background:rgba(245,158,11,.12)}
.badge.bad{background:rgba(239,68,68,.12)}

.table-wrap{
  width:100%;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:12px;
}

.table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}

.table th,
.table td{
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  text-align:left;
  white-space:nowrap;
}

.table th{
  background:#f8fafc;
  font-weight:800;
  font-size:12px;
  color:#374151;
}

.trend-wrap{
  margin-top:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  padding:12px;
}

.trend-svg{
  width:100%;
  height:180px;
  display:block;
}

.trend-legend{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:8px;
  font-size:12px;
  color:var(--muted);
}

.trend-subtitle{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  font-weight:700;
}

.hive-checklist{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
  gap:8px;
  margin-top:8px;
}

.hive-check{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
}

.deadout-note{
  margin-top:10px;
  color:#7f1d1d;
  font-size:13px;
  line-height:1.45;
}

.trend-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  display:inline-block;
  margin-right:6px;
}

.rec-list{display:grid; gap:10px; margin-top:10px}
.rec-card{
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  display:flex;
  gap:12px;
  align-items:flex-start;
  background:#fff;
}
.rec-card input{margin-top:4px}
.rec-card.safe{border-color:#86efac; background:#f0fdf4}
.rec-card.caution{border-color:#fde68a; background:#fffbeb}
.rec-card.block{border-color:#fecaca; background:#fef2f2}
.rec-title{font-weight:800}
.rec-meta{color:var(--muted); font-size:12px; margin-top:4px}

.modal{
  position:fixed;
  inset:0;
  z-index:1100;
}

.modal__scrim{
  position:absolute;
  inset:0;
  background:rgba(15, 23, 42, .45);
}

.modal__card{
  position:relative;
  width:min(680px, calc(100vw - 32px));
  margin:60px auto;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:18px;
}

.inspect-modal__summary{
  margin-top:14px;
  font-size:16px;
  font-weight:700;
}

.inspect-modal__conditions{
  margin-top:10px;
  color:var(--muted);
  font-size:14px;
}

.inspect-modal__windows{
  display:grid;
  gap:10px;
  margin-top:16px;
}

.inspect-window{
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  background:#fafaf8;
}

.inspect-window__label{
  font-size:12px;
  font-weight:800;
  color:var(--muted);
}

.inspect-window__time{
  margin-top:6px;
  font-size:18px;
  font-weight:800;
}

.inspect-window__detail{
  margin-top:4px;
  color:var(--muted);
  font-size:13px;
}

.inspect-modal__notes{
  margin-top:16px;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

@media (max-width: 780px){
  .station-grid{grid-template-columns:1fr 1fr}
  .modal__card{margin:24px auto}
}

.suggestions{
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  box-shadow:var(--shadow);
  overflow:hidden;
}

.suggestion{
  width:100%;
  border:0;
  background:#fff;
  text-align:left;
  padding:10px 12px;
  cursor:pointer;
  border-bottom:1px solid var(--line);
}

.suggestion:last-child{
  border-bottom:0;
}

.suggestion:hover{
  background:#f8fafc;
}

.suggestion__title{
  font-weight:700;
}

.suggestion__meta{
  color:var(--muted);
  font-size:12px;
  margin-top:2px;
}

.log{
  margin:12px 0 0;
  padding:12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#0b1020;
  color:#d1d5db;
  overflow:auto;
  min-height:140px;
}

/* Hidden dev panel overlay for main page */
.devpanel{
  position:fixed;
  right:16px;
  bottom:16px;
  width:min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 110px);
  overflow:auto;
  z-index:999;
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:var(--shadow);
}
.devpanel.hidden{display:none}
.devpanel__head{
  display:flex; justify-content:space-between; align-items:center;
  padding:20px 0px;
  border-bottom:1px solid var(--line);
}
.devpanel__body{padding:12px}

/* Centered logo header */

/* Clean floating logo header */

.topbar.centered {
  position: relative;
  background: transparent;
  border-bottom: none;
  padding: 50px 0 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  height: 340px;
  width: auto;
  display: block;
  background: transparent;
}

@media (max-width: 768px) {
  .logo {
    height: 230px;
  }
}

.hc-toast{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:1200;
  max-width:min(420px, calc(100vw - 36px));
  padding:11px 13px;
  border-radius:12px;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  background:#111827;
  color:#f9fafb;
  font-size:13px;
  font-weight:700;
  line-height:1.35;
}

.hc-toast--success{
  background:#064e3b;
  border-color:#10b981;
  color:#ecfdf5;
}

.hc-toast--error{
  background:#7f1d1d;
  border-color:#ef4444;
  color:#fef2f2;
}

.hc-toast--warn{
  background:#78350f;
  border-color:#f59e0b;
  color:#fffbeb;
}

.hc-toast--info{
  background:#1f2937;
  border-color:#60a5fa;
  color:#eff6ff;
}
