/* Appily Eighteen — Greenhouse Pane Tracker */

.page-glasshouse {
  --gh-glass: rgba(255, 255, 255, 0.72);
  --gh-frame: #6b5b3e;
  --gh-frame-dark: #4a3f2c;
  --gh-mist: #e8f0e4;
  --gh-leaf: #8fae7a;
  --gh-leaf-dark: #6d8f5c;
  --gh-amber: #c67d3a;
  --gh-soil: #f3efe6;
  --gh-ink: #2c2419;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(143, 174, 122, 0.18) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 10%, rgba(198, 125, 58, 0.1) 0%, transparent 40%),
    linear-gradient(180deg, var(--gh-mist) 0%, var(--white) 380px);
}

/* ── Hero greenhouse ridge ── */
.gh-hero {
  position: relative;
  padding: clamp(30px, 5vw, 48px) 0 clamp(24px, 4vw, 36px);
  overflow: hidden;
}

.gh-ridge {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background:
    repeating-linear-gradient(
      105deg,
      transparent 0,
      transparent 48px,
      rgba(107, 91, 62, 0.06) 48px,
      rgba(107, 91, 62, 0.06) 50px
    );
}

.gh-condense {
  position: absolute;
  top: 12%;
  right: 8%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
  filter: blur(2px);
}

.gh-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(20px, 4vw, 40px);
  align-items: center;
}

.gh-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gh-leaf-dark);
}

.gh-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.95rem, 4.2vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--gh-ink);
}

.gh-hero h1 em {
  font-style: normal;
  color: var(--gh-amber);
}

.gh-lede {
  margin: 0 0 16px;
  max-width: 540px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
}

.gh-ticker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gh-ticker span {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gh-frame);
  background: var(--gh-glass);
  border: 1px solid rgba(107, 91, 62, 0.15);
}

/* Humidity gauge status */
.gh-gauge {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 20px 24px 16px;
  min-width: 160px;
  border-radius: 50% 50% var(--radius-lg) var(--radius-lg);
  background: linear-gradient(180deg, var(--gh-frame) 0%, var(--gh-frame-dark) 100%);
  color: var(--white);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.gh-gauge-dial {
  position: relative;
  width: 88px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-bottom: 0;
  border-radius: 88px 88px 0 0;
  overflow: hidden;
}

.gh-gauge-fill {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 6px;
  height: 36px;
  background: var(--gh-leaf);
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(-60deg);
  border-radius: 3px;
  transition: transform 0.5s ease, background 0.3s ease;
}

.gh-gauge.is-found .gh-gauge-fill {
  transform: translateX(-50%) rotate(45deg);
  background: #a8e6a0;
}

.gh-gauge.is-miss .gh-gauge-fill {
  transform: translateX(-50%) rotate(-90deg);
  background: #e57373;
}

.gh-gauge-temp {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1;
}

.gh-gauge-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.gh-gauge-code {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.65;
}

/* ── Floor layout ── */
.gh-floor {
  padding: clamp(24px, 4vw, 40px) 0 clamp(52px, 6vw, 80px);
}

.gh-floor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(20px, 3vw, 32px);
  align-items: start;
}

/* Frosted glass lookup pane */
.gh-pane {
  position: relative;
  padding: clamp(22px, 3vw, 30px);
  background: var(--gh-glass);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(107, 91, 62, 0.2);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    var(--shadow);
  overflow: hidden;
}

.gh-pane::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--gh-frame) 0,
    var(--gh-frame) 20px,
    var(--gh-leaf) 20px,
    var(--gh-leaf) 40px
  );
}

.gh-pane-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  padding-top: 6px;
}

.gh-pane-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.3rem;
  background: rgba(143, 174, 122, 0.2);
}

.gh-pane-label {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gh-leaf-dark);
}

.gh-pane h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
}

.gh-pane-note {
  margin: 0 0 20px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.gh-form {
  display: grid;
  gap: 16px;
}

.gh-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gh-ink);
}

.gh-field input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid rgba(107, 91, 62, 0.2);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.85);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.gh-field input:focus {
  outline: none;
  border-color: var(--gh-leaf);
  box-shadow: 0 0 0 3px rgba(143, 174, 122, 0.2);
}

.gh-input-mono {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.gh-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.gh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
}

.gh-btn-primary {
  border: 0;
  background: var(--gh-frame);
  color: var(--white);
}

.gh-btn-primary:hover {
  background: var(--gh-frame-dark);
  color: var(--white);
}

.gh-btn-ghost {
  border: 2px solid var(--gh-frame);
  background: transparent;
  color: var(--gh-frame);
}

.gh-btn-ghost:hover {
  background: var(--gh-soil);
  color: var(--gh-frame-dark);
}

.gh-btn-wide {
  width: 100%;
  margin-top: 8px;
}

.gh-pane-drip {
  position: absolute;
  bottom: 12px;
  right: 18px;
  width: 8px;
  height: 18px;
  border-radius: 0 0 50% 50%;
  background: rgba(143, 174, 122, 0.25);
  animation: gh-drip 3s ease-in-out infinite;
}

.gh-pane-drip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 4px;
  height: 6px;
  background: inherit;
  border-radius: 50%;
  transform: translateX(-50%);
}

@keyframes gh-drip {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50% { transform: scaleY(1.15); opacity: 1; }
}

/* Potting shelf help sidebar */
.gh-shelf {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: 18px 16px;
  background: var(--gh-soil);
  border: 2px solid var(--gh-frame);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.gh-shelf-title {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: 1rem;
  text-align: center;
  color: var(--gh-ink);
}

.gh-shelf-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin: 8px auto 0;
  background: var(--gh-amber);
  border-radius: 2px;
}

.gh-shelf-links {
  display: grid;
  gap: 10px;
}

.gh-pot-link {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.gh-pot-link:hover {
  transform: translateX(4px);
  border-color: var(--gh-leaf);
  box-shadow: var(--shadow-sm);
}

.gh-pot-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 4px 4px;
  font-size: 1.1rem;
  background: rgba(143, 174, 122, 0.15);
}

.gh-pot-link strong {
  display: block;
  font-size: 0.84rem;
  color: var(--gh-ink);
}

.gh-pot-link span {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Results reveal ── */
.gh-reveal {
  margin-top: clamp(28px, 4vw, 44px);
}

.gh-board {
  padding: clamp(24px, 4vw, 36px);
  background: var(--white);
  border: 2px solid var(--gh-frame);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.gh-board-hit {
  border-color: var(--gh-leaf);
  box-shadow: 0 0 0 4px rgba(143, 174, 122, 0.12), var(--shadow);
}

.gh-board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.gh-tag {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gh-tag-ok {
  background: rgba(143, 174, 122, 0.2);
  color: var(--gh-leaf-dark);
}

.gh-tag-warn {
  background: rgba(198, 125, 58, 0.15);
  color: var(--gh-amber);
}

.gh-status-pill {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gh-ink);
  background: var(--gh-soil);
  border: 1px solid var(--line);
}

.gh-order-id {
  margin: 0 0 18px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gh-frame);
  letter-spacing: 0.03em;
}

.gh-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  background: var(--gh-soil);
  border-radius: var(--radius-md);
}

.gh-stats div {
  text-align: center;
}

.gh-stats dt {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.gh-stats dd {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gh-ink);
}

/* Growth shelf progress track */
.gh-growth {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
  padding-top: 20px;
}

.gh-growth-rail {
  position: absolute;
  top: 38px;
  left: 8%;
  right: 8%;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  z-index: 0;
}

.gh-growth-rail::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: calc((var(--gh-step, 1) - 1) / 3 * 100%);
  background: linear-gradient(90deg, var(--gh-leaf), var(--gh-amber));
  border-radius: inherit;
  transition: width 0.5s ease;
}

.gh-shelf-stop {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.gh-shelf-pot {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 6px 6px;
  font-size: 1.3rem;
  background: var(--white);
  border: 2px solid var(--line);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.gh-shelf-stop.is-done .gh-shelf-pot,
.gh-shelf-stop.is-current .gh-shelf-pot {
  border-color: var(--gh-leaf);
  background: rgba(143, 174, 122, 0.12);
}

.gh-shelf-stop.is-current .gh-shelf-pot {
  transform: scale(1.08);
  box-shadow: 0 0 0 4px rgba(143, 174, 122, 0.2);
}

.gh-shelf-stop.is-done .gh-shelf-pot {
  background: rgba(143, 174, 122, 0.22);
}

.gh-shelf-node {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.gh-shelf-stop.is-current .gh-shelf-node,
.gh-shelf-stop.is-done .gh-shelf-node {
  color: var(--gh-leaf-dark);
}

.gh-shelf-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gh-ink);
  line-height: 1.3;
}

/* Miss / idle states */
.gh-board-miss {
  text-align: center;
  padding: 48px 28px;
  background: var(--gh-soil);
  border-style: dashed;
}

.gh-miss-pot {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.7;
}

.gh-board-miss h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.gh-board-miss p {
  margin: 0 0 20px;
  color: var(--ink-soft);
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

.gh-idle {
  text-align: center;
  padding: 56px 24px;
  background: var(--gh-glass);
  border: 2px dashed rgba(107, 91, 62, 0.25);
  border-radius: var(--radius-lg);
}

.gh-idle-frame {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 18px;
  border: 3px solid rgba(107, 91, 62, 0.2);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.gh-idle-mist {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(232, 240, 228, 0.8), transparent 60%);
  animation: gh-mist 4s ease-in-out infinite;
}

@keyframes gh-mist {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}

.gh-idle-seed {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
}

.gh-idle p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .gh-hero-grid {
    grid-template-columns: 1fr;
  }

  .gh-gauge {
    justify-self: start;
  }

  .gh-floor-grid {
    grid-template-columns: 1fr;
  }

  .gh-shelf {
    position: static;
  }

  .gh-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gh-stats div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 6px 0;
    border-bottom: 1px solid var(--line);
  }

  .gh-stats div:last-child { border-bottom: 0; }

  .gh-growth {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .gh-growth-rail { display: none; }
}

@media (max-width: 480px) {
  .gh-growth {
    grid-template-columns: 1fr;
  }

  .gh-form-actions {
    flex-direction: column;
  }

  .gh-btn {
    width: 100%;
  }
}
