@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800;900&display=swap');

/* ── Tokens ────────────────────────────────────────────────────────────────── */
:root {
    --bg:           #EFF7F1;
    --bg-alt:       #E6F1EA;
    --surface:      #ffffff;
    --text:         #172B3D;
    --text-muted:   #8B959E;
    --text-light:   #B0BAC4;
    --border:       #E2E8ED;
    --green:        #4CCB70;
    --green-dark:   #3DBA60;
    --green-deep:   #1e7c3f;
    --green-tint:   rgba(76,203,112,.08);
    --green-border: rgba(76,203,112,.20);
    --red:          #EF4444;
    --shadow-sm:    0 2px 8px rgba(0,0,0,.04);
    --shadow:       0 8px 32px rgba(0,0,0,.06);
    --shadow-lg:    0 16px 48px rgba(0,0,0,.10);
    --radius-sm:    10px;
    --radius:       18px;
    --radius-lg:    24px;
    --accent-green: #4CCB70;
    --muted-text:   #8B959E;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { text-decoration: none; color: inherit; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ── Header ────────────────────────────────────────────────────────────────── */
.header {
    background: var(--surface);
    padding: 16px 0;
    box-shadow: var(--shadow-sm);
    position: sticky; top: 0; z-index: 100;
    border-radius: 0 0 20px 20px;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}
.logo-img {
    height: 68px;
    width: auto;
    display: block;
    flex-shrink: 0;
}
.logo-text {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 17px;
    font-weight: 800;
    color: var(--green);
    letter-spacing: -.3px;
    line-height: 1;
    white-space: nowrap;
}
.logo-beta {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--green);
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1.4;
    vertical-align: middle;
    opacity: .85;
}
.nav-links a { margin-left: 24px; font-weight: 700; font-size: 15px; transition: color .2s; }
.nav-links a:hover { color: var(--green); }
.nav-coming-soon {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    opacity: .65;
    cursor: default;
    pointer-events: none;
}
.nav-soon-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--green);
    background: rgba(45,106,79,.10);
    border: 1px solid rgba(45,106,79,.22);
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1.4;
    vertical-align: middle;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
footer {
    margin-top: auto;
    background: var(--surface);
    padding: 22px 0;
    text-align: center;
    border-radius: 20px 20px 0 0;
    font-weight: 600; font-size: 14px;
    color: var(--text-muted);
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.footer-copy {
    white-space: nowrap;
}

/* ── Shared badges ─────────────────────────────────────────────────────────── */
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.badge-neutral  { background: rgba(139,149,158,.12); color: #4A5568; }
.badge-lifecycle{ background: rgba(59,130,246,.10);  color: #1D4ED8; }
.badge-ice      { background: rgba(147,197,253,.20); color: #1D4ED8; }
.badge-heat     { background: rgba(252,165,165,.20); color: #991B1B; }
.badge-stable   { background: rgba(167,243,208,.20); color: #065F46; }
.badge-success  { background: rgba(76,203,112,.15);  color: var(--green-deep); }
.badge-warning  { background: rgba(245,158,11,.14);  color: #B45309; }
.badge-danger   { background: rgba(239,68,68,.10);   color: #991B1B; }
.badge-info     { background: rgba(59,130,246,.12);  color: #1D4ED8; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 13px 20px; border-radius: var(--radius-sm);
    font-weight: 800; font-size: 14px; cursor: pointer;
    transition: all .2s; border: none; width: 100%;
}
.btn-primary {
    background: linear-gradient(160deg, var(--green) 0%, var(--green-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(76,203,112,.30);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(76,203,112,.40); }


/* ══════════════════════════════════════════════════════════════════════════════
   INDEX PAGE
══════════════════════════════════════════════════════════════════════════════ */

.page-hero { text-align: center; padding: 48px 0 32px; }
.page-hero h1 { font-size: 40px; font-weight: 900; letter-spacing: -1.5px; margin-bottom: 10px; }
.page-hero p  { color: var(--text-muted); font-size: 16px; font-weight: 600; }
.hero-meta    { margin-top: 8px; font-size: 13px; color: var(--text-light); font-weight: 600; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-btn {
    padding: 8px 16px; border-radius: 20px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px; font-weight: 700;
    background: var(--surface); color: var(--text-muted);
    border: 1.5px solid var(--border);
    cursor: pointer; transition: all .2s;
    display: flex; align-items: center; gap: 6px;
}
.filter-btn:hover { border-color: var(--green); color: var(--green-deep); }
.filter-btn.active { background: var(--green); color: #fff; border-color: var(--green); box-shadow: 0 4px 12px rgba(76,203,112,.30); }
.filter-count { background: rgba(255,255,255,.25); padding: 1px 7px; border-radius: 10px; font-size: 11px; }
.filter-btn:not(.active) .filter-count { background: var(--bg-alt); color: var(--text-muted); }

.plants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px; margin-bottom: 60px;
}
.plant-card {
    background: var(--surface); border-radius: var(--radius-lg); padding: 22px;
    display: flex; flex-direction: column; box-shadow: var(--shadow);
    border: 1.5px solid transparent;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.plant-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--green-border); }
.card-top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.lifecycle-badge {
    display: inline-block; padding: 3px 9px;
    background: rgba(59,130,246,.10); color: #1D4ED8;
    border-radius: 7px; font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .4px;
}
.cat-icon { font-size: 22px; line-height: 1; }
.card-name { font-size: 19px; font-weight: 800; line-height: 1.25; margin-bottom: 3px; }
.card-category { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-bottom: 14px; }
.card-stats { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; margin-top: auto; }
.stat-pill { background: var(--bg); padding: 5px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; }
.stat-pill-green { background: var(--green-tint); color: var(--green-deep); border: 1px solid var(--green-border); }
.planting-hint {
    font-size: 12px; font-weight: 600; color: var(--text-muted);
    margin-bottom: 16px; line-height: 1.5;
    padding: 10px 12px; background: var(--green-tint);
    border-radius: var(--radius-sm); border-left: 3px solid var(--green);
}
.alert-error {
    background: rgba(239,68,68,.08); border-left: 4px solid var(--red);
    color: #991B1B; padding: 14px 18px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 14px; margin: 24px 0;
}
.empty-state { text-align: center; color: var(--text-muted); padding: 60px 0; font-weight: 600; }


/* ══════════════════════════════════════════════════════════════════════════════
   PLANT DETAIL PAGE  —  classes used in plant.php
══════════════════════════════════════════════════════════════════════════════ */

.back-link {
    display: inline-block; font-size: 13px; font-weight: 700;
    color: var(--text-muted); transition: color .2s;
}
.back-link:hover { color: var(--green); }

/* ── Hero block ─────────────────────────────────────────────────────────────── */
.plant-hero {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 20px 0 24px;
    box-shadow: var(--shadow);
}
.plant-hero-name {
    font-size: 36px; font-weight: 900; letter-spacing: -1px;
    line-height: 1.1; margin-bottom: 24px;
}

/* ── Horizontal spec-box tiles ───────────────────────────────────────────────── */
.hero-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.spec-box {
    display: flex; flex-direction: column;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    min-width: 120px;
    flex: 1 1 120px;
}
.spec-label {
    display: block;
    font-size: 11px; font-weight: 800; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .5px;
    margin-bottom: 5px;
}
.spec-val { font-size: 15px; font-weight: 800; color: var(--text); }

/* ── Method pills ────────────────────────────────────────────────────────────── */
.methods-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.method-pill {
    padding: 5px 14px;
    background: var(--green-tint);
    border: 1px solid var(--green-border);
    border-radius: 20px;
    font-size: 12px; font-weight: 700; color: var(--green-deep);
}

/* ── Detail sections ─────────────────────────────────────────────────────────── */
.detail-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.section-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.section-desc  { font-size: 13px; font-weight: 600; color: var(--text-muted); line-height: 1.5; margin-bottom: 18px; }
.subsection-title { font-size: 13px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 10px; }

/* timing section accent stripe */
.timing-section { border-top: 3px solid var(--green); }

/* ── Timing cards grid ───────────────────────────────────────────────────────── */
.timing-grid { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.timing-card {
    flex: 1 1 140px; min-width: 130px;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    border-radius: var(--radius);
    padding: 20px 14px;
    border: 1.5px solid var(--border);
}
.timing-card-icon  { font-size: 28px; line-height: 1; margin-bottom: 10px; }
.timing-card-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 8px; }
.timing-card-val   { font-size: 14px; font-weight: 800; color: var(--text); line-height: 1.3; }
.timing-card-sub   { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-top: 4px; }

.timing-indoor     { background: rgba(59,130,246,.05);  border-color: rgba(59,130,246,.22); }
.timing-direct     { background: rgba(76,203,112,.05);  border-color: var(--green-border); }
.timing-transplant { background: rgba(245,158,11,.05);  border-color: rgba(245,158,11,.22); }
.timing-fall       { background: rgba(249,115,22,.05);  border-color: rgba(249,115,22,.22); }

.zone-note {
    margin-top: 18px; padding: 10px 14px;
    background: var(--bg); border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600; color: var(--text-muted);
}
.zone-note strong { color: var(--text); }

/* ── Temperature blocks ──────────────────────────────────────────────────────── */
.temp-grid { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; margin-bottom: 16px; }
.temp-block {
    flex: 1 1 190px; min-width: 170px;
    border-radius: var(--radius-sm); padding: 16px;
    border: 1.5px solid var(--border);
    background: var(--bg);
}
.temp-block-title { font-size: 13px; font-weight: 800; color: var(--text-muted); margin-bottom: 10px; }

/* ── Spec table (used inside temp-block, soil, etc.) ────────────────────────── */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table td { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.spec-table tr:last-child td { border-bottom: none; }
.spec-cell-label { width: 80px; font-weight: 700; color: var(--text-muted); padding-right: 10px; white-space: nowrap; }
.spec-cell-value { font-weight: 600; color: var(--text); }

/* ── Tolerance row ───────────────────────────────────────────────────────────── */
.tolerance-row { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 16px; border-top: 1px solid var(--border); }
.tolerance-item { display: flex; align-items: center; gap: 10px; }
.tolerance-label { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.tol-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 800; }
.tol-high    { background: rgba(76,203,112,.14);  color: var(--green-deep); }
.tol-medium  { background: rgba(245,158,11,.12);  color: #B45309; }
.tol-low     { background: rgba(239,68,68,.10);   color: #991B1B; }
.tol-neutral { background: rgba(139,149,158,.12); color: #4A5568; }

/* ── Soil & Environment two-column ───────────────────────────────────────────── */
.two-col-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin-top: 8px; }
.soil-tag {
    display: inline-block; margin-right: 6px; margin-bottom: 4px;
    padding: 3px 10px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 12px; font-weight: 700;
}

/* ── GDD section ─────────────────────────────────────────────────────────────── */
.gdd-section { border-top: 3px solid #FBBF24; }
.gdd-boxes { display: flex; flex-wrap: wrap; gap: 14px; }
.gdd-box {
    flex: 1 1 160px; min-width: 150px;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    background: var(--bg);
    border-radius: var(--radius-sm); padding: 20px 14px;
    border: 1.5px solid var(--border);
}
.gdd-box-primary { background: rgba(245,158,11,.06); border-color: rgba(245,158,11,.30); }
.gdd-box-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 10px; }
.gdd-box-val   { font-size: 22px; font-weight: 900; color: var(--text); letter-spacing: -.5px; margin-bottom: 8px; line-height: 1.1; }
.gdd-box-hint  { font-size: 12px; font-weight: 600; color: var(--text-muted); line-height: 1.4; }

/* ── Companion planting ──────────────────────────────────────────────────────── */
.companion-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 8px; }
.companion-col { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.companion-col-title { font-size: 13px; font-weight: 800; padding: 10px 14px; margin: 0; }
.companion-good .companion-col-title { background: rgba(76,203,112,.10); color: var(--green-deep); }
.companion-bad  .companion-col-title { background: rgba(239,68,68,.08);  color: #991B1B; }
.companion-list { list-style: none; padding: 0; margin: 0; }
.companion-list li { padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600; }
.companion-list li:last-child { border-bottom: none; }
.companion-list a { color: var(--green); font-weight: 700; transition: color .2s; }
.companion-list a:hover { text-decoration: underline; color: var(--green-dark); }

/* ── Confidence bar ──────────────────────────────────────────────────────────── */
.confidence-bar {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px; margin-bottom: 32px;
    background: var(--surface); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 700; color: var(--text-muted);
}
.conf-label { white-space: nowrap; }
.conf-badge { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 800; }
.conf-high   { background: rgba(76,203,112,.14);  color: var(--green-deep); }
.conf-medium { background: rgba(245,158,11,.12);  color: #B45309; }
.conf-low    { background: rgba(239,68,68,.10);   color: #991B1B; }


/* ── Forecasts Section ──────────────────────────────────────────────────────── */
.forecasts-section { border-top: 3px solid #3B82F6; }

/* Summary chips */
.forecast-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 20px;
}
.fcs {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1.5px solid transparent;
    min-width: 120px;
}
.fcs-num { font-size: 28px; font-weight: 900; letter-spacing: -1px; line-height: 1; }
.fcs-lbl { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; line-height: 1.4; }
.fcs-green  { background: rgba(76,203,112,.10); border-color: rgba(76,203,112,.28); color: var(--green-deep); }
.fcs-orange { background: rgba(245,158,11,.10);  border-color: rgba(245,158,11,.28);  color: #92400E; }
.fcs-red    { background: rgba(239,68,68,.08);   border-color: rgba(239,68,68,.22);   color: #991B1B; }

/* State pills grid */
.forecast-states-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.sfp {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    border: 2px solid transparent;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s;
    gap: 2px;
}
.sfp:hover { transform: translateY(-3px); box-shadow: var(--shadow); z-index: 1; }
.sfp-abbr  { font-size: 11px; font-weight: 900; letter-spacing: .3px; line-height: 1; }
.sfp-icon  { font-size: 14px; line-height: 1; }

.sfp-green  { background: rgba(76,203,112,.12);  border-color: rgba(76,203,112,.35);  color: var(--green-deep); }
.sfp-orange { background: rgba(245,158,11,.10);  border-color: rgba(245,158,11,.35);  color: #92400E; }
.sfp-red    { background: rgba(239,68,68,.08);   border-color: rgba(239,68,68,.28);   color: #991B1B; }
.sfp-green:hover  { background: rgba(76,203,112,.22); border-color: var(--green); }
.sfp-orange:hover { background: rgba(245,158,11,.20); border-color: #F59E0B; }
.sfp-red:hover    { background: rgba(239,68,68,.16);  border-color: #EF4444; }

/* Legend */
.forecast-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}
.fleg {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 4px;
}
.fleg-green  { background: var(--green); }
.fleg-orange { background: #F59E0B; }
.fleg-red    { background: #EF4444; }



/* ── City Picker ────────────────────────────────────────────────────────────── */
.city-picker-wrap {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.city-picker-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px;
    justify-content: space-between;
}
.city-picker-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
    flex: 1 1 260px;
}
.city-picker-hint {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}
.city-picker-reset {
    font-size: 13px;
    font-weight: 700;
    color: var(--green);
    display: inline-block;
    margin-top: 4px;
}
.city-picker-reset:hover { text-decoration: underline; }

.city-search-box {
    position: relative;
    flex: 0 0 280px;
}
.city-search-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--bg);
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    outline: none;
    transition: border-color .2s;
}
.city-search-input:focus { border-color: var(--green); }
.city-search-input::placeholder { color: var(--text-light); }

.city-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    list-style: none;
    max-height: 260px;
    overflow-y: auto;
    z-index: 50;
}
.city-dropdown.open { display: block; }
.city-dropdown li {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}
.city-dropdown li:last-child { border-bottom: none; }
.city-dropdown li:hover { background: var(--bg-alt); color: var(--green-deep); }

.city-weather-note {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(245,158,11,.08);
    border: 1px solid rgba(245,158,11,.25);
    font-size: 13px;
    font-weight: 600;
    color: #92400E;
    line-height: 1.5;
}

/* ── Weather Bar ────────────────────────────────────────────────────────────── */
.weather-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 18px 24px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
    align-items: center;
}
.weather-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 80px;
    flex: 1;
}
.wb-icon { font-size: 20px; line-height: 1; }
.wb-val  { font-size: 18px; font-weight: 900; color: var(--text); letter-spacing: -.5px; line-height: 1.1; }
.wb-lbl  { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.weather-bar-stale {
    width: 100%;
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(245,158,11,.10);
    border: 1px solid rgba(245,158,11,.25);
    font-size: 12px;
    font-weight: 700;
    color: #92400E;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .logo-img             { height: 30px; }
    .logo-text            { font-size: 14px; }
    .logo-beta            { display: none; }
    .nav-soon-badge       { display: none; }
    .page-hero h1         { font-size: 28px; }
    .plant-hero           { padding: 20px 16px; }
    .plant-hero-name      { font-size: 26px; }
    .detail-section       { padding: 20px 16px; }
    .hero-specs           { gap: 8px; }
    .spec-box             { min-width: 100px; }
    .timing-card          { min-width: 110px; }
    .temp-block           { min-width: 100%; }
    .gdd-box              { min-width: 100%; }
    .two-col-grid         { grid-template-columns: 1fr; }
    .spec-cell-label      { width: 70px; }
    .sfp                  { width: 46px; height: 46px; }
    .fcs                  { min-width: 100px; padding: 8px 14px; }
    .city-picker-inner    { flex-direction: column; }
    .city-search-box      { flex: 0 0 100%; }
    .weather-bar-item     { min-width: 70px; }
    .wb-val               { font-size: 16px; }
}
/* ── 5-day forecast strip (state.php) ──────────────────────────────────────── */
.forecast-strip-wrap {
    max-width: 1100px;
    margin: 0 auto 28px;
    padding: 0 24px;
}
.forecast-strip-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.forecast-strip-tz {
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
    font-size: 12px;
}
.forecast-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.fstrip-day {
    flex: 1;
    min-width: 100px;
    max-width: 180px;
    background: var(--bg-alt);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 12px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: box-shadow .15s;
}
.fstrip-day:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.fstrip-today {
    border-color: var(--green);
    background: rgba(76,203,112,.07);
}
.fstrip-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
}
.fstrip-today .fstrip-label {
    color: var(--green-deep);
}
.fstrip-date {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}
.fstrip-icon {
    font-size: 28px;
    line-height: 1;
    margin: 4px 0;
}
.fstrip-temps {
    display: flex;
    gap: 4px;
    align-items: baseline;
    font-weight: 700;
    font-size: 14px;
}
.fstrip-max { color: var(--text); }
.fstrip-sep { color: var(--text-muted); font-weight: 400; }
.fstrip-min { color: var(--text-muted); font-weight: 500; font-size: 13px; }
.fstrip-pop {
    font-size: 11px;
    color: #3b82f6;
    font-weight: 600;
    margin-top: 2px;
}

/* ── Forecast date label on plant cards (state.php) ─────────────────────────── */
.card-forecast-date {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 6px;
    text-align: center;
}

/* ── Forecast date label on state buttons (plant.php) ───────────────────────── */
.sfp {
    position: relative;
    flex-direction: column;
    gap: 1px;
}
.sfp-date {
    font-size: 8.5px;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    opacity: .8;
    padding: 0 2px;
}
.sfp-date-stale {
    color: #f59e0b;
    opacity: 1;
}

@media (max-width: 768px) {
    .forecast-strip-wrap { padding: 0 16px; }
    .fstrip-day { min-width: 80px; padding: 10px 8px; }
    .fstrip-icon { font-size: 22px; }
    .sfp-date { display: none; }
}

/* ── ZIP lazy-fetch source note ─────────────────────────────────────────────── */
.city-weather-note--fresh {
    background: rgba(76, 203, 112, .10);
    border-color: var(--green);
    color: var(--green-deep);
}

/* ════════════════════════════════════════════════════════════════════════════
   GLOBAL LOCATION PICKER  (header)
   ════════════════════════════════════════════════════════════════════════════ */

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.gloc-wrap {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
}

/* Trigger button */
.gloc-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--bg-alt);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    transition: border-color .2s, background .2s;
    white-space: nowrap;
    user-select: none;
}
.gloc-trigger:hover { border-color: var(--green); background: var(--surface); }
.gloc-trigger-icon  { font-size: 14px; line-height: 1; }
.gloc-trigger-arrow { font-size: 10px; color: var(--text-muted); }
.gloc-trigger-label--set { color: var(--green-deep); }

/* Dropdown panel */
.gloc-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 320px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 10px;
}

.gloc-search-wrap { position: relative; }
.gloc-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 14px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    outline: none;
    transition: border-color .2s;
}
.gloc-input:focus { border-color: var(--green); }
.gloc-input::placeholder { color: var(--text-light); font-weight: 400; }

.gloc-hint {
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 4px 2px;
}

/* Results list */
.gloc-dropdown {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    max-height: 260px;
    overflow-y: auto;
    border-radius: 8px;
}
.gloc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    transition: background .12s;
}
.gloc-item:hover,
.gloc-item--active { background: var(--green-tint); }
.gloc-item-city { flex: 1; }
.gloc-item-meta { font-size: 11px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.gloc-item--loading,
.gloc-item--empty,
.gloc-item--err   { cursor: default; color: var(--text-muted); font-weight: 500; }
.gloc-item--err   { color: #dc2626; }

/* Clear button */
.gloc-clear {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 7px;
    border: none;
    border-radius: 7px;
    background: rgba(239,68,68,.07);
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
}
.gloc-clear:hover { background: rgba(239,68,68,.15); }


/* ════════════════════════════════════════════════════════════════════════════
   PERSONAL FORECAST BANNER  (plant.php)
   ════════════════════════════════════════════════════════════════════════════ */

.my-forecast-banner {
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    background: var(--surface);
    margin-bottom: 20px;
    overflow: hidden;
    transition: border-color .2s;
}
.mfb--green  { border-color: rgba(76,203,112,.50); background: rgba(76,203,112,.05); }
.mfb--orange { border-color: rgba(245,158,11,.45); background: rgba(245,158,11,.04); }
.mfb--red    { border-color: rgba(239,68,68,.40);  background: rgba(239,68,68,.04);  }
.mfb--loading,
.mfb--stale  { border-color: var(--border); background: var(--bg-alt); }

.mfb-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    flex-wrap: wrap;
}
.mfb-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1 1 220px;
}
.mfb-icon  { font-size: 28px; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.mfb-text  { display: flex; flex-direction: column; gap: 3px; }
.mfb-title { font-size: 15px; font-weight: 900; color: var(--text); }
.mfb-sub   { font-size: 13px; font-weight: 600; color: var(--text-muted); }

.mfb-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
.mfb-weather {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.mfb-wx-item {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 8px;
    white-space: nowrap;
}
.mfb-btn {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 8px;
    background: var(--green);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: background .15s;
    white-space: nowrap;
}
.mfb-btn:hover { background: var(--green-dark); }

/* 5-day strip inside banner */
.mfb-strip {
    display: flex;
    gap: 0;
    border-top: 1.5px solid var(--border);
    overflow-x: auto;
}
.mfb-day {
    flex: 1;
    min-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 8px;
    border-right: 1px solid var(--border);
    font-size: 11px;
}
.mfb-day:last-child { border-right: none; }
.mfb-day--today { background: rgba(76,203,112,.07); }
.mfb-day-lbl  { font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
                 font-size: 10px; color: var(--text-muted); }
.mfb-day--today .mfb-day-lbl { color: var(--green-deep); }
.mfb-day-date { font-size: 10px; color: var(--text-muted); }
.mfb-day-icon { font-size: 20px; margin: 2px 0; line-height: 1; }
.mfb-day-temp { font-size: 12px; color: var(--text); }
.mfb-day-temp b { font-weight: 800; }
.mfb-day-temp i { font-style: normal; color: var(--text-muted); }
.mfb-day-pop  { font-size: 10px; color: #3b82f6; font-weight: 700; }


/* ════════════════════════════════════════════════════════════════════════════
   MY STATE  highlight on .sfp grid
   ════════════════════════════════════════════════════════════════════════════ */

.sfp--my-state {
    outline: 2.5px solid var(--green);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(76,203,112,.18);
    transform: translateY(-2px);
    z-index: 2;
}
.sfp--my-state::after {
    content: '📍';
    position: absolute;
    top: -9px;
    right: -6px;
    font-size: 11px;
    line-height: 1;
}


/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .gloc-wrap    { margin-left: 0; flex: 0 0 100%; order: 3; }
    .gloc-trigger { justify-content: center; border-radius: var(--radius-sm); }
    .gloc-panel   { width: 100%; right: auto; left: 0; }

    .mfb-right    { align-items: flex-start; }
    .mfb-weather  { justify-content: flex-start; }

    .mfb-day      { min-width: 58px; padding: 8px 4px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODULE 2 — PLANTING CALENDAR (state.php table)
═══════════════════════════════════════════════════════════════════════════ */

.pcal-wrap {
    margin: 32px 0;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.pcal-header {
    padding: 24px 28px 18px;
    border-bottom: 1px solid var(--green-border);
    background: linear-gradient(135deg, rgba(76,203,112,.06) 0%, transparent 60%);
}

.pcal-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--text);
    margin: 0 0 6px;
}

.pcal-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    margin: 0;
}

.pcal-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.pcal-th {
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--green-border);
    white-space: nowrap;
}

.pcal-th-plant { min-width: 160px; }

.pcal-td {
    padding: 10px 14px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0,0,0,.04);
}

.pcal-td-empty { color: var(--text-light); font-weight: 600; }

.pcal-row:hover td { background: rgba(76,203,112,.04); }
.pcal-row--warn td { background: rgba(245,158,11,.04); }
.pcal-row--warn:hover td { background: rgba(245,158,11,.08); }

.pcal-td-plant { font-weight: 700; }

.pcal-plant-link {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    transition: color .15s;
}
.pcal-plant-link:hover { color: var(--green-deep); }

.pcal-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 4px;
    vertical-align: middle;
}
.pcal-tag--warn { background: rgba(245,158,11,.15); color: #B45309; }
.pcal-tag--cold { background: rgba(147,197,253,.20); color: #1D4ED8; }

/* Event badges */
.pcal-event {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    white-space: nowrap;
}
.pcal-event--today  { background: rgba(76,203,112,.20); color: var(--green-deep); box-shadow: 0 0 0 2px var(--green); }
.pcal-event--soon   { background: rgba(245,158,11,.15); color: #B45309; }
.pcal-event--future { background: var(--bg-alt); color: var(--text); }
.pcal-event--past   { background: transparent; color: var(--text-light); text-decoration: line-through; }

.pcal-adj {
    font-size: 9px;
    color: #2563EB;
    cursor: help;
    margin-left: 2px;
    vertical-align: super;
}

.pcal-days {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 2px;
}
.pcal-days--past  { color: var(--text-light); }
.pcal-days--today { color: var(--green-deep); font-weight: 800; }

.pcal-harvest {
    font-size: 12px;
    font-weight: 700;
    color: var(--green-deep);
    background: var(--green-tint);
    padding: 3px 8px;
    border-radius: 8px;
    white-space: nowrap;
}

.pcal-next {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}
.pcal-next-label { color: var(--text-muted); font-weight: 600; }
.pcal-next-date  { color: var(--green-deep); font-weight: 800; white-space: nowrap; }

.pcal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 28px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    border-top: 1px solid var(--green-border);
    background: var(--bg-alt);
}
.pcal-leg-item { display: flex; align-items: center; gap: 6px; }

.pcal-empty {
    padding: 32px 28px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODULE 2 — PLANTING TIMELINE (plant.php)
═══════════════════════════════════════════════════════════════════════════ */

.plant-calendar-section { overflow: visible; }

.pcal-zone-note {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}
.pcal-zone-note a { color: var(--green-deep); text-decoration: underline; }

.ptl-wrap { margin-top: 20px; }

.ptl-season-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.ptl-season-pill {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
}
.ptl-pill-frost { background: rgba(147,197,253,.20); color: #1D4ED8; }
.ptl-pill-fall  { background: rgba(251,191,36,.15);  color: #92400E; }
.ptl-pill-ok    { background: rgba(76,203,112,.15);  color: var(--green-deep); }
.ptl-pill-warn  { background: rgba(245,158,11,.15);  color: #B45309; }
.ptl-pill-cold  { background: rgba(147,197,253,.15); color: #1D4ED8; }

/* Timeline */
.ptl-timeline { display: flex; flex-direction: column; gap: 0; }

.ptl-item {
    display: flex;
    align-items: flex-start;
    gap: 0;
}
.ptl-item--past { opacity: .55; }

.ptl-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 48px;
}

.ptl-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-sm);
    transition: transform .2s;
}
.ptl-item:hover .ptl-dot { transform: scale(1.08); }

.ptl-dot--today  { background: var(--green); box-shadow: 0 0 0 4px rgba(76,203,112,.25); }
.ptl-dot--soon   { background: rgba(245,158,11,.15); border: 2px solid rgba(245,158,11,.40); }
.ptl-dot--future { background: var(--bg-alt); border: 2px solid var(--green-border); }
.ptl-dot--past   { background: var(--bg-alt); border: 2px dashed var(--text-light); }

.ptl-line {
    width: 2px;
    flex: 1;
    min-height: 24px;
    background: var(--green-border);
    margin: 2px 0;
}

.ptl-card {
    flex: 1;
    margin: 4px 0 16px 14px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: box-shadow .2s;
}
.ptl-card:hover { box-shadow: var(--shadow); }

.ptl-card--today  { background: rgba(76,203,112,.10); border-color: var(--green-border); }
.ptl-card--soon   { background: rgba(245,158,11,.07); border-color: rgba(245,158,11,.25); }
.ptl-card--future { background: var(--surface); border-color: rgba(0,0,0,.06); }
.ptl-card--past   { background: var(--bg-alt); border-color: transparent; }

.ptl-card-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.ptl-card-label {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}

.ptl-card-date {
    font-weight: 900;
    font-size: 14px;
    color: var(--green-deep);
    margin-left: auto;
    white-space: nowrap;
}

.ptl-conf {
    font-size: 11px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 6px;
}
.ptl-conf--medium { background: rgba(245,158,11,.15); color: #B45309; }
.ptl-conf--low    { background: rgba(239,68,68,.10);  color: #991B1B; }

.ptl-card-adj {
    font-size: 11px;
    color: #2563EB;
    font-weight: 600;
    margin-top: 4px;
    line-height: 1.4;
}

.ptl-card-meta { margin-top: 5px; }

.ptl-days-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
}
.ptl-days-badge--future { background: var(--green-tint);          color: var(--green-deep); }
.ptl-days-badge--past   { background: transparent;                color: var(--text-light); }
.ptl-days-badge--today  { background: rgba(76,203,112,.25);       color: var(--green-deep); font-size: 12px; }

.ptl-empty { color: var(--text-muted); font-weight: 600; padding: 16px 0; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .pcal-th, .pcal-td { padding: 8px 10px; }
    .pcal-th:nth-child(5) { display: none; }
    .pcal-td:nth-child(5) { display: none; }
}

@media (max-width: 640px) {
    .pcal-header { padding: 18px 16px 14px; }
    .pcal-legend { padding: 12px 16px; }
    .ptl-card-date { margin-left: 0; }
}

/* ── Watering Forecast ─────────────────────────────────────────────────────── */
.wf-wrap {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin: 24px 0;
    overflow: hidden;
}
.wf-header {
    padding: 20px 28px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}
.wf-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--text);
    margin: 0 0 2px;
}
.wf-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
}
/* Today's hero pill */
.wf-today {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 40px;
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
}
.wf-today--ok        { background: rgba(76,203,112,.15); color: var(--green-deep); }
.wf-today--low       { background: rgba(59,130,246,.12); color: #1D4ED8; }
.wf-today--high      { background: rgba(245,158,11,.15); color: #B45309; }

/* 5-day strip */
.wf-strip {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.wf-strip::-webkit-scrollbar { display: none; }
.wf-day {
    flex: 1 0 90px;
    min-width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px 16px;
    border-right: 1px solid var(--border);
    transition: background .15s;
    cursor: default;
}
.wf-day:last-child { border-right: none; }
.wf-day--today { background: rgba(76,203,112,.06); }
.wf-day:hover  { background: var(--bg); }

.wf-day-label  { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.wf-day-date   { font-size: 11px; font-weight: 600; color: var(--text-light); }
.wf-day-wicon  { font-size: 22px; line-height: 1; margin: 2px 0; }
.wf-day-temps  { font-size: 11px; font-weight: 700; color: var(--text); }
.wf-day-pop    { font-size: 11px; font-weight: 600; color: #3B82F6; }
.wf-day-rain   { font-size: 10px; font-weight: 600; color: #60A5FA; }

/* Action badge */
.wf-day-action {
    margin-top: 4px;
    font-size: 18px;
    line-height: 1;
    title: attr(data-label);
}
.wf-day-act-label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .3px;
    text-align: center;
    line-height: 1.2;
}
.wf-act--skip       .wf-day-act-label { color: var(--green-deep); }
.wf-act--reduce     .wf-day-act-label { color: #2563EB; }
.wf-act--water      .wf-day-act-label { color: var(--text-muted); }
.wf-act--water_more .wf-day-act-label { color: #B45309; }

/* Moisture bar — shows soil water level (Soil Water Balance model).
   Full bar = soil is moist / rain covers need (good).
   Empty bar = soil is dry, manual watering needed.
   Semantics: more fill = better. Colour follows urgency:
     ok   = green  (soil moist, no action needed)
     low  = blue   (some moisture, light watering)
     high = red    (dry + high evaporation, water urgently) */
.wf-day-bar-wrap {
    width: 100%;
    height: 5px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}
.wf-day-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease;
}
.wf-bar--ok    { background: var(--green); }          /* moist — green  */
.wf-bar--low   { background: #60A5FA; }               /* partial — blue  */
.wf-bar--high  { background: #EF4444; }               /* dry + hot — red (was amber) */

/* Footer note */
.wf-footer {
    padding: 10px 28px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
}

/* Personalised banner override on plant page */
.wf-wrap--plant .wf-header { background: rgba(59,130,246,.04); }

@media (max-width: 640px) {
    .wf-header  { padding: 16px 16px 12px; flex-direction: column; }
    .wf-today   { margin-left: 0; }
    .wf-footer  { padding: 10px 16px; }
    .wf-day     { min-width: 76px; padding: 12px 4px 14px; }
}

/* Watering Forecast — placeholder (before location selection) */
.wf-placeholder-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 24px;
    text-align: center;
}
.wf-placeholder-icon { font-size: 36px; line-height: 1; }
.wf-placeholder-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    max-width: 380px;
    line-height: 1.5;
}

/* ── Watering Forecast placeholder (plant page, before location set) ───────── */
.detail-section--nopad { padding: 0; background: none; box-shadow: none; }
.wf-placeholder-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 28px 32px;
    text-align: center;
}
.wf-placeholder-icon { font-size: 36px; line-height: 1; opacity: .5; }
.wf-placeholder-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.5;
}

/* =============================================================================
   MODULE 4: Plant Stress Forecast
   Structure intentionally mirrors the watering forecast (.wf-*) for a unified visual language.
   Differences: stress-level color semantics (none/low/high) instead of watering.
   ============================================================================= */

/* ── Wrapper and header ─────────────────────────────────────────────────────── */
.sf-wrap {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin: 24px 0;
    overflow: hidden;
}
.sf-header {
    padding: 20px 28px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}
.sf-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--text);
    margin: 0 0 2px;
}
.sf-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
}

/* Hero pill — weekly stress summary status */
.sf-today {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 40px;
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}
.sf-today--none { background: rgba(76,203,112,.15); color: var(--green-deep); }
.sf-today--low  { background: rgba(251,191,36,.15);  color: #92400E; }
.sf-today--high { background: rgba(239,68,68,.15);   color: #B91C1C; }

/* ── 5-day strip ──────────────────────────────────────────────────────────── */
.sf-strip {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.sf-strip::-webkit-scrollbar { display: none; }

.sf-day {
    flex: 1 0 90px;
    min-width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px 16px;
    border-right: 1px solid var(--border);
    transition: background .15s;
    cursor: default;
}
.sf-day:last-child { border-right: none; }
.sf-day--today { background: rgba(76,203,112,.06); }
.sf-day:hover  { background: var(--bg); }

/* Stress-level tint — subtle background hint per day */
.sf-day--low  { background: rgba(251,191,36,.07); }
.sf-day--high { background: rgba(239,68,68,.09); }
.sf-day--low.sf-day--today,
.sf-day--high.sf-day--today { /* today overrides tint */ }

.sf-day-label        { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.sf-day-date         { font-size: 11px; font-weight: 600; color: var(--text-light); }
.sf-day-wicon        { font-size: 22px; line-height: 1; margin: 2px 0; }
.sf-day-temps        { font-size: 11px; font-weight: 700; color: var(--text); }

.sf-day-stress {
    margin-top: 4px;
    font-size: 20px;
    line-height: 1;
}
.sf-day-stress-label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .3px;
    text-align: center;
    line-height: 1.2;
    max-width: 80px;
    word-break: break-word;
}
/* Stress label colours */
.sf-day--none .sf-day-stress-label { color: var(--green-deep); }
.sf-day--low  .sf-day-stress-label { color: #92400E; }
.sf-day--high .sf-day-stress-label { color: #B91C1C; }

/* Temp bar — shows how close max temp is to heat stress threshold.
   Semantics: fuller = hotter relative to threshold.
   Colour: green=ok, amber=approaching, red=over threshold */
.sf-day-bar-wrap {
    width: 100%;
    height: 5px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}
.sf-day-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease;
}
.sf-bar--ok   { background: var(--green); }
.sf-bar--low  { background: #FBBF24; }
.sf-bar--high { background: #EF4444; }

/* Footer */
.sf-footer {
    padding: 10px 28px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
}

/* Plant page tint */
.sf-wrap--plant .sf-header { background: rgba(239,68,68,.03); }

/* Placeholder (before location selection) */
.sf-placeholder-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px 28px 32px;
    text-align: center;
}
.sf-placeholder-icon { font-size: 36px; line-height: 1; opacity: .5; }
.sf-placeholder-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .sf-header  { padding: 16px 16px 12px; flex-direction: column; }
    .sf-today   { margin-left: 0; }
    .sf-footer  { padding: 10px 16px; }
    .sf-day     { min-width: 76px; padding: 12px 4px 14px; }
}

/* =============================================================================
   MODULE 5: GDD Growth Prediction
   ============================================================================= */

.gdd-fc-wrap {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin: 24px 0;
    overflow: hidden;
}
.gdd-fc-header {
    padding: 20px 28px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}
.gdd-fc-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--text);
    margin: 0 0 2px;
}
.gdd-fc-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
}

/* Hero pill */
.gdd-fc-hero {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 40px;
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
    background: rgba(59,130,246,.10);
    color: #1D4ED8;
}
.gdd-fc-hero--ripe    { background: rgba(76,203,112,.18); color: var(--green-deep); }
.gdd-fc-hero--soon    { background: rgba(245,158,11,.15); color: #92400E; }
.gdd-fc-hero--growing { background: rgba(59,130,246,.10); color: #1D4ED8; }
.gdd-fc-hero--cold    { background: rgba(147,197,253,.20); color: #1E40AF; }

/* GDD progress bar */
.gdd-fc-progress-wrap {
    padding: 16px 28px 12px;
    border-bottom: 1px solid var(--border);
}
.gdd-fc-progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.gdd-fc-prog-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}
.gdd-fc-prog-val {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}
.gdd-fc-bar-outer {
    height: 10px;
    background: var(--border);
    border-radius: 6px;
    overflow: hidden;
}
.gdd-fc-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width .5s ease;
}
.gdd-bar--early { background: #60A5FA; }
.gdd-bar--mid   { background: #FBBF24; }
.gdd-bar--ripe  { background: var(--green); }

/* 5-day GDD strip */
.gdd-fc-strip {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
}
.gdd-fc-strip::-webkit-scrollbar { display: none; }

.gdd-fc-day {
    flex: 1 0 90px;
    min-width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 14px 6px 14px;
    border-right: 1px solid var(--border);
    transition: background .15s;
    cursor: default;
}
.gdd-fc-day:last-child { border-right: none; }
.gdd-fc-day--today     { background: rgba(76,203,112,.06); }
.gdd-fc-day--harvest   { background: rgba(76,203,112,.12); }
.gdd-fc-day:hover      { background: var(--bg); }

.gdd-fc-day-label  { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.gdd-fc-day-wicon  { font-size: 22px; line-height: 1; margin: 2px 0; }
.gdd-fc-day-temps  { font-size: 11px; font-weight: 700; color: var(--text); }
.gdd-fc-day-gdd    { font-size: 13px; font-weight: 900; color: #F59E0B; }
.gdd-fc-day-total  { font-size: 10px; font-weight: 700; color: var(--text-muted); }
.gdd-day--harvest .gdd-fc-day-total { color: var(--green-deep); font-weight: 900; }

/* Date input row */
.gdd-fc-date-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.gdd-fc-date-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}
.gdd-fc-date-input {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    background: var(--bg);
    outline: none;
    transition: border-color .15s;
}
.gdd-fc-date-input:focus { border-color: var(--green); }
.gdd-fc-date-btn {
    padding: 6px 16px;
    border-radius: 8px;
    background: var(--green);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: opacity .15s;
}
.gdd-fc-date-btn:hover { opacity: .85; }

/* Footer */
.gdd-fc-footer {
    padding: 10px 28px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
}
.gdd-fc-footer--cultivar {
    background: rgba(245, 158, 11, 0.06);
    border-top: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--text-muted, var(--text-light));
    font-weight: 400;
    font-style: italic;
}

/* Strip legend row */
.gdd-fc-strip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 8px 28px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.gdd-fc-strip-meta-item {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}
.gdd-fc-strip-meta-note {
    font-size: 11px;
    font-weight: 600;
    color: #F59E0B;
    width: 100%;
}

/* Row hint inside the +N GDD cell */
.gdd-fc-day-row-hint {
    font-size: 8px;
    font-weight: 700;
    opacity: .65;
    text-transform: uppercase;
    letter-spacing: .2px;
}
.gdd-day--harvest-val { color: var(--green-deep) !important; font-weight: 900; }
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 28px 28px;
    text-align: center;
}
.gdd-fc-placeholder-icon { font-size: 36px; line-height: 1; opacity: .5; }
.gdd-fc-placeholder-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    max-width: 340px;
    line-height: 1.5;
}
.gdd-fc-wrap--plant .gdd-fc-header { background: rgba(245,158,11,.03); }

@media (max-width: 640px) {
    .gdd-fc-header        { padding: 16px 16px 12px; flex-direction: column; }
    .gdd-fc-hero          { margin-left: 0; }
    .gdd-fc-progress-wrap { padding: 12px 16px 10px; }
    .gdd-fc-date-row      { padding: 12px 16px; }
    .gdd-fc-footer        { padding: 10px 16px; }
    .gdd-fc-day           { min-width: 70px; padding: 10px 4px; }
}