:root {
  color-scheme: dark;
  --bg: #09130f;
  --surface: #10251d;
  --surface-raised: #163126;
  --border: rgba(207, 230, 218, 0.14);
  --text: #f3f7f4;
  --muted: #a6b9af;
  --accent: #82d6a7;
  --accent-strong: #a5e7bf;
  --danger: #ffaaa2;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 75% -10%, rgba(75, 151, 108, 0.19), transparent 35rem),
    linear-gradient(145deg, #0c1813 0%, var(--bg) 70%);
}

a {
  color: inherit;
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 44px;
  border-bottom: 1px solid var(--border);
  background: rgba(9, 19, 15, 0.82);
  backdrop-filter: blur(18px);
}

.brand,
.account-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand {
  gap: 12px;
  font-size: 1.3rem;
  font-weight: 720;
  letter-spacing: -0.025em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #0b1a13;
  background: var(--accent);
}

.brand-mark svg {
  width: 25px;
  fill: currentColor;
}

.account-link {
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: border-color 160ms ease, background 160ms ease;
}

.account-link:hover,
.account-link:focus-visible {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.035);
  outline: none;
}

.account-icon,
.input-icon {
  display: grid;
  place-items: center;
  color: var(--accent);
}

.account-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(130, 214, 167, 0.11);
}

.account-icon svg,
.input-icon svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.account-copy {
  display: grid;
  gap: 1px;
}

.account-label {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.account-name {
  font-size: 0.92rem;
  font-weight: 650;
}

.page-shell {
  width: min(1760px, calc(100% - 48px));
  margin: 0 auto;
  padding: 54px 0 84px;
}

.environment-list {
  display: grid;
  grid-template-columns: minmax(460px, 0.85fr) minmax(620px, 1.15fr);
  align-items: start;
  gap: 28px;
}

.greenhouse-column {
  min-width: 0;
  display: grid;
  gap: 28px;
}

.environment-card {
  display: block;
  width: 100%;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(22, 49, 38, 0.94), rgba(13, 30, 23, 0.94));
  box-shadow: var(--shadow);
}

.environment-media {
  min-height: 290px;
  padding: 16px;
  margin-top: 24px;
  background: rgba(3, 11, 7, 0.42);
  border-radius: 18px;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 258px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  border: 1px dashed rgba(207, 230, 218, 0.18);
  border-radius: 15px;
  color: #789086;
  background:
    linear-gradient(rgba(130, 214, 167, 0.025), rgba(130, 214, 167, 0.025)),
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(255, 255, 255, 0.012) 18px 19px);
  font-size: 0.8rem;
}

.image-placeholder svg {
  width: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
}

.environment-content {
  width: 100%;
  min-width: 0;
  padding: 30px;
}

.environment-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.node-id {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 720;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.environment-heading h1 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  letter-spacing: -0.035em;
}

.environment-name-button {
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.environment-name-button:hover,
.environment-name-button:focus-visible {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.environment-node-row,
.environment-state-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.environment-node-row {
  gap: 7px 16px;
  margin-bottom: 7px;
}

.environment-node-row .node-id {
  margin: 0;
}

.environment-state-list {
  gap: 9px 14px;
}

.header-binary-state {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

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

.telemetry-state {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.12);
  font-size: 0.73rem;
}

.telemetry-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #77867f;
}

.telemetry-state.is-online {
  color: #ccebd9;
  border-color: rgba(130, 214, 167, 0.25);
}

.telemetry-state.is-online .telemetry-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(130, 214, 167, 0.09);
}

.telemetry-state.is-offline .telemetry-dot {
  background: #d47870;
}

.telemetry-state.is-stale .telemetry-dot {
  background: #d4ad70;
}

.has-live-value {
  color: var(--text) !important;
}

.sensor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 12px;
  margin: 24px 0 0;
}

.greenhouse-sensors {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}

.incubator-sensors {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}

.sensor-reading {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid rgba(207, 230, 218, 0.1);
  border-radius: 13px;
  background: rgba(4, 14, 9, 0.26);
}

.telemetry-card {
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.telemetry-card:hover,
.telemetry-card:focus-visible,
.telemetry-card.is-chart-open {
  border-color: rgba(130, 214, 167, 0.55);
  background: rgba(130, 214, 167, 0.08);
  outline: none;
}

.telemetry-card:active {
  transform: translateY(1px);
}

.telemetry-card.is-chart-open {
  box-shadow: inset 0 0 0 1px rgba(130, 214, 167, 0.12);
}

.telemetry-charts {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.telemetry-charts:empty {
  display: none;
}

.telemetry-chart-panel {
  width: 100%;
  min-width: 0;
  padding: 12px 16px 10px;
  border: 1px solid rgba(130, 214, 167, 0.22);
  border-radius: 14px;
  background: rgba(3, 11, 7, 0.4);
}

.telemetry-chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.telemetry-chart-heading h3 {
  margin: 0;
  font-size: 0.92rem;
}

.telemetry-chart-close {
  padding: 4px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.68rem;
  cursor: pointer;
}

.telemetry-chart-close:hover,
.telemetry-chart-close:focus-visible {
  color: var(--accent);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.telemetry-chart-body {
  min-height: 165px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
}

.telemetry-chart-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.telemetry-chart-gridline {
  stroke: rgba(207, 230, 218, 0.1);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.telemetry-chart-axis-label {
  fill: #789086;
  font-family: inherit;
  font-size: 10px;
}

.telemetry-chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.telemetry-chart-latest {
  fill: var(--accent-strong);
  stroke: #10251d;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.telemetry-chart-empty,
.telemetry-chart-error {
  margin: 0;
  color: #789086;
  text-align: center;
}

.sensor-reading dt {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.setpoint-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 5px;
  border-radius: 50%;
  background: #66736c;
  box-shadow: 0 0 0 3px rgba(102, 115, 108, 0.12);
  vertical-align: 1px;
}

.setpoint-status-dot.is-in-range {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(130, 214, 167, 0.1);
}

.setpoint-status-dot.is-out-of-range {
  background: #d47870;
  box-shadow: 0 0 0 3px rgba(212, 120, 112, 0.1);
}

.sensor-reading dd {
  margin: 0;
  color: #d8e2dc;
  font-size: 1rem;
  font-weight: 670;
}

.reading-value {
  margin-right: 5px;
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
}

.setpoint-value {
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 1.28rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(130, 214, 167, 0.34);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.setpoint-value:hover,
.setpoint-value:focus-visible {
  color: var(--accent) !important;
  text-decoration-color: var(--accent);
}

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

.reading-column {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.setpoint-reading {
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

.reading-label {
  color: #71867b;
  font-size: 0.61rem;
  font-weight: 620;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.reading-unit {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 520;
}

.incubator-layout {
  margin-top: 24px;
}

.incubator-sensors {
  align-content: start;
  margin: 0;
}

.incubation-panel {
  min-width: 0;
  margin-top: 24px;
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
}

.incubation-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-kicker {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.incubation-panel h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
}

.incubation-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.item-count {
  min-width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(130, 214, 167, 0.06);
  font-size: 0.76rem;
  font-weight: 750;
}

.add-item-button {
  flex: 0 0 auto;
  padding: 4px 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 720;
  cursor: pointer;
  transition: color 160ms ease;
}

.add-item-button:hover,
.add-item-button:focus-visible {
  color: var(--accent-strong);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.incubation-dialog {
  width: min(92vw, 590px);
  max-height: 90vh;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--text);
  background: #10251d;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.62);
}

.incubation-dialog::backdrop {
  background: rgba(2, 8, 5, 0.76);
  backdrop-filter: blur(5px);
}

.recipe-explorer-dialog {
  width: min(94vw, 900px);
}

.recipe-explorer-list {
  display: grid;
  gap: 8px;
  padding-top: 20px;
}

.recipe-explorer-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(5, 18, 12, 0.38);
  overflow: hidden;
}

.recipe-explorer-row summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}

.recipe-explorer-row summary::-webkit-details-marker {
  display: none;
}

.recipe-explorer-row summary::after {
  content: "+";
  margin-left: auto;
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 700;
}

.recipe-explorer-row[open] summary::after {
  content: "−";
}

.recipe-explorer-code {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 760;
}

.recipe-explorer-category {
  color: var(--muted);
  font-size: 0.7rem;
}

.recipe-explorer-badge {
  padding: 3px 7px;
  border: 1px solid rgba(229, 177, 97, 0.3);
  border-radius: 999px;
  color: #e5b161;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.recipe-explorer-details {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 15px 16px 18px;
  border-top: 1px solid var(--border);
}

.recipe-explorer-details div {
  display: grid;
  grid-template-columns: minmax(110px, 0.25fr) minmax(0, 1fr);
  gap: 15px;
}

.recipe-explorer-details dt {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.recipe-explorer-details dd {
  margin: 0;
  color: #dbe7df;
  font-size: 0.75rem;
  line-height: 1.55;
}

.dialog-surface {
  padding: 25px;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--border);
}

.dialog-heading h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.dialog-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.14);
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover,
.dialog-close:focus-visible {
  color: var(--text);
  border-color: rgba(207, 230, 218, 0.28);
  outline: none;
}

.incubation-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 20px 0 0;
}

.incubation-form label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #dbe7df;
  font-size: 0.7rem;
  font-weight: 650;
}

.incubation-form label small {
  margin-left: 4px;
  color: #71867b;
  font-size: 0.61rem;
  font-weight: 550;
  text-transform: uppercase;
}

.incubation-form input,
.incubation-form select,
.incubation-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  color: var(--text);
  background: #0b1a14;
  font: inherit;
  font-size: 0.78rem;
}

.incubation-form input,
.incubation-form select {
  height: 38px;
  padding: 0 10px;
}

.incubation-form textarea {
  min-height: 60px;
  padding: 9px 10px;
  resize: vertical;
}

.incubation-form input:focus,
.incubation-form select:focus,
.incubation-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(130, 214, 167, 0.09);
}

.incubation-form button {
  height: 40px;
  border: 0;
  border-radius: 9px;
  color: #092014;
  background: var(--accent);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 760;
  cursor: pointer;
}

.incubation-form button:hover,
.incubation-form button:focus-visible {
  background: var(--accent-strong);
  outline: none;
}

.setpoint-form {
  display: grid;
  gap: 10px;
  padding-top: 22px;
}

.setpoint-form label {
  color: #dbe7df;
  font-size: 0.78rem;
  font-weight: 650;
}

.setpoint-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.setpoint-input-wrap input,
.setpoint-form > input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: #0b1a14;
  font: inherit;
  font-size: 1rem;
}

.binary-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.binary-state-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #66736c;
  box-shadow: 0 0 0 3px rgba(102, 115, 108, 0.12);
}

.binary-state.is-positive .binary-state-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(130, 214, 167, 0.1);
}

.binary-state.is-negative .binary-state-dot {
  background: #d47870;
  box-shadow: 0 0 0 3px rgba(212, 120, 112, 0.1);
}

.setpoint-input-wrap input:focus,
.setpoint-form > input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(130, 214, 167, 0.09);
}

.setpoint-input-wrap span {
  min-width: 34px;
  color: var(--muted);
  font-size: 0.8rem;
}

.setpoint-form > button {
  height: 44px;
  border: 0;
  border-radius: 10px;
  color: #092014;
  background: var(--accent);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 760;
  cursor: pointer;
}

.setpoint-form > button:hover,
.setpoint-form > button:focus-visible {
  background: var(--accent-strong);
  outline: none;
}

.setpoint-note {
  margin: 4px 0 0;
  color: #71867b;
  font-size: 0.68rem;
  line-height: 1.45;
}

.form-wide {
  grid-column: 1 / -1;
}

.incubation-items {
  max-height: 440px;
  display: grid;
  gap: 11px;
  margin-top: 15px;
  overflow-y: auto;
  scrollbar-color: #395447 transparent;
}

.incubation-item {
  padding: 13px;
  border: 1px solid rgba(207, 230, 218, 0.1);
  border-radius: 12px;
  background: rgba(4, 14, 9, 0.26);
}

.incubation-item header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.incubation-item h3 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.25;
}

.incubation-item header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.incubation-item header strong {
  color: var(--accent);
  font-size: 0.82rem;
}

.item-identity {
  min-width: 0;
}

.item-name-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 10px;
}

.tracking-code {
  display: inline-block;
  margin-top: 7px;
  color: #71867b;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
  font-size: 0.59rem;
  letter-spacing: 0.035em;
  text-decoration: none;
}

.tracking-code:hover,
.tracking-code:focus-visible {
  color: var(--accent);
  outline: none;
}

.detail-qr img {
  display: block;
  padding: 4px;
  border-radius: 4px;
  background: #ffffff;
}

.item-recipe {
  display: -webkit-box;
  margin: 9px 0 0;
  overflow: hidden;
  color: #91a69a;
  font-size: 0.68rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.progress-track {
  height: 6px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-track span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #5ebd88, var(--accent));
}

.incubation-item footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 10px;
  margin-top: 9px;
  color: #71867b;
  font-size: 0.6rem;
}

.empty-incubation-list {
  margin: 15px 0 0;
  padding: 20px 12px;
  border: 1px dashed rgba(207, 230, 218, 0.14);
  border-radius: 12px;
  color: #71867b;
  font-size: 0.72rem;
  line-height: 1.5;
  text-align: center;
}

.tracking-detail {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(22, 49, 38, 0.96), rgba(13, 30, 23, 0.96));
  box-shadow: var(--shadow);
}

.tracking-detail .back-link {
  margin-bottom: 38px;
}

.tracking-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.tracking-detail-heading h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
}

.tracking-detail-heading p:not(.node-id) {
  margin: 10px 0 0;
  color: var(--muted);
}

.detail-qr {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.65rem;
  text-decoration: none;
}

.detail-qr:hover,
.detail-qr:focus-visible {
  color: var(--accent);
  outline: none;
}

.tracking-progress {
  margin-top: 34px;
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(4, 14, 9, 0.26);
}

.tracking-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.78rem;
}

.tracking-progress strong {
  color: var(--accent);
}

.tracking-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 0;
}

.tracking-fields > div {
  padding: 16px;
  border: 1px solid rgba(207, 230, 218, 0.1);
  border-radius: 12px;
  background: rgba(4, 14, 9, 0.2);
}

.tracking-fields dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.68rem;
}

.tracking-fields dd {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.tracking-fields .tracking-recipe {
  grid-column: 1 / -1;
}

.login-panel {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(22, 49, 38, 0.94), rgba(13, 30, 23, 0.94));
  box-shadow: var(--shadow);
}

.login-panel {
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 40px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.55rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.login-panel h1 {
  font-size: clamp(2rem, 7vw, 2.8rem);
}

.login-copy {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.back-link {
  display: inline-block;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--text);
}

.login-form {
  display: grid;
  margin-top: 30px;
}

.login-form label {
  margin-bottom: 9px;
  color: #dbe7df;
  font-size: 0.86rem;
  font-weight: 650;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  pointer-events: none;
}

.login-form input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: rgba(5, 14, 10, 0.55);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(130, 214, 167, 0.1);
}

.form-message {
  min-height: 20px;
  margin: 8px 2px 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

.form-error {
  color: var(--danger);
}

.login-form button {
  height: 50px;
  border: 0;
  border-radius: 12px;
  color: #092014;
  background: var(--accent);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.login-form button:hover,
.login-form button:focus-visible {
  background: var(--accent-strong);
  outline: none;
}

.login-form button:active {
  transform: translateY(1px);
}

@media (max-width: 640px) {
  .site-header {
    min-height: 68px;
    padding: 0 18px;
  }

  .brand {
    font-size: 1.08rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .account-label {
    display: none;
  }

  .page-shell {
    width: min(100% - 28px, 1760px);
    padding: 42px 0;
  }

  .environment-card {
    border-radius: 18px;
  }

  .environment-list {
    grid-template-columns: 1fr;
  }

  .environment-media {
    min-height: 210px;
    margin-top: 20px;
  }

  .image-placeholder {
    min-height: 178px;
  }

  .environment-content {
    padding: 24px 20px;
  }

  .environment-heading {
    display: grid;
  }

  .telemetry-state {
    width: fit-content;
  }

  .sensor-grid,
  .greenhouse-sensors {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  }

  .incubator-layout {
    grid-template-columns: 1fr;
  }

  .incubator-sensors {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  }

  .incubation-panel {
    padding: 22px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .incubation-form {
    grid-template-columns: 1fr;
  }

  .incubation-panel-heading {
    align-items: flex-start;
  }

  .panel-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .recipe-explorer-row summary {
    flex-wrap: wrap;
  }

  .recipe-explorer-details div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .dialog-surface {
    padding: 21px 18px;
  }

  .tracking-detail-heading {
    display: grid;
  }

  .detail-qr {
    justify-self: start;
  }

  .tracking-fields {
    grid-template-columns: 1fr;
  }

  .tracking-fields .tracking-recipe {
    grid-column: auto;
  }

  .form-wide {
    grid-column: auto;
  }

  .login-panel {
    border-radius: 18px;
  }

  .login-panel {
    padding: 28px 22px;
  }
}

@media (min-width: 921px) and (max-width: 1200px) {
  .environment-list {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 641px) and (max-width: 920px) {
  .environment-list {
    grid-template-columns: 1fr;
  }

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

  .environment-heading {
    display: grid;
  }

  .telemetry-state {
    width: fit-content;
  }

  .incubator-layout {
    grid-template-columns: 1fr;
  }

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

  .incubation-panel {
    padding: 22px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
