/* 81-redesign-rooms.css — Redesign continued: mother batch tiles, schedule and watering screens
   Part of the ordered set linked from index.html. The parts concatenate to the
   original stylesheet byte for byte; link order IS the cascade order, so never
   reorder the <link> tags and never move a rule between files. */

.mr-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mr-row-empty {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}

.mr-tile {
  position: relative;
  min-width: 138px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px 11px 8px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.1s, box-shadow 0.1s;
}

.mr-tile:hover { border-color: rgba(255,255,255,0.4); }
.mr-tile.sel { box-shadow: 0 0 0 2px var(--text); border-color: transparent; }
.mr-tile.retired { opacity: 0.55; }

.mr-tile-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.mr-tile-strain {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mr-tile-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.mr-tile-count {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.mr-tile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.mr-tile-sku {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--accent);
}

.mr-tile-sku.none { color: var(--warn); }
.mr-tile-sku.pending { color: var(--warn); }
.mr-tile-sku.confirmed,
.mr-sku-confirmed { color: var(--good, #7ec88c); font-weight: 800; }
.mr-sku-pending { color: var(--warn); font-weight: 800; }

.mr-scan-btn {
  border-color: color-mix(in oklab, var(--accent) 60%, transparent);
  background: color-mix(in oklab, var(--accent) 13%, transparent);
}

.mr-scanner-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 8, 6, 0.84);
  backdrop-filter: blur(8px);
}

.mr-scanner {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel, #111a15);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.mr-scanner h2 { margin: 3px 42px 6px 0; font-size: 22px; }
.mr-scanner-help, .mr-scanner-status { color: var(--muted); font-size: 14px; }
.mr-scanner-status { min-height: 20px; }
.mr-scanner-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 25px;
}

.mr-camera-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 2px solid color-mix(in oklab, var(--accent) 72%, white);
  border-radius: 14px;
  background: #030504;
}
.mr-camera-frame video { width: 100%; height: 100%; object-fit: cover; }
.mr-camera-line {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 2px;
  background: var(--bad, #e86f5f);
  box-shadow: 0 0 10px var(--bad, #e86f5f);
}

.mr-scanner-manual { display: grid; gap: 7px; margin-top: 12px; }
.mr-scanner-manual label { font-size: 14px; font-weight: 800; }
.mr-scanner-manual div { display: flex; gap: 8px; }
.mr-scanner-manual input {
  min-width: 0;
  flex: 1;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0,0,0,0.2);
  color: var(--text);
  font: 700 16px/1.2 ui-monospace, monospace;
}
.mr-scanner-manual button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #0a120d;
  font-weight: 900;
}

.mr-tile-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
}

.mr-tile-badge.flagged { color: var(--warn); border: 1px solid rgba(228,180,93,0.5); }
.mr-tile-badge.error { color: var(--bad); border: 1px solid rgba(232,111,95,0.5); }
.mr-tile-badge.retired { color: var(--muted); border: 1px solid var(--line); }

/* Batch detail panel — mother list */
.mr-group-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 280px;
}

.mr-group-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.mr-m-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mr-m {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}

.mr-m.retired, .mr-m.error { opacity: 0.55; }

.mr-m-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mr-m-name { font-size: 15px; font-weight: 800; }
.mr-m-days { margin-left: auto; color: var(--muted); font-size: 14px; }
.mr-m-note { margin: 0; color: var(--warn); font-size: 14px; }

.mr-m-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mr-m-acts .mr-action-btn { padding: 8px 12px; font-size: 14px; }

.vr-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}

.vr-section {
  border-radius: 18px;
  padding: 16px;
}

.vr-section-header {
  display: grid;
  gap: 12px;
}

.vr-section-left,
.vr-section-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.vr-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.vr-strain-name {
  font-size: 16px;
  font-weight: 800;
}

.vr-section-count,
.vr-days {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.vr-toggle {
  color: var(--disabled);
  font-size: 14px;
  font-weight: 800;
}

.vr-dot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12px, 1fr));
  gap: 5px;
  margin-top: 14px;
}

.vr-dot-plant {
  aspect-ratio: 1;
  min-width: 10px;
  border-radius: 50%;
  position: relative;
}

.cure-net {
  min-height: 88px;
  display: grid;
  align-content: space-between;
  gap: 6px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 13px;
  text-align: left;
}

.cure-net.empty {
  border-style: dashed;
  color: var(--disabled);
}

.cure-net.moved {
  opacity: 0.55;
}

.cure-net-strain {
  font-size: 13px;
  font-weight: 800;
}

.cure-net-count,
.cure-net-empty {
  color: var(--muted);
  font-size: 12px;
}

.gf-light-heroes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.gf-light-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.gf-light-card,
.gf-light-row {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  padding: 16px;
}

.gf-light-card-head,
.gf-light-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}

.gf-light-row {
  border-radius: 16px;
}

.gf-light-card h2,
.gf-light-row h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.gf-light-card p,
.gf-light-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.gf-light-bulb {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--room-tint);
  color: var(--gold);
}

.gf-light-bulb.small {
  width: 38px;
  height: 38px;
}

.gf-light-card.on .gf-light-bulb,
.gf-light-row.on .gf-light-bulb {
  box-shadow: 0 0 22px rgba(232,195,90,0.25);
}

.gf-light-chip {
  background: rgba(255,255,255,0.055);
  color: var(--muted);
  padding: 7px 9px;
}

.gf-light-mode {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
}

.gf-light-mode button {
  min-width: 68px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.gf-light-mode button.active {
  background: var(--room-color);
  color: #171914;
}

.gf-light-mode button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.gf-switch {
  width: 51px;
  height: 31px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.13);
  padding: 2px;
}

.gf-switch.small {
  width: 40px;
  height: 24px;
}

.gf-switch span {
  display: block;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s var(--ease);
}

.gf-switch.small span {
  width: 20px;
  height: 20px;
}

.gf-switch.on {
  background: var(--accent);
}

.gf-switch.on span {
  transform: translateX(20px);
}

.gf-switch.small.on span {
  transform: translateX(16px);
}

.gf-light-state {
  display: grid;
  gap: 3px;
  margin: 18px 0 10px;
}

.gf-light-state strong {
  font-size: 22px;
  font-weight: 800;
}

.gf-light-state span {
  color: var(--muted);
  font-size: 14px;
}

.gf-light-timeline {
  position: relative;
  height: 42px;
  margin-top: 12px;
  padding-top: 0;
}

.gf-light-timeline::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 18px;
  border-radius: 7px;
  background: rgba(255,255,255,0.06);
}

.gf-light-timeline .lit {
  position: absolute;
  top: 0;
  height: 18px;
  border-radius: 7px;
  background: linear-gradient(180deg, #EDCB6E, #DDAF45);
}

.gf-light-timeline .now {
  position: absolute;
  top: -3px;
  left: var(--now);
  width: 2px;
  height: 24px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 10px rgba(255,255,255,0.8);
}

.gf-light-timeline .ticks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  color: var(--fainter);
  font-size: 10px;
  font-weight: 800;
}

.gf-light-note {
  display: inline-flex;
  margin-top: 12px !important;
  border-radius: 999px;
  background: rgba(240,162,59,0.12);
  color: var(--warn) !important;
  padding: 8px 10px;
  font-size: 14px!important;
  font-weight: 800;
}

.gfw-actions,
.gfw-filters {
  margin-bottom: 14px;
}

.gfw-card,
.gfw-reading {
  border-radius: 18px;
}

.gfw-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.cyc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.cyc-card {
  border-radius: 20px;
}

.cyc-room {
  font-size: 17px;
  font-weight: 800;
}

.cyc-meta > div {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 8px;
}

.gf-dialog-overlay,
.gfw-overlay,
.fw-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
}

.gf-dialog,
.gfw-modal,
.fw-modal {
  width: min(620px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  border: 1px solid var(--input-line);
  background: var(--sheet);
  color: var(--text);
  padding: 22px;
  animation: gfSheetUp 0.35s var(--ease);
}

.gf-dialog::before,
.gfw-modal::before,
.fw-modal::before {
  content: "";
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  margin: 0 auto 18px;
}

@keyframes gfSheetUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.gf-dialog-msg {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.gf-dialog-actions,
.gfw-actions,
.fw-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.gf-dialog-ok,
.gfw-save,
.fw-confirm {
  flex: 2;
  border-color: transparent !important;
  background: var(--accent) !important;
  color: var(--accent-text) !important;
}

.gf-dialog-cancel,
.gfw-cancel,
.fw-cancel {
  flex: 1;
}

.gf-toast {
  position: fixed;
  left: 50%;
  bottom: 98px;
  max-width: min(520px, calc(100% - 32px));
  transform: translate(-50%, 18px);
  opacity: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: var(--toast);
  color: var(--text);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 18px 60px rgba(0,0,0,0.36);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.gf-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 780px) {
  /* One row on a phone: back, the screen's name, Sign out. The role badge and
     Sign out used to wrap to a second row that the 54px bar never made room
     for, so they sat on top of every screen's title (2026-10-06).
     On a phone the bar scrolls away with the page instead of sticking: pinned
     to the top it left Sign out floating over Retail's filter chips and tab
     row, catching taps meant for them, and a phone has no height to spare for
     it. It is at the top of every screen, and the tab bar below still goes
     Home. */
  .gf-navbar {
    position: relative;
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .gf-nav-right {
    grid-column: 3;
    justify-content: flex-end;
  }

  /* A held-for-review card stacks on a phone: its two buttons used to take
     the row and squeeze "Death reports" to one letter a line. 60-fill-wizard's
     phone rule meant this, but the redesign layer's two-column grid came later
     and won. */
  article.approval-item {
    grid-template-columns: 1fr;
  }

  article.approval-item .approval-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  /* The role is on the Sign out button's tooltip; the title gets the room. */
  .gf-navbar:not([hidden]) .gf-nav-role {
    display: none;
  }

  .gf-navbar:not([hidden]) .gf-nav-logo {
    width: 58px;
  }

  .gf-navbar:not([hidden]) .gf-nav-title {
    overflow: hidden;
    font-size: 22px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* How much of the top of the screen the navbar covers: nothing once it
     scrolls away. What sticks under it reads this (89-flower-table.css). */
  .app-shell {
    --gf-navbar-cover: 0px;
    width: min(100% - 20px, 1240px);
  }

  .home-header,
  .gf-page-head,
  .stashboard-header,
  .fr-header,
  .cr-header,
  .mr-header,
  .vr-header,
  .cure-header {
    display: grid;
  }

  .summary-strip,
  .sign-in-form,
  .session-panel,
  .fr-detail-inner,
  .cr-detail-inner,
  .mr-detail-inner,
  .vr-detail-inner,
  .cure-detail-inner,
  .mr-row {
    grid-template-columns: 1fr;
  }

  .room-nav {
    grid-template-columns: 1fr;
  }

  .fr-grid {
    grid-auto-columns: minmax(8px, 1fr);
  }

  .gf-tabbar {
    width: min(100% - 20px, 420px);
    justify-content: space-between;
  }

  /* Seven tabs share a phone's width: the label under each icon is the one
     text the 14px floor cannot fit ("Watering" and "Schedule" would run into
     each other), so on a phone it keeps the 10px it had (2026-10-06). */
  .gf-tabbar button {
    min-width: 0;
    flex: 1;
    padding: 7px 4px;
    font-size: 10px;
  }

  .home-brand,
  .stashboard-brand {
    display: grid;
    gap: 10px;
  }

  .home-logo,
  .stashboard-logo {
    width: min(220px, 62vw);
    max-height: 72px;
  }
}

/* Schedule + Watering handoff screens */
body.view-watering-active .gf-navbar,
body.view-schedule-active .gf-navbar,
body.view-production-active .gf-navbar,
body.view-inventory-active .gf-navbar {
  display: none;
}

body.view-watering-active .app-shell,
body.view-schedule-active .app-shell,
body.view-production-active .app-shell,
body.view-inventory-active .app-shell {
  width: min(100% - 32px, 1120px);
  padding-top: 18px;
}

#view-watering #substrateSection {
  display: none !important;
}

.gf-screen {
  display: grid;
  gap: 16px;
  padding-bottom: 22px;
  animation: gfFadeUp 0.35s var(--ease);
}

.gf-loading {
  color: var(--muted);
  padding: 28px 0;
  font-size: 14px;
}

.gf-screen-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.gf-kicker {
  margin: 0 0 5px;
  color: var(--faint);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gf-screen-head h1 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  font-weight: 850;
  line-height: 1.04;
}

.gf-screen-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.gf-user-stack {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding-top: 28px;
}

.gf-role-pill {
  border: 1px solid rgba(52,212,106,0.35);
  border-radius: 999px;
  background: rgba(52,212,106,0.08);
  color: var(--accent);
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 800;
}

.gf-avatar {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(52,212,106,0.16);
  color: var(--text);
  border: 1px solid rgba(52,212,106,0.18);
  font-size: 14px;
  font-weight: 850;
}

.gf-data-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0.06em;
}

.gf-data-tag.live {
  border: 1px solid rgba(52,212,106,0.32);
  background: rgba(52,212,106,0.11);
  color: var(--accent);
}

.gf-data-tag.ready,
.gf-data-tag.calendar {
  border: 1px solid rgba(240,162,59,0.32);
  background: rgba(240,162,59,0.13);
  color: var(--warn);
}

.gf-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  flex: none;
  border-radius: 50%;
  background: var(--room-color, #E09858);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--room-color, #E09858) 55%, transparent);
}

.gfw-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 2px;
}

.gfw-mode-tabs {
  display: inline-flex;
  gap: 3px;
  border: 1px solid rgba(140,190,240,0.14);
  border-radius: 9px;
  background: rgba(18,25,31,0.72);
  padding: 4px;
}

.gfw-mode-tabs button {
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #7E93A5 !important;
  padding: 8px 13px !important;
  font-size: 14px!important;
  font-weight: 850 !important;
}

.gfw-mode-tabs button.active {
  background: var(--blue-active) !important;
  color: var(--blue-text) !important;
}

.gfw-primary-action {
  border: 0 !important;
  border-radius: 999px !important;
  background: #46AEEF !important;
  color: #061019 !important;
  padding: 12px 18px !important;
  font-size: 14px!important;
  font-weight: 850 !important;
  white-space: nowrap;
}

.gfw-room-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.gfw-room-filters button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(140,190,240,0.14) !important;
  border-radius: 999px !important;
  background: rgba(18,25,31,0.64) !important;
  color: #7E93A5 !important;
  padding: 8px 12px !important;
  font-size: 14px!important;
  font-weight: 850 !important;
  white-space: nowrap;
}

.gfw-room-filters button.active {
  border-color: rgba(140,190,240,0.35) !important;
  background: var(--blue-active) !important;
  color: var(--blue-text) !important;
}

.gfw-card-list {
  display: grid;
  gap: 10px;
}

.gfw-run-card,
.gfw-empty-card {
  border: 1px solid rgba(140,190,240,0.12);
  border-radius: 14px;
  background: #12191F;
  padding: 16px;
}

.gfw-card-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.gfw-room-title {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.gfw-room-title strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.gfw-room-title span:not(.gf-dot):not(.gfw-mini-chip) {
  color: #9AAFC2;
  font-size: 14px;
  font-weight: 650;
}

.gfw-card-line time {
  flex: none;
  color: #7E93A5;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}

.gfw-mini-chip {
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  color: var(--muted);
  padding: 3px 7px;
  font-size: 14px;
  font-weight: 850;
}

.gfw-mini-chip.flush {
  background: rgba(240,162,59,0.14);
  color: var(--warn);
}

.gfw-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(86px, 1fr));
  gap: 12px;
  margin: 0;
}

.gfw-metric {
  display: grid;
  gap: 4px;
}

.gfw-metric span {
  color: #61798C;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gfw-metric strong {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.gfw-metric.off strong {
  color: var(--warn);
}

.gfw-card-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.gfw-card-foot p {
  width: 100%;
  margin: 0;
  color: #9AAFC2;
  font-size: 14px;
  line-height: 1.35;
}

.gfw-pill-row {
  display: contents;
}

.gfw-info-pill {
  border-radius: 999px;
  background: rgba(91,155,255,0.16);
  color: #BCD7FF;
  padding: 5px 9px;
  font-size: 14px;
  font-weight: 800;
}

.gfw-info-pill.batch {
  background: color-mix(in srgb, var(--room-color, #6FB7D9) 18%, transparent);
  color: var(--text);
}

.gfw-empty-card {
  min-height: 112px;
  display: grid;
  place-items: center;
  color: #7E93A5;
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
}

.cyc-cycle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cyc-cycle-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: 18px;
}

.cyc-cycle-card.hold-upcoming,
.cyc-cycle-card.hold-active {
  border-color: rgba(180,120,220,0.42);
  background:
    linear-gradient(180deg, rgba(77,42,99,0.28), rgba(22,27,24,0.98)),
    var(--panel);
  box-shadow: inset 0 0 0 1px rgba(180,120,220,0.1);
}

.cyc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.cyc-card-top h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
}

.cyc-phase {
  border-radius: 999px;
  background: rgba(52,212,106,0.14);
  color: var(--green-light);
  padding: 6px 11px;
  font-size: 14px;
  font-weight: 850;
}

.cyc-phase.flush {
  background: rgba(240,162,59,0.14);
  color: var(--warn);
}

.cyc-phase.muted {
  background: rgba(255,255,255,0.07);
  color: var(--muted);
}

.cyc-phase.hold {
  background: rgba(180,120,220,0.18);
  color: #E4C3F7;
}

.cyc-countdown {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  font-weight: 850;
  line-height: 1.02;
  font-variant-numeric: tabular-nums;
}

.cyc-card-sub {
  margin: 7px 0 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.cyc-progress {
  position: relative;
  height: 8px;
  overflow: visible;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
}

.cyc-flush-band,
.cyc-progress-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
}

.cyc-flush-band {
  left: var(--flush-left);
  width: var(--flush-width);
  background: rgba(240,162,59,0.22);
}

.cyc-progress-fill {
  left: 0;
  width: var(--progress);
  background: linear-gradient(90deg, #2FBF62, #6EDD97);
}

.cyc-progress-knob {
  position: absolute;
  top: 50%;
  left: var(--progress);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #F2F5F0;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.22);
  transform: translate(-50%, -50%);
}

.cyc-progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  color: var(--faint);
  font-size: 14px;
  font-weight: 750;
}

.cyc-progress-labels span:nth-child(2) {
  color: var(--warn);
}

.cyc-date-list {
  display: grid;
  margin: 14px 0 0;
}

.cyc-date-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 12px 0;
}

.cyc-date-row:last-child {
  padding-bottom: 0;
}

.cyc-date-row dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.cyc-date-row dd {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}

.cyc-day-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 14px;
  font-weight: 850;
}

.cyc-day-chip.warn {
  background: rgba(240,162,59,0.13);
  color: var(--warn);
}

.cyc-day-chip.overdue {
  background: rgba(242,125,106,0.16);
  color: #FFD6CE;
}

.cyc-up-next {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.cyc-up-next h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
}

.cyc-events {
  display: grid;
  gap: 8px;
}

.cyc-event {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 12px 14px;
}

.cyc-date-block {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
}

.cyc-date-block strong {
  color: var(--text);
  font-size: 19px;
  font-weight: 850;
  line-height: 1;
}

.cyc-date-block span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.cyc-event-copy {
  min-width: 0;
}

.cyc-event-copy h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.cyc-event-copy p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.cyc-event-side,
.cyc-care-status {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  flex-direction: column;
}

.cyc-care-actions {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.cyc-care-status > span,
.cyc-care-status.complete span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.cyc-care-status.complete strong {
  color: var(--ok);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cyc-care-actions button {
  border: 1px solid rgba(111,183,217,0.3);
  border-radius: 8px;
  background: rgba(111,183,217,0.12);
  color: #BCE8FA;
  padding: 7px 9px;
  font-size: 14px;
  font-weight: 850;
}

.cyc-care-actions button.complete {
  border-color: rgba(95,201,129,0.32);
  background: rgba(95,201,129,0.13);
  color: #BFF1CF;
}

.cyc-global-harvest-wrap {
  margin-bottom: 14px;
}

.cyc-harvest-alert {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  border: 1px solid rgba(232,111,95,0.46);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(65,13,13,0.96), rgba(42,29,9,0.96) 58%, rgba(17,24,15,0.96)),
    var(--panel);
  padding: 16px 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.32), inset 0 0 0 1px rgba(255,255,255,0.04);
}

.cyc-harvest-alert.global {
  margin-top: 2px;
}

.cyc-harvest-alert.tomorrow {
  border-color: rgba(240,162,59,0.42);
  background:
    linear-gradient(135deg, rgba(46,28,6,0.98), rgba(40,36,13,0.95) 56%, rgba(16,24,17,0.96)),
    var(--panel);
}

.cyc-harvest-alert.today {
  animation: cycHarvestPulse 1.8s var(--ease) infinite;
}

.cyc-harvest-siren {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #F27D6A 0 34%, rgba(242,125,106,0.2) 36% 58%, transparent 60%);
  box-shadow: 0 0 0 1px rgba(242,125,106,0.38), 0 0 34px rgba(242,125,106,0.34);
}

.cyc-harvest-alert.tomorrow .cyc-harvest-siren {
  background: radial-gradient(circle at 50% 50%, #F0A23B 0 34%, rgba(240,162,59,0.2) 36% 58%, transparent 60%);
  box-shadow: 0 0 0 1px rgba(240,162,59,0.38), 0 0 30px rgba(240,162,59,0.28);
}

.cyc-harvest-copy {
  min-width: 0;
}

.cyc-harvest-kicker {
  margin: 0 0 5px;
  color: #FFD6CE;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.cyc-harvest-alert.tomorrow .cyc-harvest-kicker {
  color: #FFE0A8;
}

.cyc-harvest-copy h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1;
  font-weight: 950;
}

.cyc-harvest-copy p {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  font-weight: 700;
}

.cyc-harvest-rooms {
  display: grid;
  gap: 6px;
  justify-items: end;
  color: #fff;
  font-size: 14px;
}

.cyc-harvest-rooms > div {
  display: grid;
  gap: 2px;
  justify-items: end;
}

.cyc-harvest-rooms strong {
  display: block;
  font-size: 16px;
  font-weight: 900;
}

.cyc-harvest-rooms span {
  display: block;
  color: rgba(255,255,255,0.66);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.cyc-cycle-card.harvest-today,
.cyc-event.harvest-today {
  border-color: rgba(242,125,106,0.62);
  background:
    linear-gradient(180deg, rgba(68,18,16,0.36), rgba(22,27,24,0.98)),
    var(--panel);
  box-shadow: 0 0 0 1px rgba(242,125,106,0.18), 0 18px 50px rgba(80,16,12,0.2);
}

.cyc-cycle-card.harvest-tomorrow,
.cyc-event.harvest-tomorrow {
  border-color: rgba(240,162,59,0.5);
  background:
    linear-gradient(180deg, rgba(73,45,9,0.28), rgba(22,27,24,0.98)),
    var(--panel);
}

.cyc-cycle-card.harvest-today .cyc-countdown {
  color: #FFD6CE;
  letter-spacing: 0.02em;
}

.cyc-cycle-card.harvest-tomorrow .cyc-countdown {
  color: #FFE0A8;
}

.cyc-cycle-card.hold-active .cyc-countdown {
  color: #E4C3F7;
}

.cyc-care-protocol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 18px;
  margin-top: 18px;
  border: 1px solid rgba(111,183,217,0.2);
  border-radius: 18px;
  background: rgba(111,183,217,0.06);
  padding: 18px;
}

.cyc-care-protocol h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
}

.cyc-care-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 10px;
}

.cyc-care-rule {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(111,183,217,0.16);
  border-radius: 13px;
  background: rgba(10,18,23,0.44);
  padding: 13px 14px;
}

.cyc-care-rule span {
  color: #9CCFE7;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cyc-care-rule strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.cyc-care-rule p,
.cyc-care-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.cyc-care-events {
  margin-top: 18px;
}

.cyc-care-events-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.cyc-event.care {
  border-color: rgba(111,183,217,0.18);
}

.cyc-event.hold {
  border-color: rgba(180,120,220,0.34);
  background: linear-gradient(90deg, rgba(77,42,99,0.22), var(--panel) 44%);
}

.cyc-phase.harvest-today,
.cyc-day-chip.today {
  background: rgba(242,125,106,0.2);
  color: #FFD6CE;
}

.cyc-phase.harvest-tomorrow,
.cyc-day-chip.tomorrow {
  background: rgba(240,162,59,0.18);
  color: #FFE0A8;
}

.cyc-event.harvest-today .cyc-date-block {
  background: rgba(242,125,106,0.18);
  box-shadow: inset 0 0 0 1px rgba(242,125,106,0.18);
}

.cyc-event.harvest-tomorrow .cyc-date-block {
  background: rgba(240,162,59,0.16);
  box-shadow: inset 0 0 0 1px rgba(240,162,59,0.18);
}

@keyframes cycHarvestPulse {
  0%, 100% { box-shadow: 0 18px 60px rgba(0,0,0,0.32), 0 0 0 0 rgba(242,125,106,0.24); }
  50% { box-shadow: 0 18px 60px rgba(0,0,0,0.32), 0 0 0 5px rgba(242,125,106,0.11); }
}

@media (max-width: 760px) {
  body.view-watering-active .app-shell,
  body.view-schedule-active .app-shell,
  body.view-production-active .app-shell {
    width: min(100% - 20px, 1120px);
  }

  .gf-screen-head,
  .gfw-topbar {
    align-items: flex-start;
  }

  .gf-user-stack {
    padding-top: 2px;
  }

  .gfw-topbar {
    display: grid;
  }

  .gfw-primary-action {
    justify-self: start;
  }

  .gfw-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cyc-cycle-grid {
    grid-template-columns: 1fr;
  }

  .cyc-harvest-alert {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    padding: 15px;
  }

  .cyc-harvest-siren {
    width: 38px;
    height: 38px;
  }

  .cyc-harvest-rooms {
    grid-column: 1 / -1;
    justify-items: start;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    width: 100%;
  }

  .cyc-harvest-rooms > div {
    justify-items: start;
  }

  .cyc-harvest-rooms span {
    text-align: left;
  }

  .gf-schedule-screen .cyc-event.care {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .cyc-event.care .cyc-event-side {
    grid-column: 1 / -1;
    width: 100%;
    align-items: flex-start;
  }

  .cyc-event.care .cyc-care-status {
    width: 100%;
    align-items: flex-start;
  }
}

/* UI rebuild responsive corrections */
.gf-navbar:not([hidden]) .gf-nav-brand {
  grid-column: 2;
}

.gf-navbar:not([hidden]) .gf-nav-right {
  grid-column: 3;
}

.gf-navbar:not([hidden]) .gf-back-btn[hidden] + .gf-nav-brand {
  grid-column: 1 / 3;
}

@media (max-width: 780px) {
  .gf-navbar:not([hidden]) .gf-nav-right {
    grid-column: 3;
  }

  .gf-navbar:not([hidden]) .gf-back-btn[hidden] + .gf-nav-brand {
    grid-column: 1 / 3;
  }

  #view-auth .sign-in-form {
    grid-template-columns: 1fr;
  }

  #view-auth .sign-in-form > div:first-child {
    grid-column: auto;
  }

  #view-auth .auth-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  #view-auth .auth-actions button,
  #view-auth .data-panel button {
    width: 100%;
  }

  #view-auth .data-panel {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  /* A small phone gives the logo's width to the screen's name: "Crew reports"
     and "Strain drops" were cut to a few letters beside Sign out. Home still
     shows the full logo. */
  .gf-navbar:not([hidden]) .gf-nav-brand .gf-nav-logo {
    display: none;
  }

  .gf-navbar:not([hidden]) .gf-nav-brand .gf-nav-title {
    font-size: 20px;
  }

  body.tablet-mode .room-nav {
    grid-template-columns: 1fr;
  }

  body.tablet-mode .room-nav-btn {
    min-height: 146px;
    padding: 18px;
    grid-template-columns: 52px minmax(0, 1fr) auto;
  }

  body.tablet-mode .room-nav-name {
    font-size: 26px;
  }

  body.tablet-mode .room-nav-sub {
    font-size: 14px;
  }
}

/* ── Production timeline (production.js) ─────────────────────────────────── */
