:root{
  --bg:#f5f1e7;
  --card:rgba(255,253,247,.05);
  --text:#172117;
  --muted:#667060;
  --line:#e2dccb;
  --accent:#d89422;
  --accent-dark:#6b4a0f;
  --accent-soft:#fff4cf;
  --green:#2f7d4b;
  --green-soft:#edf7ed;
  --shadow:0 12px 30px rgba(88,64,25,.10);
  --r:14px;
}

*{box-sizing:border-box}
body{
  margin:0;
  min-height:100vh;
  position:relative;
  overflow-x:hidden;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  background:
    radial-gradient(circle at 50% 0%, rgba(216,148,34,.16), transparent 340px),
    linear-gradient(180deg, #fbf7ed 0%, var(--bg) 44%, #eef3ea 100%);
  color:var(--text);
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background-image:url("assets/hivecast-background.png");
  background-repeat:no-repeat;
  background-position:center top;
  background-size:100% auto;
  opacity:.88;
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,253,247,.56), rgba(255,253,247,.22) 34%, rgba(245,241,231,.08) 62%),
    linear-gradient(180deg, rgba(251,247,237,.2) 0%, rgba(238,243,234,.28) 100%);
}

body > *{
  position:relative;
  z-index:2;
}

.flowering-page .flowering-wrap{
  width:min(96vw, 1280px);
}

.flowering-title-row,
.flowering-actions,
.flowering-tabs{
  flex-wrap:wrap;
}

.developer-corner-btn{
  position:absolute;
  top:12px;
  right:14px;
  border:1px solid rgba(47,125,75,.28);
  border-radius:8px;
  background:rgba(237,247,237,.9);
  color:#1f5133;
  font-weight:800;
  padding:8px 12px;
  cursor:pointer;
  box-shadow:var(--shadow);
}

.developer-corner-btn:hover,
.developer-corner-btn:focus{
  border-color:rgba(47,125,75,.55);
  background:#edf7ed;
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.pressure-map-page{
  background:
    radial-gradient(circle at 50% 0%, rgba(216,148,34,.14), transparent 340px),
    linear-gradient(180deg, #fbf7ed 0%, #f5f1e7 48%, #eef3ea 100%);
}

.pressure-map-page::before,
.pressure-map-page::after{
  display:none;
}

.pressure-map-app{
  width:min(100vw, 1920px);
  margin:0 auto;
  padding:0 18px 18px;
}

.pressure-auth-panel{
  max-width:1180px;
  margin:0 auto 12px;
}

.pressure-shell{
  margin:0 auto;
  max-width:1600px;
}

.pressure-map-frame{
  position:relative;
  height:calc(100vh - 180px);
  min-height:640px;
  border:1px solid rgba(226,220,203,.9);
  border-radius:8px;
  overflow:hidden;
  background:#edf3ea;
  box-shadow:0 18px 42px rgba(88,64,25,.14);
}

.pressure-controls{
  display:flex;
  gap:10px;
  align-items:flex-end;
  flex-wrap:wrap;
}

.pressure-map{
  position:relative;
  height:100%;
  min-height:100%;
  margin-top:0;
  border:0;
  border-radius:0;
  overflow:hidden;
  background:
    radial-gradient(circle at 30% 30%, rgba(142,190,198,.42), transparent 38%),
    linear-gradient(135deg, #dce9df, #eef3ea 55%, #f5f1e7);
}

.pressure-map::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size:10% 12.5%;
  z-index:1;
}

.pressure-map__empty{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:18px;
  text-align:center;
  color:var(--muted);
  font-weight:700;
}

.pressure-cell{
  position:absolute;
  width:48px;
  height:42px;
  border:0;
  transform:translate(-50%, -50%);
  clip-path:polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
  opacity:.82;
  cursor:pointer;
}

.pressure-cell.low{background:rgba(72,198,176,.44)}
.pressure-cell.elevated{background:rgba(255,236,164,.68)}
.pressure-cell.high{background:rgba(254,202,202,.78)}
.pressure-cell.biosecurity{background:rgba(180,83,9,.82)}
.pressure-cell.insufficient{background:rgba(226,220,203,.06)}

.pressure-cell:hover,
.pressure-cell:focus{
  outline:2px solid rgba(23,33,23,.35);
  opacity:1;
}

.pressure-stat-grid{
  display:none;
}

.pressure-stat{
  border:1px solid var(--line);
  border-radius:8px;
  background:#fffdf7;
  padding:10px 12px;
}

.pressure-stat span{
  display:block;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}

.pressure-stat strong{
  display:block;
  margin-top:4px;
  font-size:22px;
}

.pressure-legend{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:13px;
}

.pressure-map-brand{
  position:absolute;
  z-index:700;
  top:16px;
  left:50%;
  transform:translateX(-50%);
  color:#fff;
  text-shadow:0 2px 8px rgba(0,0,0,.52);
  display:flex;
  gap:8px;
  align-items:baseline;
  font-size:20px;
}

.pressure-map-brand span{
  font-size:13px;
  color:rgba(255,255,255,.72);
}

.pressure-map-topbar{
  position:absolute;
  z-index:710;
  top:14px;
  left:14px;
  right:260px;
  display:flex;
  gap:10px;
  align-items:flex-start;
}

.pressure-search input{
  width:min(360px, 36vw);
  height:44px;
  border:1px solid rgba(255,255,255,.45);
  border-radius:999px;
  background:rgba(255,255,255,.92);
  color:#172117;
  padding:0 18px;
  font-size:15px;
  box-shadow:0 8px 22px rgba(0,0,0,.28);
}

.pressure-map-topbar .pressure-controls{
  padding:8px;
  border-radius:8px;
  background:rgba(19,24,22,.58);
  border:1px solid rgba(255,255,255,.16);
  backdrop-filter:blur(10px);
}

.pressure-map-topbar .field span{
  color:rgba(255,255,255,.76);
}

.pressure-map-topbar select,
.pressure-map-topbar .btn{
  min-height:34px;
}

.pressure-map-stats{
  position:absolute;
  z-index:705;
  left:14px;
  bottom:66px;
  display:grid;
  grid-template-columns:repeat(4,minmax(88px,1fr));
  gap:8px;
  width:min(520px, calc(100% - 420px));
}

.pressure-map-stats div{
  border:1px solid rgba(255,255,255,.16);
  border-radius:8px;
  background:rgba(19,24,22,.66);
  color:#fff;
  padding:9px 10px;
  box-shadow:0 8px 22px rgba(0,0,0,.22);
  backdrop-filter:blur(10px);
}

.pressure-map-stats span{
  display:block;
  font-size:11px;
  color:rgba(255,255,255,.68);
  font-weight:800;
}

.pressure-map-stats strong{
  display:block;
  margin-top:3px;
  font-size:19px;
}

.pressure-map-status{
  position:absolute;
  z-index:706;
  left:14px;
  bottom:18px;
  max-width:min(620px, calc(100% - 430px));
  border:1px solid rgba(255,255,255,.16);
  border-radius:8px;
  background:rgba(19,24,22,.66);
  color:rgba(255,255,255,.82);
  padding:8px 10px;
  font-size:12px;
  font-weight:700;
  line-height:1.35;
  box-shadow:0 8px 22px rgba(0,0,0,.22);
  backdrop-filter:blur(10px);
}

.pressure-detail-panel{
  position:absolute;
  z-index:720;
  right:14px;
  bottom:66px;
  width:min(380px, calc(100vw - 42px));
  max-height:230px;
  overflow:auto;
  border:1px solid rgba(255,255,255,.16);
  border-radius:8px;
  background:rgba(19,24,22,.76);
  color:#fff;
  padding:14px;
  box-shadow:0 14px 34px rgba(0,0,0,.34);
  backdrop-filter:blur(12px);
}

.pressure-detail__head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-weight:800;
}

.pressure-detail__meta{
  margin-top:6px;
  color:rgba(255,255,255,.76);
  font-size:13px;
  line-height:1.4;
}

.pressure-detail__meta ul{
  margin:8px 0 0;
  padding-left:18px;
}

.pressure-map-legend{
  position:absolute;
  z-index:710;
  right:14px;
  bottom:18px;
  padding:8px 10px;
  border-radius:999px;
  background:rgba(19,24,22,.64);
  color:rgba(255,255,255,.82);
  border:1px solid rgba(255,255,255,.16);
  backdrop-filter:blur(10px);
}

.pressure-timeline{
  position:absolute;
  z-index:710;
  left:14px;
  right:430px;
  bottom:18px;
  display:grid;
  grid-template-columns:repeat(3, minmax(88px, 1fr));
  border:1px solid rgba(255,255,255,.18);
  border-radius:8px;
  overflow:hidden;
  background:rgba(19,24,22,.58);
  backdrop-filter:blur(10px);
}

.pressure-timeline button{
  border:0;
  border-right:1px solid rgba(255,255,255,.16);
  background:transparent;
  color:rgba(255,255,255,.72);
  padding:10px;
  font-weight:800;
  cursor:pointer;
}

.pressure-timeline button:last-child{
  border-right:0;
}

.pressure-timeline button.active{
  color:#172117;
  background:rgba(255,199,95,.92);
}

.leaflet-container{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}

.pressure-leaflet-cell{
  transition:fill-opacity .16s ease, opacity .16s ease;
}

.pressure-leaflet-cell:hover{
  fill-opacity:.78;
}

@media (max-width: 820px){
  .pressure-map-app{
    padding:0 8px 10px;
  }

  .pressure-map-frame{
    height:calc(100vh - 150px);
    min-height:560px;
  }

  .pressure-map-topbar{
    right:14px;
    flex-direction:column;
  }

  .pressure-search input{
    width:calc(100vw - 44px);
  }

  .pressure-map-stats{
    grid-template-columns:repeat(2, minmax(88px, 1fr));
    width:calc(100% - 28px);
    bottom:118px;
  }

  .pressure-detail-panel{
    left:14px;
    right:14px;
    bottom:56px;
    width:auto;
    max-height:120px;
  }

  .pressure-timeline{
    right:14px;
  }

  .pressure-map-status{
    display:none;
  }

  .pressure-map-legend{
    display:none;
  }
}

.pressure-legend span{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.pressure-legend i{
  width:10px;
  height:10px;
  border-radius:50%;
  display:inline-block;
}

.pressure-legend .low{background:#48c6b0}
.pressure-legend .elevated{background:#ffeca4}
.pressure-legend .high{background:#fecaca}
.pressure-legend .biosecurity{background:#b45309}
.pressure-legend .insufficient{background:#e2dccb}

.flowering-panel{
  margin-top:16px;
}

.flowering-tabs{
  margin-top:16px;
  gap:8px;
}

.flowering-filters{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  margin:14px 0;
}

.flowering-glossary-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
  margin-top:14px;
}

.flowering-now-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin-top:14px;
}

.flowering-next-list{
  display:grid;
  gap:8px;
  margin-top:14px;
}

.flowering-next-item{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(255,253,247,.78);
  cursor:pointer;
  transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.flowering-next-item:hover,
.flowering-next-item:focus{
  transform:translateY(-1px);
  border-color:rgba(47,125,75,.35);
  box-shadow:0 8px 18px rgba(88,64,25,.1);
  outline:none;
}

.flowering-next-item h3{
  margin:0;
  font-size:17px;
}

.flowering-next-item strong{
  flex:0 0 auto;
  white-space:nowrap;
  padding:5px 8px;
  border-radius:999px;
  background:#fff8df;
  border:1px solid rgba(107,74,15,.16);
  color:#5f4614;
  font-size:12px;
}

.flowering-plant-card{
  display:grid;
  grid-template-columns:170px minmax(0, 1fr);
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(255,253,247,.76);
  box-shadow:0 8px 22px rgba(88,64,25,.08);
}

.flowering-plant-card--compact{
  grid-template-columns:140px minmax(0, 1fr);
}

.flowering-plant-card--now{
  display:block;
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.flowering-plant-card--now .flowering-plant-body{
  padding:12px 14px;
}

.flowering-plant-card--now:hover,
.flowering-plant-card--now:focus{
  transform:translateY(-1px);
  border-color:rgba(47,125,75,.35);
  box-shadow:0 10px 24px rgba(88,64,25,.12);
  outline:none;
}

.flowering-plant-card--now h3{
  margin-bottom:2px;
}

.flowering-now-title{
  display:flex;
  align-items:center;
  gap:8px;
}

.flowering-forage-symbol{
  width:22px;
  height:22px;
  flex:0 0 22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid rgba(31,41,55,.12);
  font-size:14px;
  line-height:1;
  font-weight:900;
  background:#f3f4f6;
  color:#4b5563;
}

.flowering-forage-symbol--nectar{
  background:#fef3c7;
  border-color:#facc15;
  color:#a16207;
}

.flowering-forage-symbol--pollen{
  background:#ffe4e6;
  border-color:#fb7185;
  color:#be123c;
}

.flowering-forage-symbol--both{
  background:#dcfce7;
  border-color:#22c55e;
  color:#15803d;
}

.flowering-forage-key{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}

.flowering-forage-key span{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.flowering-forage-key .flowering-forage-symbol{
  width:18px;
  height:18px;
  flex-basis:18px;
  font-size:11px;
}

.flowering-plant-card--now .flowering-report-signal{
  width:auto;
  margin-top:8px;
}

.flowering-plant-card--modal{
  margin-top:14px;
  box-shadow:none;
}

.flowering-photo-strip{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(96px, 1fr));
  gap:10px;
  margin-top:14px;
}

.flowering-photo-strip figure{
  min-width:0;
  margin:0;
}

.flowering-photo-strip img{
  display:block;
  width:100%;
  aspect-ratio:1;
  min-height:0;
  height:auto;
  border-radius:8px;
  border:1px solid rgba(88,64,25,.16);
  object-fit:cover;
}

.flowering-photo-strip figcaption{
  margin-top:5px;
  color:var(--muted);
  font-size:12px;
  line-height:1.25;
}

.flowering-plant-modal__panel{
  width:min(760px, calc(100vw - 32px));
}

.flowering-plant-card--now .flowering-value-row,
.flowering-plant-card--now .flowering-colour-row{
  gap:6px;
}

.flowering-plant-card--now .flowering-value-row span,
.flowering-plant-card--now .flowering-colour-row span{
  padding:4px 7px;
}

.flowering-plant-card img{
  width:100%;
  height:100%;
  min-height:190px;
  object-fit:cover;
  background:#f8f3e6;
}

.flowering-plant-body{
  min-width:0;
  padding:14px;
}

.flowering-plant-body h3{
  margin:0;
  font-size:18px;
  line-height:1.2;
}

.flowering-science{
  margin-top:3px;
  color:var(--muted);
  font-size:13px;
  font-style:italic;
}

.flowering-confidence{
  flex:0 0 auto;
  min-width:54px;
  padding:7px 9px;
  border-radius:999px;
  background:#edf7ed;
  color:#1f6b3c;
  border:1px solid rgba(47,125,75,.24);
  font-weight:800;
  text-align:center;
}

.flowering-value-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.flowering-value-row span{
  padding:5px 8px;
  border:1px solid rgba(107,74,15,.16);
  border-radius:999px;
  background:#fff8df;
  color:#4b3a13;
  font-size:12px;
}

.flowering-colour-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}

.flowering-colour-row span{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 8px;
  border:1px solid rgba(47,125,75,.16);
  border-radius:999px;
  background:rgba(237,247,237,.7);
  color:#33412f;
  font-size:12px;
}

.flowering-swatch{
  display:inline-block;
  width:14px;
  height:14px;
  border-radius:999px;
  border:1px solid rgba(88,64,25,.24);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.5);
}

.flowering-swatch--pollen{
  background:linear-gradient(135deg, #fff3b0, #e5a42b);
}

.flowering-swatch--honey{
  background:linear-gradient(135deg, #ffe08a, #b36a16);
}

.flowering-window{
  margin-top:10px;
  color:#33412f;
  font-size:13px;
  font-weight:700;
}

.flowering-plant-body p{
  margin:10px 0 0;
  color:#33412f;
  line-height:1.45;
}

.flowering-description{
  color:var(--muted) !important;
  font-size:13px;
}

.flowering-empty{
  grid-column:1 / -1;
  padding:18px;
  border:1px dashed rgba(107,74,15,.32);
  border-radius:8px;
  background:rgba(255,253,247,.68);
  color:#4b5563;
}

.flowering-form{
  margin-top:12px;
}

.flowering-report-plant-value{
  grid-column:1 / -1;
  padding:12px;
  border:1px solid rgba(47,125,75,.24);
  border-radius:8px;
  background:rgba(237,247,237,.72);
}

.flowering-report-plant-value > div:first-child{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:baseline;
}

.flowering-report-plant-value > div:first-child span{
  color:var(--muted);
  font-style:italic;
  font-size:13px;
}

.flowering-report-plant-suggestions{
  grid-column:1 / -1;
}

.flowering-reports-card{
  margin-top:16px;
  background:rgba(255,253,247,.72);
}

.flowering-report-list{
  display:grid;
  gap:8px;
  margin-top:12px;
}

.flowering-report-item{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  padding:10px;
  border:1px solid rgba(47,125,75,.18);
  border-radius:8px;
  background:#fffdf7;
}

.flowering-report-item span{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
}

.flowering-report-tags{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:6px;
}

.flowering-report-tags span,
.flowering-report-signal{
  display:inline-flex;
  align-items:center;
  padding:5px 8px;
  border:1px solid rgba(47,125,75,.2);
  border-radius:999px;
  background:rgba(237,247,237,.82);
  color:#1f6b3c;
  font-size:12px;
  font-weight:800;
}

.flowering-report-signal{
  display:flex;
  width:100%;
  margin-top:10px;
  border-radius:8px;
  line-height:1.35;
}

.flowering-admin-cards{
  display:grid;
  grid-template-columns:repeat(6, minmax(0, 1fr));
  gap:10px;
  margin:14px 0;
}

.admin-flowering-switch{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
  margin:14px 0;
}

.admin-flowering-frame{
  width:100%;
  min-height:1180px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fffdf7;
}

.admin-wrap{
  max-width:1400px;
}

.flowering-reports-table{
  min-width:1120px;
}

.flowering-season-summary{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(130px, 1fr));
  gap:10px;
  margin-top:14px;
}

.flowering-season-card{
  padding:12px;
  border:1px solid rgba(47,125,75,.18);
  border-radius:8px;
  background:rgba(237,247,237,.72);
}

.flowering-season-card span{
  display:block;
  color:var(--muted);
  font-size:12px;
}

.flowering-season-card strong{
  display:block;
  margin-top:5px;
  color:#172117;
  font-size:18px;
}

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

.flowering-season-month-group{
  padding:12px;
  border:1px solid rgba(47,125,75,.18);
  border-radius:8px;
  background:rgba(255,255,255,.74);
}

.flowering-season-month-group strong{
  display:block;
  color:#172117;
  margin-bottom:8px;
}

.flowering-season-month-group div{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:6px;
}

.flowering-season-month-group span{
  display:block;
  text-align:center;
  border:1px solid rgba(47,125,75,.14);
  border-radius:999px;
  padding:5px 6px;
  color:var(--muted);
  font-size:12px;
  background:#fff;
}

.flowering-season-month-group span.active{
  color:#fff;
  font-weight:800;
}

.flowering-season-month-group--summer span.active{
  border-color:#b93b32;
  background:#b93b32;
}

.flowering-season-month-group--autumn span.active{
  border-color:#c46f22;
  background:#c46f22;
}

.flowering-season-month-group--winter span.active{
  border-color:#28799a;
  background:#28799a;
}

.flowering-season-month-group--spring span.active{
  border-color:#2f7d4b;
  background:#2f7d4b;
}

.flowering-season-signal{
  display:grid;
  grid-template-columns:minmax(190px, 240px) minmax(0, 1fr);
  gap:18px;
  align-items:center;
  margin-top:14px;
  padding:14px;
  border:1px solid rgba(107,74,15,.16);
  border-radius:8px;
  background:rgba(255,253,247,.76);
}

.flowering-season-signal-head{
  color:#172117;
}

.flowering-season-signal-head span{
  display:block;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.flowering-season-signal-head strong{
  display:block;
  margin-top:5px;
  color:#172117;
  font-size:22px;
  font-weight:800;
}

.flowering-season-signal-head p{
  margin:6px 0 0;
  color:#33412f;
  font-size:13px;
}

.flowering-season-signal-head .flowering-trigger-title{
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.flowering-trigger-help-btn{
  width:22px;
  height:22px;
  font-size:12px;
}

.flowering-trigger-help{
  margin:8px 0 0;
}

.flowering-season-bars{
  display:grid;
  gap:9px;
}

.flowering-season-bar{
  display:grid;
  grid-template-columns:74px minmax(0, 1fr) 42px;
  gap:10px;
  align-items:center;
  color:#33412f;
  font-size:12px;
  font-weight:800;
}

.flowering-season-bar i{
  display:block;
  height:10px;
  border-radius:999px;
  background:#2f7d4b;
}

.flowering-season-bar b{
  text-align:right;
  color:var(--muted);
  font-size:12px;
}

.flowering-season-bar--summer i{background:#b93b32}
.flowering-season-bar--autumn i{background:#c46f22}
.flowering-season-bar--winter i{background:#28799a}
.flowering-season-bar--spring i{background:#2f7d4b}

.flowering-season-reason{
  margin:4px 0 0;
  color:#33412f;
  font-size:13px;
  line-height:1.45;
}

.flowering-trigger-watch{
  display:grid;
  grid-template-columns:minmax(190px, 240px) minmax(0, 1fr);
  gap:18px;
  align-items:start;
  margin-top:14px;
  padding:14px;
  border:1px solid rgba(40,121,154,.18);
  border-radius:8px;
  background:rgba(246,251,253,.86);
}

.flowering-trigger-list{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:10px;
}

.flowering-trigger-item{
  border:1px solid rgba(40,121,154,.2);
  border-radius:8px;
  padding:10px;
  background:#fff;
  color:#172117;
  text-align:left;
  cursor:pointer;
}

.flowering-trigger-item b,
.flowering-trigger-item span{
  display:block;
}

.flowering-trigger-item span{
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

.flowering-admin-card{
  min-height:72px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fffdf7;
  color:#172117;
  font-weight:800;
  text-align:left;
  cursor:pointer;
}

.flowering-admin-card.active{
  border-color:#2f7d4b;
  box-shadow:0 0 0 2px rgba(47,125,75,.12);
}

.flowering-admin-embed{
  background:#fffdf7;
}

.flowering-admin-embed::before,
.flowering-admin-embed::after,
.flowering-admin-embed .topbar,
.flowering-admin-embed .authcard,
.flowering-admin-embed .flowering-title-row,
.flowering-admin-embed .flowering-tabs{
  display:none !important;
}

.flowering-admin-embed .flowering-wrap{
  width:100%;
  max-width:none;
  padding:0;
}

.flowering-admin-embed #floweringShell{
  margin:0;
  border:0;
  border-radius:0;
  box-shadow:none;
  background:#fffdf7;
}

.flowering-admin-embed #floweringAdminPanel{
  margin-top:0;
}

@media (max-width: 980px){
  .flowering-filters,
  .flowering-now-grid,
  .flowering-next-list,
  .flowering-glossary-grid,
  .flowering-season-summary,
  .flowering-season-calendar,
  .flowering-season-signal,
  .flowering-trigger-watch,
  .flowering-admin-cards,
  .admin-flowering-switch{
    grid-template-columns:1fr;
  }

  .flowering-plant-card,
  .flowering-plant-card--compact{
    grid-template-columns:1fr;
  }

  .flowering-next-item{
    display:grid;
  }

  .flowering-plant-card img{
    height:210px;
    min-height:0;
  }

  .flowering-report-item{
    flex-direction:column;
  }

  .flowering-report-tags{
    justify-content:flex-start;
  }
}

.workspace-switch{
  position:fixed;
  top:14px;
  left:50%;
  transform:translateX(-50%);
  z-index:1400;
  display:flex;
  gap:4px;
  padding:4px;
  border:1px solid rgba(107,74,15,.18);
  border-radius:999px;
  background:rgba(255,253,247,.94);
  box-shadow:0 10px 24px rgba(88,64,25,.14);
}

.workspace-switch__item{
  min-width:92px;
  padding:9px 14px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:#33412f;
  font-weight:800;
  cursor:pointer;
}

.workspace-switch__item.active{
  background:#172117;
  color:#fffdf7;
}

.workspace-switch__item:not(.active):hover{
  background:rgba(216,148,34,.14);
}

.admin-corner-btn{
  position:fixed;
  top:14px;
  left:16px;
  z-index:1402;
  min-width:92px;
  padding:10px 14px;
  border:1px solid rgba(107,74,15,.24);
  border-radius:999px;
  background:#172117;
  color:#fffdf7;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(88,64,25,.18);
}

.admin-corner-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 28px rgba(88,64,25,.24);
}

@media (max-width: 560px) {
  .admin-corner-btn{
    top:66px;
    left:12px;
    min-width:78px;
    padding:8px 11px;
  }
}

html:not(.hc-auth-ready) #authFields,
html:not(.hc-auth-ready) #signOutBtn,
.hc-auth-bootstrapping #authFields,
.hc-auth-bootstrapping #signOutBtn{
  display:none !important;
}

.topbar{
  position:sticky; top:0;
  z-index:1300;
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 18px;
  background:rgba(255,253,247,.92);
  border-bottom:1px solid var(--line);
}

.bee-reminder-btn{
  position:fixed;
  top:14px;
  right:16px;
  z-index:1302;
  width:46px;
  height:46px;
  border:1px solid rgba(107,74,15,.22);
  border-radius:999px;
  background:#fffdf7;
  box-shadow:0 10px 24px rgba(88,64,25,.18);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}

.bee-reminder-btn.has-reminders{
  border-color:rgba(220,38,38,.42);
  box-shadow:0 0 0 3px rgba(220,38,38,.12), 0 12px 28px rgba(88,64,25,.2);
}

.bee-reminder-btn__badge{
  position:absolute;
  top:-5px;
  right:-5px;
  min-width:20px;
  height:20px;
  padding:0 5px;
  border-radius:999px;
  background:#dc2626;
  color:#fff;
  border:2px solid #fffdf7;
  font-size:11px;
  line-height:16px;
  font-weight:800;
  text-align:center;
}

.bee-reminder-popover{
  position:fixed;
  top:66px;
  right:16px;
  z-index:1301;
  width:min(360px, calc(100vw - 32px));
  max-height:min(520px, calc(100vh - 86px));
  overflow:auto;
  padding:12px;
  border:1px solid rgba(107,74,15,.22);
  border-radius:12px;
  background:#fffdf7;
  box-shadow:0 18px 42px rgba(88,64,25,.2);
}

.bee-reminder-popover__head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding-bottom:10px;
  border-bottom:1px solid var(--line);
  color:#33412f;
}

.bee-reminder-popover__head span{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.bee-reminder-popover__body{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:10px;
  color:#33412f;
  font-size:13px;
  line-height:1.45;
}

.bee-reminder-popover__body > div{
  padding:10px;
  border:1px solid rgba(47,125,75,.18);
  border-radius:10px;
  background:rgba(237,247,237,.52);
}

.bee-reminder-popover .btn{
  margin-left:6px;
  margin-top:8px;
  padding:7px 10px;
  font-size:12px;
}

.bee-icon{
  position:relative;
  display:block;
  width:28px;
  height:24px;
}

.bee-icon__wing{
  position:absolute;
  top:0;
  width:13px;
  height:13px;
  border:2px solid rgba(47,125,75,.34);
  border-radius:999px 999px 999px 4px;
  background:rgba(237,247,237,.86);
}

.bee-icon__wing--left{
  left:4px;
  transform:rotate(-24deg);
}

.bee-icon__wing--right{
  right:4px;
  transform:scaleX(-1) rotate(-24deg);
}

.bee-icon__body{
  position:absolute;
  left:5px;
  right:5px;
  bottom:1px;
  height:16px;
  border-radius:999px;
  border:2px solid rgba(107,74,15,.42);
  background:
    repeating-linear-gradient(90deg, #d89422 0 5px, #172117 5px 8px, #f4c64f 8px 13px);
}

.bee-icon__body::before,
.bee-icon__body::after{
  content:"";
  position:absolute;
  top:4px;
  width:3px;
  height:3px;
  border-radius:999px;
  background:#172117;
}

.bee-icon__body::before{left:3px}
.bee-icon__body::after{right:3px}
.brand{font-weight:800}
.hint{color:var(--muted); font-size:13px}

.wrap{width:min(96vw, 1680px); max-width:none; margin:22px auto; padding:0 18px;}
.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;
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
}

section#appShell.card{
  background:transparent;
  border-color:rgba(226,220,203,.72);
  box-shadow:0 14px 34px rgba(88,64,25,.08);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}

.dashboard-action-bar{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px;
  max-width:1180px;
  margin:0 auto 18px;
}

.dashboard-action-bar .btn,
.dashboard-action-bar select{
  flex:0 0 auto;
}

#forecastPanel{
  display:flex;
  flex-direction:column;
  gap: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(--accent-dark);
  background:rgba(255,244,207,.65);
}

.controls{display:flex; gap:10px; flex-wrap:wrap; margin:14px 0 16px}
.controls-help{display:flex; align-items:center; gap:8px}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  border:1px solid rgba(107,74,15,.24);
  background:rgba(255,253,247,.92);
  color:var(--text);
  border-radius:10px;
  padding:10px 14px;
  cursor:pointer;
  font-weight:700;
  text-decoration:none;
  line-height:1.15;
  white-space:nowrap;
  box-shadow:0 5px 14px rgba(88,64,25,.12);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, filter .16s ease;
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.btn:hover{
  filter:brightness(1.01);
  transform:translateY(-1px);
  border-color:rgba(107,74,15,.38);
  box-shadow:0 9px 20px rgba(88,64,25,.18);
}
.btn.active{
  background:var(--green);
  color:#fff;
  border-color:#1f5f37;
  box-shadow:0 10px 24px rgba(47,125,75,.34);
}
.btn.danger{
  background:#fff5f5;
  color:#b91c1c;
  border-color:#b91c1c;
  font-weight:800;
}
.btn.success{
  background:var(--green);
  color:#fff;
  border-color:#1f5f37;
  box-shadow:0 10px 24px rgba(47,125,75,.26);
}
.btn.muted,
.btn:disabled{
  background:#edf0e8;
  color:#7b8275;
  border-color:#cfd6c8;
  box-shadow:none;
  cursor:not-allowed;
}
.btn:disabled:hover{
  filter:none;
  transform:none;
  box-shadow:none;
}
#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:rgba(255,253,247,.82)}
.tabs{display:flex; gap:10px; flex-wrap:wrap}
.tab-panel{margin-top:12px}
.tab-panel.hidden{display:none !important}
.field-label-row{display:flex; align-items:center; gap:8px}
.help-btn{
  width:28px;
  height:28px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fffdf7;
  color:var(--muted);
  font-weight:800;
  cursor:pointer;
  line-height:1;
  padding:0;
}
.help-btn:hover{color:var(--accent-dark); border-color:#d8b35c}
.mode-help{
  margin:-8px 0 12px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f7f4e7;
  color:#3f4b3b;
  font-size:12px;
  line-height:1.4;
}

.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:#fffdf7;
}
.tile--interactive{cursor:pointer}
.tile--interactive:hover{transform:translateY(-1px); box-shadow:var(--shadow)}
.tile--treatment-window{box-shadow:inset 0 0 0 2px rgba(14,165,233,.45)}
.tile--treatment-start{border-top:4px solid var(--accent)}
.tile--treatment-end{border-bottom:4px solid var(--accent)}
.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:var(--accent-dark)}
.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:var(--accent-dark);
  background:var(--accent-soft);
  border:1px solid #efd078;
  padding:8px 10px;
  border-radius:10px;
  font-size:12px;
}
.warning-box{
  margin-top:14px;
  color:var(--accent-dark);
  background:var(--accent-soft);
  border:1px solid var(--accent);
  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)}
.ios-toggle-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
}
.ios-switch{
  position:relative;
  display:inline-block;
  width:52px;
  height:32px;
}
.ios-switch input{
  opacity:0;
  width:0;
  height:0;
}
.ios-slider{
  position:absolute;
  inset:0;
  cursor:pointer;
  background:#d1d5db;
  border-radius:999px;
  transition:background .2s ease;
}
.ios-slider::before{
  content:"";
  position:absolute;
  height:26px;
  width:26px;
  left:3px;
  top:3px;
  background:#fff;
  border-radius:50%;
  box-shadow:0 1px 3px rgba(0,0,0,.24);
  transition:transform .2s ease;
}
.ios-switch input:checked + .ios-slider{
  background:#34c759;
}
.ios-switch input:checked + .ios-slider::before{
  transform:translateX(20px);
}
.ios-switch input:focus-visible + .ios-slider{
  outline:2px solid #2563eb;
  outline-offset:2px;
}
.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(216,148,34,.38)}
.dot.bad{background:rgba(239,68,68,.35)}
.dot.neutral{background:rgba(107,114,128,.45)}
.system-note{
  margin-top:12px;
  padding:12px 14px;
  border:1px solid #e9c982;
  background:#fff7e6;
  border-radius:12px;
  color:#6b4f1f;
}
.system-note--neutral{
  border-color:#cfd8e3;
  background:#f7fafc;
  color:#334155;
}
.system-note__title{
  font-weight:800;
  margin-bottom:6px;
}
.system-note__body{
  line-height:1.45;
}

.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:#fffdf7;
}
.field textarea{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#fffdf7;
  font:inherit;
  resize:vertical;
  min-height:120px;
}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.flowering-location-fields{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
  align-items:end;
}
.stack{display:grid; gap:12px}
@media (max-width: 680px){
  .grid2,
  .flowering-location-fields,
  .field-report-location-row{grid-template-columns:1fr}

  .field-report-location-or{
    justify-self:start;
    min-width:0;
  }
}

.hidden{display:none !important}

.authcard{margin-bottom:16px}
.authcard--hero{
  max-width:1100px;
  margin:0 auto 16px;
  border-color:rgba(107,74,15,.16);
  background:
    linear-gradient(135deg, rgba(255,253,247,.92) 0%, rgba(255,248,225,.88) 58%, rgba(239,248,238,.9) 100%);
  box-shadow:0 18px 42px rgba(88,64,25,.12);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.authrow{
  align-items:center;
  flex-wrap:wrap;
}
.authrow > div:first-child{
  min-width:190px;
}
.authactions{
  flex:1 1 680px;
  display:flex;
  align-items:center;
  justify-content:end;
  flex-wrap:wrap;
  gap:10px;
}
.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;
}
.auth-password-group{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:6px;
  align-items:center;
}
.authinput{
  min-width:180px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--line);
  background:rgba(255,253,247,.96);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72);
}
.authinput:focus{
  outline:2px solid rgba(216,148,34,.22);
  border-color:rgba(107,74,15,.38);
}
.authhint{
  margin-top:10px;
  color:var(--muted);
  font-size:13px;
}
.legal-card{
  max-width:1100px;
  margin-left:auto;
  margin-right:auto;
  margin-bottom:16px;
  border-color:rgba(216,148,34,.38);
  background:rgba(255,248,225,.74);
  box-shadow:0 12px 28px rgba(88,64,25,.08);
}
.legal-card__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}
.legal-card__head .h2{
  margin:0;
}
.legal-card__badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 9px;
  border:1px solid rgba(107,74,15,.18);
  border-radius:999px;
  background:rgba(255,253,247,.78);
  color:var(--accent-dark);
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
.legal-copy{
  color:var(--accent-dark);
  font-size:13px;
  line-height:1.5;
  margin-top:8px;
}
.legal-copy:first-of-type{
  margin-top:0;
}
.buildmeta{
  margin-top:10px;
  text-align:left;
  font-weight:800;
  color:var(--accent-dark);
}
.legal-card .buildmeta{
  display:none;
}

.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:#fffdf7;
}

.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:0;
  padding:16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:linear-gradient(180deg, #fffaf0 0%, #f1f8ee 100%);
}

.reminder-card{
  border-color:rgba(47,125,75,.34);
  background:linear-gradient(180deg, rgba(237,247,237,.98) 0%, rgba(255,250,240,.96) 100%);
  box-shadow:0 14px 34px rgba(47,125,75,.14);
}

.reminder-card .h2{
  margin-bottom:0;
}

.reminder-card .authhint{
  margin-top:8px;
}

.field-report-card{
  border-color:rgba(176,112,22,.34);
  background:linear-gradient(180deg, rgba(255,248,228,.98) 0%, rgba(245,250,241,.96) 100%);
  box-shadow:0 14px 34px rgba(176,112,22,.12);
}

.field-report-location-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  gap:12px;
  align-items:end;
}

.field-report-location-or{
  align-self:center;
  min-width:34px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  text-align:center;
  text-transform:uppercase;
}

.field-report-town-picker{
  min-width:0;
}

.field-report-town-suggestions{
  margin-top:6px;
}

.hivemind-card{
  border-color:rgba(47,125,75,.34);
  background:linear-gradient(180deg, rgba(237,247,237,.98) 0%, rgba(255,253,247,.96) 100%);
  box-shadow:0 14px 34px rgba(47,125,75,.12);
}

.hivemind-card--biosecurity{
  border-color:rgba(185,28,28,.38);
  background:linear-gradient(180deg, rgba(255,245,245,.98) 0%, rgba(255,253,247,.96) 100%);
  box-shadow:0 14px 34px rgba(185,28,28,.12);
}

.hivemind-card--biosecurity .hivemind-metric{
  border-color:rgba(185,28,28,.2);
}

.hivemind-card--biosecurity .hivemind-metric strong{
  color:#8f1d1d;
}

.field-report-card .h2,
.hivemind-card .h2{
  margin-bottom:0;
}

.field-report-card .authhint,
.hivemind-card .authhint{
  margin-top:8px;
}

.hivemind-metrics{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px;
  margin-top:10px;
}

.hivemind-metric{
  min-height:58px;
  padding:10px;
  border:1px solid rgba(47,125,75,.2);
  border-radius:8px;
  background:rgba(255,255,255,.58);
}

.hivemind-metric span{
  display:block;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:0;
}

.hivemind-metric strong{
  display:block;
  margin-top:4px;
  color:#1f5133;
  font-size:16px;
  line-height:1.1;
}

.field-report-drivers{
  margin:10px 0 0;
  padding-left:18px;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

.hivemind-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid rgba(185,28,28,.18);
}

.hivemind-next-step{
  flex:1 1 190px;
  justify-content:center;
}

.station-card--status{
  transition:background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.station-card--good{
  border-color:rgba(22,163,74,.35);
  background:linear-gradient(180deg, rgba(237,247,237,.98) 0%, rgba(224,244,228,.94) 100%);
}

.station-card--warn{
  border-color:rgba(216,148,34,.42);
  background:linear-gradient(180deg, rgba(255,244,207,.98) 0%, rgba(255,236,171,.9) 100%);
}

.station-card--bad{
  border-color:rgba(220,38,38,.35);
  background:linear-gradient(180deg, rgba(254,242,242,.96) 0%, rgba(255,241,242,.9) 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(auto-fit, minmax(140px, 1fr));
  gap:12px;
  margin-top:14px;
}

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

.station-metric--status::after{
  content:"";
  position:absolute;
  right:8px;
  top:8px;
  width:10px;
  height:10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.9);
}

.station-metric--good::after{
  background:var(--green);
}

.station-metric--warn::after{
  background:var(--accent);
}

.station-metric--bad::after{
  background:#dc2626;
}

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

.weather-wrap{
  max-width:1180px;
}

.weather-title-row{
  align-items:flex-start;
  gap:16px;
}

.weather-actions{
  margin-left:auto;
}

.weather-summary-note{
  margin-top:14px;
  padding:10px 12px;
  border:1px solid #d8b35c;
  border-radius:10px;
  background:#fff8e6;
  color:#5b4617;
  font-weight:700;
}

.weather-metric-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(190px, 1fr));
  gap:12px;
  margin-top:16px;
}

.weather-metric,
.weather-panel{
  border:1px solid var(--line);
  border-radius:8px;
  background:#fffdf7;
  padding:14px;
}

.weather-metric span,
.weather-metric small{
  display:block;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

.weather-metric strong{
  display:block;
  margin-top:6px;
  color:#182318;
  font-size:22px;
  line-height:1.15;
}

.weather-metric small{
  margin-top:6px;
}

.weather-section-grid{
  display:grid;
  grid-template-columns:minmax(280px, .9fr) minmax(0, 1.4fr);
  gap:14px;
  margin-top:16px;
}

.weather-trend-list{
  display:grid;
  gap:10px;
  margin-top:10px;
}

.weather-trend-row{
  display:grid;
  grid-template-columns:70px minmax(90px, 1fr) 78px;
  align-items:center;
  gap:10px;
  font-size:13px;
}

.weather-trend-row strong{
  text-align:right;
}

.weather-trend-bar{
  height:10px;
  overflow:hidden;
  border-radius:999px;
  background:#e9e1c8;
}

.weather-trend-bar i{
  display:block;
  height:100%;
  border-radius:999px;
  background:#2f7d4b;
}

.ecowitt-history-panel,
.ecowitt-history-notice{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  border:1px solid #c9d9c5;
  border-radius:8px;
  background:#f5fbf1;
  padding:12px;
}

.ecowitt-history-panel{
  grid-column:1 / -1;
  flex-wrap:wrap;
}

.ecowitt-history-panel.hidden{
  display:none !important;
}

.ecowitt-history-notice{
  margin-top:12px;
}

.ecowitt-history-panel .authhint,
.ecowitt-history-notice .authhint{
  margin-top:4px;
}

.biosecurity-alert{
  display:grid;
  gap:10px;
  margin-top:12px;
  padding:12px;
  border:1px solid #fecaca;
  border-radius:8px;
  background:#fff5f5;
  color:#7f1d1d;
}

.biosecurity-alert strong{
  color:#991b1b;
}

.biosecurity-alert ul{
  margin:0;
  padding-left:18px;
}

.biosecurity-alert a{
  color:#991b1b;
  font-weight:800;
}

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

.station-card__compare{
  margin-top:10px;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(15,23,42,.08);
  background:rgba(255,253,247,.76);
  color:#3f4b3b;
  font-size:13px;
  font-weight:700;
}

.station-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
  justify-content:flex-start;
}

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

.reminder-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.reminder-actions > div{
  padding:12px;
  border:1px solid rgba(47,125,75,.22);
  border-radius:12px;
  background:rgba(255,253,247,.82);
  color:#33412f;
}

.reminder-actions .btn{
  margin-left:8px;
  margin-top:8px;
}

.reminder-hives{
  margin-top:8px;
  color:var(--muted);
}

.reminder-hives summary{
  cursor:pointer;
  font-weight:700;
}

.reminder-hives div{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}

.reminder-hives span{
  padding:3px 8px;
  border:1px solid rgba(47,125,75,.18);
  border-radius:999px;
  background:rgba(47,125,75,.08);
  color:#33412f;
  font-size:12px;
  font-weight:700;
}

.share-apiary-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:12px;
}

.share-apiary-list details{
  border:1px solid rgba(47,125,75,.2);
  border-radius:10px;
  background:rgba(255,253,247,.86);
  padding:10px;
}

.share-apiary-list summary{
  cursor:pointer;
  font-weight:800;
  color:#33412f;
}

.share-hive-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  gap:8px;
  margin-top:10px;
}

.share-hive-grid label{
  display:flex;
  align-items:center;
  gap:7px;
  padding:7px 8px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fffdf7;
  font-size:13px;
  font-weight:700;
}

.manage-hives-table-wrap{
  margin-top:12px;
}

.manage-hives-table input,
.manage-hives-table select{
  width:100%;
  min-width:130px;
  border:1px solid var(--line);
  border-radius:8px;
  padding:8px 10px;
  background:#fffdf7;
  color:var(--text);
  font:inherit;
}

.share-access-panel{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--line);
}

.share-access-list{
  display:grid;
  gap:8px;
  margin-top:10px;
}

.share-access-item{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fffdf7;
}

.share-access-item small{
  display:block;
  margin-top:4px;
  color:var(--muted);
}

#aiCard{
  margin-top:0;
}

.mobile-today-card,
.mobile-action-card,
.quick-log-btn{
  display:none;
}

.mobile-risk-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
}

.mobile-risk{
  border:1px solid var(--line);
  border-radius:12px;
  background:#fffdf7;
  padding:12px;
  min-height:74px;
}

.mobile-risk span,
.mobile-action-label{
  display:block;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.mobile-risk strong{
  display:block;
  margin-top:8px;
  font-size:18px;
}

.mobile-risk.good{border-color:rgba(47,125,75,.35); background:var(--green-soft)}
.mobile-risk.warn{border-color:rgba(216,148,34,.45); background:var(--accent-soft)}
.mobile-risk.bad{border-color:rgba(220,38,38,.35); background:#fef2f2}

.mobile-section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}

.mobile-action-title{
  margin-top:8px;
  font-size:18px;
  font-weight:900;
  line-height:1.25;
}

.mobile-action-body{
  margin-top:8px;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
}

.resilience-card{
  margin-top:16px;
}

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

.resilience-grid{
  margin-top:10px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.resilience-score-block{
  border:1px solid var(--line);
  border-radius:12px;
  background:#f7f4e7;
  padding:12px;
}

.resilience-score{
  font-size:28px;
  font-weight:800;
  line-height:1.1;
}

.resilience-score--small{
  font-size:22px;
}

.resilience-status{
  margin-top:6px;
  font-size:13px;
  color:#3f4b3b;
  font-weight:700;
}

.resilience-meta{
  border:1px solid var(--line);
  border-radius:12px;
  background:#fffdf7;
  padding:12px;
  display:grid;
  gap:8px;
  font-size:13px;
  color:#3f4b3b;
}

.resilience-section{
  margin-top:12px;
}

.resilience-label{
  font-size:12px;
  font-weight:800;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.02em;
}

.resilience-list{
  margin-top:6px;
  display:grid;
  gap:4px;
  font-size:13px;
  color:#253024;
}

.resilience-disclaimer{
  margin-top:12px;
  padding:10px;
  border:1px solid #a7d7b0;
  border-radius:10px;
  background:#edf7ed;
  font-size:12px;
  color:#245135;
  line-height:1.4;
}

.resilience-help{
  margin-top:12px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f7f4e7;
  font-size:12px;
  color:#3f4b3b;
  line-height:1.4;
}

.hive-health-summary{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.hive-health-row{
  cursor:pointer;
}

.hive-health-row:hover{
  background:#f7f4e7;
}

.hive-health-row.is-active{
  background:#edf7ed;
}

.hive-health-detail-card{
  scroll-margin-top:84px;
}

.hive-health-detail-description{
  margin-top:12px;
  color:#253024;
  font-size:14px;
  line-height:1.55;
  max-width:820px;
}

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

.hive-health-evidence-item{
  min-height:74px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fffdf7;
  padding:10px;
}

.hive-health-evidence-label{
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.02em;
}

.hive-health-evidence-value{
  margin-top:6px;
  color:#253024;
  font-size:14px;
  font-weight:800;
  line-height:1.3;
}

.hive-health-trend-list{
  margin-top:6px;
  display:grid;
  gap:6px;
  color:#253024;
  font-size:13px;
  line-height:1.35;
}

.confidence-icon{
  display:inline-block;
  width:8px;
  height:8px;
  border-radius:50%;
  background:#2f7d4b;
  margin-right:6px;
  vertical-align:middle;
}

.confidence-icon--high{
  opacity:1;
}

.confidence-icon--medium{
  opacity:.62;
}

.confidence-icon--low{
  opacity:.34;
}

@media (max-width: 760px){
  .resilience-grid{
    grid-template-columns:1fr;
  }

  .hive-health-detail-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width: 520px){
  .hive-health-detail-grid{
    grid-template-columns:1fr;
  }
}

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

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

.day-pill.active{
  background:var(--green);
  color:#fff;
  border-color:#236b3c;
}

.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:#fffdf7;
  flex-wrap:wrap;
}

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

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

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

.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:#172117;
}

.badge.good{background:rgba(47,125,75,.13)}
.badge.warn{background:rgba(216,148,34,.16)}
.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:normal;
  vertical-align:top;
}

.table th{
  background:#f7f4e7;
  font-weight:800;
  font-size:12px;
  color:#3f4b3b;
  white-space:nowrap;
}

.table-sort-btn{
  appearance:none;
  border:0;
  background:transparent;
  color:inherit;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:0;
  font:inherit;
  font-weight:inherit;
  text-align:left;
}

.table-sort-btn:hover,
.table-sort-btn:focus{
  color:var(--accent-dark);
  outline:none;
  text-decoration:underline;
  text-underline-offset:3px;
}

.table-sort-btn span{
  min-width:10px;
  font-size:10px;
  line-height:1;
}

.weather-trend-heading{
  align-items:flex-start;
  gap:14px;
}

.weather-trend-heading .h2{
  margin-right:auto;
}

.trend-range-control{
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.trend-range-control select{
  min-width:142px;
}

.trend-wrap{
  margin-top:14px;
  position:relative;
}

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

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

.trend-legend strong{
  color:#172117;
  font-weight:700;
}

.trend-summary{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
  color:#172117;
}

.trend-summary strong{
  font-size:14px;
}

.trend-summary span{
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}

.trend-chart-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

.trend-chart-panel{
  min-width:0;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(255, 253, 247, .9);
  padding:12px;
  position:relative;
}

.trend-chart-title{
  color:#172117;
  font-size:13px;
  font-weight:800;
  line-height:1.2;
}

.trend-axis-text{
  fill:#667060;
  font-size:10px;
  font-weight:600;
}

.trend-axis-unit{
  fill:#4f5b49;
  font-weight:800;
}

.trend-grid-line{
  stroke:#e6dfcc;
  stroke-width:1;
}

.trend-hit-point{
  fill:transparent;
  cursor:pointer;
  outline:none;
}

.trend-hit-point:focus{
  stroke:#172117;
  stroke-width:1.8;
}

.trend-tooltip{
  position:absolute;
  z-index:2;
  min-width:150px;
  max-width:min(240px, calc(100% - 16px));
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#172117;
  color:#fffdf7;
  box-shadow:0 10px 24px rgba(23, 33, 23, .18);
  pointer-events:none;
}

.trend-tooltip strong,
.trend-tooltip span,
.trend-tooltip small{
  display:block;
}

.trend-tooltip strong{
  font-size:16px;
  line-height:1.1;
}

.trend-tooltip span{
  margin-top:4px;
  font-size:12px;
  font-weight:700;
}

.trend-tooltip small{
  margin-top:2px;
  color:#d8e2d0;
  font-size:11px;
}

.overlay-select{
  width:100%;
  min-height:94px;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#fffdf7;
  font:inherit;
}

.checkbox-grid{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fffdf7;
  min-height:42px;
}

.check-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#f7f4e7;
  font-size:12px;
  font-weight:700;
  color:#3f4b3b;
}

.check-pill input{
  margin:0;
  accent-color:#2f7d4b;
}

.chip-toggle{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fffdf7;
  font-size:12px;
  font-weight:700;
  color:#3f4b3b;
}

.chip-toggle input{
  margin:0;
}

.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:#fffdf7;
}

.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:#fffdf7;
}
.rec-card input{margin-top:4px}
.rec-card.safe{border-color:#a7d7b0; background:var(--green-soft)}
.rec-card.caution{border-color:#efd078; background:var(--accent-soft)}
.rec-card.block{border-color:#fecaca; background:#fef2f2}
.rec-title{font-weight:800}
.rec-meta{color:var(--muted); font-size:12px; margin-top:4px}
.treatment-overlay-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(92px,1fr));
  gap:10px;
  margin-top:12px;
}
.treatment-overlay-day{
  border:1px solid var(--line);
  border-radius:8px;
  padding:10px;
  background:#fffdf7;
  min-height:82px;
}
.treatment-overlay-day.good{outline:2px solid rgba(16,185,129,.25); background:var(--green-soft)}
.treatment-overlay-day.warn{outline:2px solid rgba(245,158,11,.25); background:var(--accent-soft)}
.treatment-overlay-day.bad{outline:2px solid rgba(239,68,68,.25); background:#fef2f2}
.treatment-overlay-day .d{font-weight:800; font-size:12px; color:var(--muted)}
.treatment-overlay-day .k{margin-top:5px; font-weight:800}
.treatment-overlay-day .v{margin-top:4px; color:var(--muted); font-size:12px; line-height:1.25}

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

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

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

.modal__panel{
  max-height:calc(100vh - 48px);
  overflow:auto;
}

body:has(.modal:not(.hidden)) .topbar.centered{
  z-index:1;
  pointer-events:none;
  opacity:0;
}

.modal__head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
}

.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:#f7f4e7;
}

.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}

  .weather-title-row,
  .weather-section-grid{
    grid-template-columns:1fr;
  }

  .weather-title-row{
    align-items:stretch;
  }

  .weather-actions{
    margin-left:0;
    width:100%;
  }

  .weather-actions select{
    width:100%;
  }
  .modal__card{margin:24px auto}
}

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

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

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

.suggestion:hover{
  background:#f7f4e7;
}

.suggestion__title{
  font-weight:700;
}

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

.checkbox-list{
  display:grid;
  gap:8px;
  max-height:180px;
  overflow:auto;
  padding:10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fffdf7;
}

.log{
  margin:12px 0 0;
  padding:12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fffdf7;
  color:#4b5563;
  overflow:auto;
  min-height:56px;
  white-space:pre-wrap;
  font-family:inherit;
  font-size:13px;
  line-height:1.45;
}

/* 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:#fffdf7;
  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;
  z-index:1300;
  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: 128px;
  }
}

@media (max-width: 760px){
  body::before{
    background-position:center top;
    background-size:100% auto;
    opacity:.64;
  }

  body::after{
    background:
      radial-gradient(circle at 50% 14%, rgba(255,253,247,.68), rgba(255,253,247,.32) 36%, rgba(245,241,231,.1) 66%),
      linear-gradient(180deg, rgba(251,247,237,.24) 0%, rgba(238,243,234,.36) 100%);
  }

  body{
    padding-bottom:92px;
  }

  .wrap{
    margin:12px auto;
    padding:0 12px;
  }

  .card{
    border-radius:10px;
    padding:14px;
  }

  .row{
    align-items:flex-start;
    flex-wrap:wrap;
  }

  .authrow,
  .authactions{
    align-items:stretch;
    width:100%;
  }

  .authrow{
    display:grid;
    gap:12px;
  }

  .authrow > div:first-child{
    min-width:0;
  }

  .authactions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
  }

  .authinput,
  .btn,
  .btn.small,
  input,
  select,
  textarea{
    min-height:44px;
    font-size:16px;
  }

  .authinput{
    min-width:0;
    width:100%;
  }

  .authactions > .authinput,
  .authactions > .auth-password-group,
  .authactions > #magicLoginBtn,
  .authactions > #loginCodeInput,
  .authactions > #verifyLoginCodeBtn{
    grid-column:1/-1;
  }

  .authactions > .btn{
    width:100%;
  }

  .auth-password-group{
    grid-template-columns:minmax(0, 1fr) auto;
  }

  .auth-password-group .btn{
    width:auto;
  }

  .authremember{
    align-self:center;
  }

  .legal-card__head{
    align-items:flex-start;
  }

  .tabs,
  .controls{
    gap:8px;
  }

  .tabs .btn,
  .controls .btn{
    flex:1 1 calc(50% - 8px);
  }

  .dashboard-action-bar{
    justify-content:center;
    gap:8px;
    margin-bottom:16px;
  }

  .dashboard-action-bar .btn,
  .dashboard-action-bar select{
    flex:1 1 calc(50% - 8px);
    min-width:0;
  }

  #forecastPanel{
    display:flex;
    flex-direction:column;
  }

  #stationCard{
    order:1;
    margin-top:0;
  }

  #mobileTodayCard{
    order:2;
  }

  #mobileActionCard{
    order:3;
  }

  #hiveMindV2Card{
    order:4;
  }

  #forecastPanel .controls{
    order:5;
  }

  #modeHelpText{
    order:6;
  }

  #calendar{
    order:7;
  }

  #rangeDisclaimer{
    order:8;
  }

  #legend{
    order:9;
  }

  #aiCard{
    order:10;
  }

  .mobile-today-card,
  .mobile-action-card{
    display:block;
    margin-top:12px;
    padding:14px;
    border:1px solid var(--line);
    border-radius:10px;
    background:#fffdf7;
    box-shadow:var(--shadow);
  }

  .mobile-action-card{
    border-color:#a7d7b0;
    background:#edf7ed;
  }

  .station-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:10px;
  }

  .station-metric{
    padding:11px;
    min-height:78px;
  }

  .station-metric strong{
    font-size:17px;
  }

  .calendar{
    display:flex;
    overflow-x:auto;
    gap:12px;
    padding:2px 2px 10px;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
  }

  .tile{
    flex:0 0 min(82vw, 330px);
    min-height:142px;
    border-radius:10px;
    scroll-snap-align:start;
  }

  .tile .d{
    font-size:13px;
  }

  .tile .k{
    font-size:20px;
  }

  .tile .v{
    font-size:14px;
    line-height:1.45;
  }

  .quick-log-btn{
    position:fixed;
    left:16px;
    right:16px;
    bottom:16px;
    z-index:1100;
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:56px;
    border:0;
    border-radius:14px;
    background:var(--green);
    color:#fff;
    box-shadow:0 14px 34px rgba(47,125,75,.28);
    font-size:17px;
    font-weight:900;
  }

  .quick-log-btn.hidden{
    display:none !important;
  }
}

@media (max-width: 420px){
  .station-grid,
  .mobile-risk-grid{
    grid-template-columns:1fr;
  }
}

.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;
}

.feedback-diag{
  margin-top:12px;
  padding:12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#0f172a;
  color:#cbd5e1;
  font-size:12px;
  line-height:1.45;
  white-space:pre-wrap;
  word-break:break-word;
  max-height:280px;
  overflow:auto;
}

.transfer-pending-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 14px;
  padding:12px 14px;
  border:1px solid #16a34a;
  border-radius:10px;
  background:#dcfce7;
  color:#14532d;
  box-shadow:0 10px 22px rgba(22,163,74,.14);
}

.transfer-pending-bar.hidden{
  display:none !important;
}

.transfer-pending-bar strong{
  display:block;
  font-size:15px;
}

.transfer-pending-bar span{
  display:block;
  margin-top:2px;
  font-size:13px;
  font-weight:700;
}

.transfer-pending-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.planner-inline-panel{
  padding:12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(15,23,42,.03);
}

@media (max-width: 640px){
  .transfer-pending-bar{
    align-items:flex-start;
    flex-direction:column;
  }
}
