/* ============================================================
   SproutSmart — Application Styles (app.css)
   Page-specific CSS extracted from Django templates.
   Global/base styles are in base.css.
   ============================================================ */

/* ── DaisyUI theme: sproutsmart ─────────────────────────── */
[data-theme="sproutsmart"] {
    color-scheme: light;
    --color-primary: #2A6B1A; --color-primary-content: #ffffff;
    --color-secondary: #7DC52F; --color-secondary-content: #1A2B18;
    --color-accent: #1E8A6E; --color-accent-content: #ffffff;
    --color-neutral: #556B50; --color-neutral-content: #ffffff;
    --color-base-100: #F7FAF4; --color-base-200: #EEF7E2;
    --color-base-300: #D0E8C4; --color-base-content: #1A2B18;
    --color-info: #1E8A6E; --color-info-content: #ffffff;
    --color-success: #2A6B1A; --color-success-content: #ffffff;
    --color-warning: #E8951A; --color-warning-content: #1A2B18;
    --color-error: #c0392b; --color-error-content: #ffffff;
}

/* ── Datagrid sticky green header (overrides DaisyUI .table thead) ── */
.datagrid-head th {
    background-color: #3A8A25 !important;
    color: #ffffff !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}
/* Round the first and last th to match rounded-lg (0.5rem) on the container */
.datagrid-head th:first-child { border-radius: 0.5rem 0 0 0; }
.datagrid-head th:last-child  { border-radius: 0 0.5rem 0 0; }


/* ── Auth & Account pages ─────────────────────────────────── */

.auth-wrap {
    max-width: 420px;
    margin: 3rem auto;
}
.auth-wrap h1 { margin-bottom: 0.25rem; }
.auth-subtitle {
    color: var(--c-text-muted);
    margin-bottom: 2rem;
    font-size: 0.97rem;
}
.auth-input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--c-border);
    border-radius: 8px;
    font-size: 0.97rem;
    background: var(--c-surface);
    color: var(--c-text);
    outline: none;
    transition: border-color 0.15s;
    margin-top: 0.3rem;
}
.auth-input:focus { border-color: var(--c-teal); }
.auth-field { margin-bottom: 1.1rem; }
.auth-field label { font-size: 0.9rem; font-weight: 600; color: var(--c-text); }
.field-error { color: #c0392b; font-size: 0.82rem; margin-top: 0.2rem; margin-bottom: 0; }
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    font-size: 0.88rem;
}
.auth-row label { font-weight: 400; display: flex; align-items: center; gap: 0.4rem; color: var(--c-text-muted); }
.auth-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    background: var(--c-lime);
    color: var(--c-text);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.auth-btn:hover { background: #6ab226; }
.auth-link {
    display: block;
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: var(--c-text-muted);
}
.auth-errors {
    background: #fdf0ef;
    border: 1px solid #e8a09a;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.88rem;
    color: #c0392b;
}
.auth-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.auth-wrap--center { text-align: center; }
.auth-wrap--center h1 { margin-bottom: 0.5rem; }
.auth-wrap--center p { color: var(--c-text-muted); margin-bottom: 0.75rem; }
.auth-wrap--wide { max-width: 480px; }
.bad-token {
    background: #fdf0ef;
    border: 1px solid #e8a09a;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.93rem;
    color: #c0392b;
}


/* ── Guest save flow ─────────────────────────────────────── */

.save-wrap {
    max-width: 440px;
    margin: 3rem auto;
}
.save-wrap h1 { margin-bottom: 0.25rem; }
.save-subtitle {
    color: var(--c-text-muted);
    margin-bottom: 2rem;
    font-size: 0.97rem;
}
.save-input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--c-border);
    border-radius: 8px;
    font-size: 0.97rem;
    background: var(--c-surface);
    color: var(--c-text);
    outline: none;
    transition: border-color 0.15s;
    margin-top: 0.3rem;
}
.save-input:focus { border-color: var(--c-teal); }
.save-field { margin-bottom: 1.1rem; }
.save-field label { font-size: 0.9rem; font-weight: 600; color: var(--c-text); }
.save-field .hint { font-size: 0.8rem; color: var(--c-text-muted); margin-top: 0.25rem; }
.save-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    margin-top: 0.5rem;
    background: var(--c-lime);
    color: var(--c-text);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.save-btn:hover { background: #6ab226; }
.signin-link {
    display: block;
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: var(--c-text-muted);
}
.crop-count-tag {
    display: inline-block;
    background: var(--c-lime-light);
    border: 1px solid var(--c-lime);
    color: var(--c-green);
    padding: 0.2rem 0.75rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}
a.crop-count-tag {
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
a.crop-count-tag:hover {
    background: #d4edab;
    border-color: var(--c-green);
}
.save-nav-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.save-nav-row .crop-count-tag { margin-bottom: 0; }
.save-return-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.75rem;
    border-radius: 99px;
    border: 1.5px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
}
.save-return-pill:hover {
    border-color: var(--c-green);
    color: var(--c-green);
    text-decoration: none;
}


/* ── Save confirm page ───────────────────────────────────── */

.confirm-wrap {
    max-width: 480px;
    margin: 4rem auto;
    text-align: center;
}
.confirm-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.confirm-wrap h1 { margin-bottom: 0.5rem; }
.confirm-wrap p { color: var(--c-text-muted); margin-bottom: 0.75rem; }
.resend-form {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}
.resend-form input[type=email] {
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--c-border);
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 220px;
}
.resend-success { color: var(--c-teal); font-weight: 600; margin-top: 1rem; }
.resend-error   { color: #c0392b; font-size: 0.88rem; margin-top: 0.5rem; }


/* ── Form components (gardens/create, gardens/settings) ─── */

.form-card {
    background: var(--c-surface);
    border: 1.5px solid var(--c-border);
    border-radius: 12px;
    padding: 2rem;
    max-width: 480px;
    margin: 0 auto;
}
.contact-intro { max-width: 480px; margin: 0 auto 1.25rem; }
.form-card--wide { max-width: 520px; }
.form-card h1 {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--c-green);
    margin-bottom: 1.5rem;
}
.field-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1.25rem; }
.field-label { font-size: 0.9rem; font-weight: 600; color: var(--c-text); }
.field-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1.5px solid var(--c-border);
    border-radius: 8px;
    font-size: 0.97rem;
    background: var(--c-bg);
    color: var(--c-text);
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
}
.field-input:focus { border-color: var(--c-teal); background: var(--c-surface); }
/* Success state — positive reinforcement when field is valid */
.field-input--valid {
    border-color: var(--c-green);
    background: var(--c-lime-light);
}
.field-input::placeholder { color: var(--c-text-muted); }
.field-hint { font-size: 0.82rem; color: var(--c-text-muted); }
.field-errors { list-style: none; padding: 0; margin: 0; }
.field-errors li { font-size: 0.82rem; color: #c0392b; margin-top: 0.2rem; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 1.75rem; }
.btn-submit {
    flex: 1;
    padding: 0.6rem 1rem;
    background: var(--c-green);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.97rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 2px 6px rgba(42,107,26,0.25);
    transition: background 0.15s, box-shadow 0.15s;
}
.btn-submit:hover { background: var(--c-green-mid); box-shadow: 0 3px 10px rgba(42,107,26,0.35); }
.btn-cancel {
    padding: 0.6rem 1.1rem;
    border: 1.5px solid var(--c-border);
    border-radius: 8px;
    background: var(--c-surface);
    color: var(--c-text-muted);
    font-size: 0.97rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.btn-cancel:hover { border-color: var(--c-green); color: var(--c-green); text-decoration: none; }
.section-divider {
    border: none;
    border-top: 1.5px solid var(--c-border);
    margin: 1.5rem 0;
}
.section-title {
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--c-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}
.check-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    cursor: pointer;
}
.check-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--c-green);
    cursor: pointer;
    flex-shrink: 0;
}
.check-row .check-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--c-text);
    cursor: pointer;
    user-select: none;
}


/* ── Garden list page ────────────────────────────────────── */

.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.list-header h1 { margin-bottom: 0; }
.btn-new {
    display: inline-block;
    padding: 0.5rem 1.1rem;
    background: var(--c-green);
    color: #fff;
    border-radius: 7px;
    font-weight: 700;
    font-size: 0.93rem;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
}
.btn-new:hover { background: var(--c-green-mid); text-decoration: none; color: #fff; }
.garden-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
@media (max-width: 768px) {
    .garden-grid { grid-template-columns: repeat(2, 1fr); }
}
.garden-card {
    background: var(--c-surface);
    border: 1.5px solid var(--c-border);
    border-left: 6px solid var(--gc, var(--c-border));
    border-radius: 10px;
    padding: 1.25rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.garden-card:hover {
    border-color: var(--gc, var(--c-lime));
    border-left-color: var(--gc, var(--c-lime));
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

/* ── Related crops cross-link section (planting_detail page) ── */
.related-crops {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1.5px solid var(--c-border);
}
.related-crops h2 {
    margin-bottom: 1rem;
}
.related-crops__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}
.crop-card {
    background: var(--c-surface);
    border: 1.5px solid var(--c-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.crop-card:hover {
    border-color: var(--c-lime);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.crop-card__category {
    font-size: 0.72rem;
    color: var(--c-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.crop-card__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--c-green);
}

.garden-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--c-green);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.1rem;
}
.garden-card-meta {
    font-size: 0.83rem;
    color: var(--c-text-muted);
    margin-bottom: 0.5rem;
}
.garden-card-count {
    font-size: 0.85rem;
    color: var(--c-text-muted);
    margin-bottom: 0.75rem;
}
.garden-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}
.btn-view {
    flex: 1;
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: var(--c-green);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.87rem;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-view:hover { background: var(--c-green-mid); text-decoration: none; color: #fff; }
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--c-border);
    border-radius: 6px;
    background: var(--c-surface);
    color: var(--c-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: border-color 0.15s, color 0.15s;
}
.btn-icon:hover { border-color: var(--c-green); color: var(--c-green); text-decoration: none; }
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--c-surface);
    border: 1.5px dashed var(--c-border);
    border-radius: 10px;
    margin-top: 1rem;
}
.empty-state p { margin-bottom: 1rem; }


/* ── Garden detail & switcher ────────────────────────────── */

.garden-switcher {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0;
}
.detail-pills {
    flex-wrap: nowrap;
    margin-bottom: 0;
}
.switcher-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 7.5rem;
    padding: 0.35rem 0.9rem 0.35rem 1.3rem;
    border-radius: 0 99px 99px 0;
    margin-left: -16px;
    background: var(--c-surface);
    border: 1.5px solid var(--c-border);
    color: var(--c-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.65;
    box-sizing: border-box;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.switcher-tab:first-child {
    border-radius: 99px;
    margin-left: 0;
    padding-left: 0.9rem;
}
.switcher-tab:hover {
    border-color: var(--gc, var(--c-green));
    color: var(--gc, var(--c-green));
    text-decoration: none;
}
/* Active: filled with the garden's own color */
.switcher-tab--active {
    background: var(--gc, var(--c-green));
    border-color: var(--gc, var(--c-green));
    color: #fff;
    font-weight: 700;
}
.switcher-tab--active:hover { color: #fff; background: var(--gc, var(--c-green)); }
.switcher-tab--active .garden-dot { background: rgba(255,255,255,0.75) !important; }
/* New Garden pill: same chain shape, teal accent */
.switcher-tab--new {
    border-style: dashed;
    border-color: var(--c-teal);
    color: var(--c-teal);
    background: var(--c-surface);
}
.switcher-tab--new:hover {
    background: var(--c-teal-light);
    border-color: var(--c-teal);
    color: var(--c-teal);
}
/* Save Garden pill: bright lime — always the CTA, always rightmost, always unmissable */
.switcher-tab--save {
    border-style: solid;
    border-color: var(--c-lime);
    color: var(--c-text);
    background: var(--c-lime);
    font-weight: 700;
}
.switcher-tab--save:hover {
    background: #8fcf1f;
    border-color: #5a9a10;
    color: var(--c-text);
    text-decoration: none;
}

/* ── Crop detail pills (reuses switcher-tab shape/sizing) ── */
button.switcher-tab {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    /* Explicit values — 'inherit' would override .switcher-tab due to higher specificity */
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.9rem 0.35rem 1.3rem;
    box-sizing: border-box;
}
/* Equal fixed width on all detail pills for pixel-perfect consistency */
/* Subtle shadow gives the pill bar a floating quality above the page content */
.detail-pills .switcher-tab {
    width: 10.5rem;
    min-width: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.07);
}
/* Zone pill gets extra width — it's a label not a CTA, benefits from breathing room */
.detail-pills .switcher-tab--zone {
    width: 12rem;
}
/* Zone pill: lightest/passive — information context only */
.switcher-tab--zone {
    background: #F1F8E9;
    border-color: var(--c-border);
    color: var(--c-green);
    font-weight: 600;
}
.switcher-tab--zone:hover {
    border-color: var(--c-green);
    text-decoration: none;
    color: var(--c-green);
}
/* Add to Garden — default state: solid green makes it the primary action, darkest pill */
.detail-pills button.switcher-tab:not(.switcher-tab--active) {
    background: var(--c-green);
    border-color: var(--c-green);
    color: #fff;
    font-weight: 700;
}
.detail-pills button.switcher-tab:not(.switcher-tab--active):hover {
    background: #14532d;
    border-color: #14532d;
    color: #fff;
    text-decoration: none;
}
/* In Garden state — uses the garden's own colour */
.detail-pills .switcher-tab--active {
    background: var(--gc, #166534);
    border-color: var(--gc, #166534);
    color: #fff;
}
/* Red hover signals removal — only on the interactive button (In Garden toggle), not span (current-page indicator) */
.detail-pills button.switcher-tab--active:hover {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}
/* Current-page span is non-interactive — no pointer or hover feedback */
.detail-pills span.switcher-tab--active {
    cursor: default;
    pointer-events: none;
}
/* Swap label text on active pill hover: show "In Garden" by default, "Remove" on hover */
/* Restrict to true pointer (mouse) devices — touch devices report hover:hover on Android Chrome */
.pill-label-hover { display: none; }
.pill-label-default { display: inline; }
@media (hover: hover) and (pointer: fine) {
    .detail-pills button.switcher-tab--active:hover .pill-label-default { display: none; }
    .detail-pills button.switcher-tab--active:hover .pill-label-hover { display: inline-flex; align-items: center; gap: 4px; }
}
/* Round garden-toggle: swap checkmark for trash icon on hover (pointer devices only) */
.toggle-trash { display: none; }
@media (hover: hover) and (pointer: fine) {
    .garden-toggle--added:hover .toggle-check { display: none; }
    .garden-toggle--added:hover .toggle-trash { display: inline-flex; align-items: center; justify-content: center; }
}

/* ── Workbench Action Bar ── */
/* ── Workbench Action Bar — stacked card trick ── */
.gsm-table-wrap {
    position: relative;
    margin-bottom: 1rem;
}
/* gsm-box: standalone status card above the datagrid */
.gsm-box {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    gap: 0.75rem;
    padding: 0 1rem;
    background: #f0f7eb; /* fallback for browsers without color-mix() */
    background: color-mix(in srgb, var(--gc, var(--c-green)) 6%, var(--c-surface));
    border: 1.5px solid var(--c-border);
    border-left: 4px solid var(--gc, var(--c-border));
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    row-gap: 0;
}
/* Override base.css table defaults within the datagrid */
#crop-table {
    margin-top: 0 !important;
    width: max-content !important; /* expand beyond container — table-wrap scrolls horizontally */
    min-width: 100%;              /* never narrower than the card */
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}
/* gsm-dot and gsm-box__heading: must be CSS classes — h2 element rules in base.css
   beat Tailwind utilities (layered < unlayered in the cascade) */
.gsm-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--gc, var(--c-border));
    flex-shrink: 0;
}
.gsm-box__heading {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--c-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    margin: 0;
    padding-right: 0.75rem;
    border-right: 1.5px solid var(--c-border);
}
@keyframes roll-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.garden-status-msg {
    flex: 1;
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--c-text-muted);
    display: flex;
    align-items: center;
}
.garden-status-msg .gsm-inner {
    display: block;
    animation: roll-up 0.35s ease forwards;
}
.garden-status-msg--flash .gsm-inner {
    color: var(--gc, var(--c-green));
    font-weight: 600;
}
.garden-status-msg--removed .gsm-inner {
    color: var(--c-text-muted);
    font-weight: 500;
}
.garden-status-msg--nudge .gsm-inner {
    display: flex;
    align-items: center;
    width: 100%;
}
.garden-status-msg--nudge .gsm-inner a {
    display: inline-flex;
    align-items: center;
    background: none;
    color: var(--c-green);
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0;
    border-radius: 0;
    text-decoration: none;
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}
.garden-status-msg--nudge .gsm-inner a:hover {
    text-decoration: underline;
    color: var(--c-green);
}

/* Explicit z-index via named classes avoids nth-child index shifting when pills are hidden */
.switcher-tab--zone    { z-index: 30; }
.switcher-tab--active  { z-index: 25; }
.switcher-tab--save    { z-index: 20; }
#detail-garden-btn     { z-index: 10; }

/* Save Garden pill: CSS transition handles grow AND shrink automatically.
   Override garden-badge--hidden for this element only — max-width:0 instead
   of display:none, so transitions work in both directions without JS. */
.detail-pills #detail-save-pill {
    overflow: hidden;
    transition: max-width 0.38s ease-out, margin-left 0.38s ease-out,
                padding-left 0.38s ease-out, padding-right 0.38s ease-out,
                opacity 0.1s ease-in 0.28s;  /* delay: fade only in last 100ms */
}
.detail-pills #detail-save-pill.garden-badge--hidden {
    display: inline-flex !important;   /* override the global display:none */
    max-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    opacity: 0 !important;
    pointer-events: none;
}
.detail-pills #detail-save-pill:not(.garden-badge--hidden) {
    max-width: 10.5rem;
    margin-left: -16px;
    border-width: 1.5px;
    opacity: 1;
    transition: max-width 0.38s ease-out, margin-left 0.38s ease-out,
                padding-left 0.38s ease-out, padding-right 0.38s ease-out,
                border-width 0.38s ease-out,
                opacity 0.1s ease-out;  /* grow-in: fade in immediately */
}

/* Zone index heading row with standalone save pill */
.zone-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.zone-heading-row h1 { margin-bottom: 0; }
/* Zone save pill — inside detail-pills chain; springs in when guest adds a crop */
#zone-save-pill {
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
    transition:
        max-width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
        padding-left 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
        padding-right 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
        border-width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.15s ease-out;
}
#zone-save-pill.garden-badge--hidden {
    display: inline-flex !important;
    max-width: 0 !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-width: 0 !important;
    opacity: 0 !important;
    pointer-events: none;
}
#zone-save-pill:not(.garden-badge--hidden) {
    max-width: 9rem;
    min-width: 0;
    opacity: 1;
    transition:
        max-width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
        padding-left 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
        padding-right 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
        border-width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.1s ease-out;
}

.garden-header {
    margin-bottom: 0.5rem;
}
.garden-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.garden-header-name {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.garden-header-main h1 { margin-bottom: 0; }
.garden-header h1 { margin-bottom: 0.2rem; }
.garden-meta { font-size: 0.88rem; color: var(--c-text-muted); margin-bottom: 0; }
.garden-meta span { font-weight: 600; color: var(--c-teal); }
.btn-settings {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    border-radius: 7px;
    border: 1.5px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.btn-settings:hover { border-color: var(--c-green); color: var(--c-green); text-decoration: none; }
.btn-primary {
    display: inline-block;
    padding: 0.55rem 1.25rem;
    background: var(--c-green);
    color: #fff;
    border-radius: 7px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(42,107,26,0.25);
    transition: background 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { background: var(--c-green-mid); text-decoration: none; color: #fff; box-shadow: 0 3px 10px rgba(42,107,26,0.35); }


/* ── Shared crop table components ────────────────────────── */
/* Used by gardens/detail.html and engine/zone_index.html     */

.frost-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    background: var(--c-teal-light);
    border: 1px solid var(--c-teal);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0 1.25rem;
    font-size: 0.9rem;
}
.frost-stat { display: flex; align-items: center; gap: 0.4rem; }
.frost-stat .label { color: var(--c-text-muted); }
.frost-stat .value { font-weight: 700; color: var(--c-teal); }
/* ── Filter pill navigation (All Crops / My Picks / Sow Now) ── */
/* Standalone component — does NOT extend .btn to avoid base.css overrides */
.filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 1.25rem;
    border-radius: 9999px;
    border: 1.5px solid var(--c-green);
    background: transparent;
    color: var(--c-green);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    text-decoration: none;
}
.filter-pill:hover {
    background: var(--c-green);
    color: #fff;
    box-shadow: 0 3px 10px rgba(42,107,26,0.25);
}
.filter-pill--active {
    background: var(--c-green);
    color: #fff;
    box-shadow: 0 2px 6px rgba(42,107,26,0.25);
}

/* ── This Month filter pill variant ── */
.filter-pill--month {
    gap: 0.4rem;
}
.filter-pill__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3rem;
    border-radius: 9999px;
    background: var(--c-green);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}
.filter-pill--month:hover .filter-pill__badge,
.filter-pill--month.filter-pill--active .filter-pill__badge {
    background: rgba(255,255,255,0.28);
    color: #fff;
}

/* ── Action Plan hero box ── */
.action-plan-box {
    --gc: var(--c-green);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1.5rem 1.1rem;
    gap: 0;
    margin-bottom: 1.25rem;
}
/* Heading row: dot + title + bottom separator line */
.action-plan-heading-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding-bottom: 0.75rem;
    margin-bottom: 0.9rem;
    border-bottom: 1.5px solid var(--c-border);
}
.action-plan-heading {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--c-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
    flex: 1;
}
/* 3-column grid; gap is handled by per-column padding so dividers align exactly */
.action-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    width: 100%;
}
.action-plan-col {
    padding: 0 3rem 0 0;
}
/* Every column after the first gets a left border divider + matching left padding */
.action-plan-col + .action-plan-col {
    padding: 0 3rem 0 3rem;
    border-left: 1.5px solid var(--c-border);
}
.action-plan-col:last-child {
    padding-right: 0;
}
.action-plan-col-header {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-green);
    margin: 0 0 0.35rem 0;
}
.action-plan-col-header--plant  { color: var(--c-amber); }
.action-plan-col-header--harvest { color: var(--c-teal); }
.action-plan-col-body {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--c-text);
    margin: 0;
}
.action-plan-link {
    color: #14532d;                          /* text-green-900 */
    font-weight: 600;                        /* font-semibold */
    text-decoration: underline;
    text-decoration-color: rgba(74,222,128,0.6); /* decoration-green-400/60 */
    text-underline-offset: 4px;              /* underline-offset-4 */
    transition: text-decoration-color 0.15s;
}
.action-plan-link:hover {
    text-decoration-color: #16a34a;          /* decoration-green-600 */
}
.action-plan-body {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    width: 100%;
}
.action-plan-section {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.action-plan-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-teal);
}
.action-plan-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
}
.action-plan-list li {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--c-text);
}
.action-plan-list li.action-plan-more {
    color: var(--c-text-muted);
    font-weight: 400;
    font-style: italic;
}

/* Prose advice text (replaces crop-column layout when ZoneAdvice row exists) */
.action-plan-advice {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--c-text);
    margin: 0;
    max-width: 72ch;
}

/* ── Crop search bar ── */
.search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.4rem 0.75rem;
    border: 1.5px solid var(--c-border);
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}
.search-bar:focus-within {
    border-color: var(--c-green);
    box-shadow: 0 0 0 3px rgba(42,107,26,0.12);
    outline: none;
}
.search-bar svg { flex-shrink: 0; color: var(--c-text-muted); }
.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--c-text);
    font-family: inherit;
}
.search-bar input::placeholder { color: var(--c-text-muted); }

.crop-row[hidden] { display: none; }
.crop-row:hover td { background: #e0f2ec !important; }
.garden-col { width: 56px; text-align: center; padding: 0.4rem 0.5rem !important; position: relative; }
thead .garden-col { font-size: 1.275em; }
/* garden-toggle: colour + hover overrides — shape from DaisyUI btn-circle btn-sm */
.garden-toggle {
    border: 1.5px solid #9ab89a;
    background: var(--c-surface);
    color: var(--c-green);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    box-shadow: none;
}
.garden-toggle:hover { border-color: var(--gc, var(--c-lime)); background: var(--c-lime-light); color: var(--gc, var(--c-green)); }
.garden-toggle--added { background: var(--gc, #166534) !important; border-color: var(--gc, #166534) !important; color: #fff !important; font-size: 0.85rem; }
.garden-toggle--added:hover { background: #c0392b !important; border-color: #c0392b !important; color: #fff !important; }

/* ── Garden dot (colour swatch per garden) ───────────────── */
.garden-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    vertical-align: middle;
}

/* ── Zone garden picker (hover popover) ─────────────────── */
.gp-cell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Summary area: dots + + button */
.gp-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    min-width: 30px;
    min-height: 30px;
}
.gp-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.gp-add {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.gp-dots:hover .gp-add,
.gp-cell:focus-within .gp-add {
    border-color: var(--c-lime);
    background: var(--c-lime-light);
    color: var(--c-green);
}
.gp-dots--has .gp-add { display: none; }

/* Lift and highlight the active row when the garden picker is open */
.crop-row:has(td.garden-col:hover),
.crop-row:has(.gp-cell:focus-within) {
    position: relative;
    z-index: 10;
    box-shadow: inset 3px 0 0 var(--c-teal), inset 0 1px 0 var(--c-teal), inset 0 -1px 0 var(--c-teal);
}
/* Must target td directly — tr background is hidden beneath td backgrounds */
.crop-row:has(td.garden-col:hover) td,
.crop-row:has(.gp-cell:focus-within) td {
    background-color: #c8e8e0 !important;
}

/* Popover panel — fixed so it escapes table overflow/stacking context */
.gp-popover {
    visibility: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.25s;
    position: fixed;
    z-index: 1000;
    background: #fff;
    border: 1.5px solid var(--c-border);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
    min-width: 200px;
    max-height: 350px;
    overflow-y: auto;
    padding: 0.35rem 0;
    white-space: nowrap;
}
.gp-popover--down { /* unused stub */ }
td.garden-col:hover .gp-popover,
.gp-cell:focus-within .gp-popover,
.gp-popover:hover {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0s;
}

/* Individual garden row inside popover */
.gp-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.45rem 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--c-text);
    text-align: left;
    transition: background 0.1s;
}
.gp-row:hover { background: var(--c-lime-light); }
.gp-row--active { font-weight: 600; }
.gp-row--active:hover { background: #fde8e8; }
.gp-swatch {
    width: 12px; height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.gp-name { flex: 1; }
.gp-name small { font-weight: 400; color: var(--c-text-muted); }
.gp-check { color: var(--c-green); font-weight: 700; min-width: 1em; text-align: right; }


/* ── Planting schedule index ─────────────────────────────── */

.breadcrumb { font-size: 0.85rem; color: var(--c-text-muted); margin: 0 0 0rem; }
.breadcrumb a { color: var(--c-teal); }
/* Garden prefix inside the detail h1 — wrapper collapses to 0 so crop name sits flush left when not in garden */
.detail-garden-prefix-wrap {
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 0;
    opacity: 0;
    /* transition injected by JS after load so there's no flash on initial render */
}
.detail-garden-prefix { text-decoration: none; padding-right: 0.3em; }
.detail-garden-prefix:hover { text-decoration: underline; }
/* Familiar crop type appended to h1, e.g. "Adelaide · Carrot" */
.detail-crop-type {
    font-size: 0.9em;
    font-weight:750;
    color: var(--c-text-muted);
    letter-spacing: 0.02em;
    margin-left: 0.3em;
}

.schedule-direct-sow {
    color: var(--c-text-muted);
    font-style: italic;
}

/* ── Global toast notification ── */
#zone-toast {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%) translateY(-0.75rem);
    background: var(--c-surface);
    border: 2px solid var(--gc-toast, #166534);
    border-radius: 2rem;
    padding: 0.55rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gc-toast, #166534);
    box-shadow: 0 4px 20px rgba(0,0,0,0.13);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
}
#zone-toast.zone-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
#zone-toast.zone-toast--remove {
    border-color: var(--c-border);
    color: var(--c-text-muted);
}

.planting-hero {
    background: linear-gradient(135deg, var(--c-green) 0%, #1a4d10 100%);
    border-radius: 12px;
    padding: 2.5rem 2rem 2rem;
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero-icon {
    position: absolute; right: 1rem; bottom: 1.5rem;
    width: 175px; height: 175px;
    object-fit: contain; opacity: 0.12;
    pointer-events: none; user-select: none;
}
.planting-hero h1 { color: #fff; font-size: 2rem; margin-bottom: 0.6rem; }
.planting-hero p  { color: rgba(255,255,255,0.82); margin-bottom: 0.5rem; font-size: 1.05rem; }
.planting-hero p:last-child { margin-bottom: 0; }
.zip-form {
    display: flex;
    gap: 0.6rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    align-items: stretch;
}
.zip-form input[type="text"] {
    padding: 0.75rem 1.1rem;
    border-radius: 8px;
    border: none;
    font-size: 1.1rem;
    flex: 1;
    min-width: 160px;
    max-width: 260px;
    color: var(--c-text);
    background: #fff;
    outline: none;
}
.zip-form button {
    padding: 0.75rem 1.4rem;
    border-radius: 8px;
    border: none;
    background: var(--c-lime);
    color: var(--c-green);
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.15s;
}
.zip-form button:hover { background: #a3e635; }
/* GPS location detect button — .zip-form .btn-gps beats .zip-form button specificity */
.zip-form .btn-gps,
.btn-gps {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    padding: 0;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.55);
    background: transparent;
    color: #fff;
    font-size: inherit;
    font-weight: normal;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.zip-form .btn-gps:hover,
.btn-gps:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.9); }
.zip-form .btn-gps:disabled,
.btn-gps:disabled { opacity: 0.4; cursor: not-allowed; }
.zone-setup-card .zip-form .btn-gps,
.zone-setup-card .btn-gps {
    border-color: var(--c-border);
    background: transparent;
    color: var(--c-text-muted);
}
.zone-setup-card .zip-form .btn-gps:hover,
.zone-setup-card .btn-gps:hover { background: var(--c-lime-light); border-color: var(--c-lime); color: var(--c-green); }
#zip-hero-result { margin-top: 0.6rem; min-height: 1.2em; }
#zip-hero-result .zip-error { color: #fca5a5; font-size: 0.9rem; margin: 0; }
.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-top: 1.25rem;
}
.hero-feature {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.78);
}
.hero-feature::before { content: '✓'; color: var(--c-lime); font-weight: 700; }
.zone-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.zone-section-header h2 { margin: 0; }

/* ── Personalised zone home header (logged-in branch) ────────── */

.zone-home-header {
    margin-top: 1.5rem;
    margin-bottom: 1.25rem;
}
.zone-home-header h1 { margin-bottom: 0.25rem; }
.zone-home-meta {
    font-size: 0.88rem;
    color: var(--c-text-muted);
    margin: 0;
}
.zone-home-meta a { color: var(--c-teal); text-decoration: none; }
.zone-home-meta a:hover { text-decoration: underline; }

/* ── Zone onboarding card (new auth user, no zone set) ─────── */

.zone-setup-card {
    max-width: 520px;
    margin: 3rem auto;
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--c-surface);
    border: 1.5px solid var(--c-border);
    border-radius: 14px;
}
.zone-setup-card .hero-icon {
    width: 80px; height: 80px;
    opacity: 0.85;
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.zone-setup-card h1 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.zone-setup-card p { color: var(--c-text-muted); margin-bottom: 1.25rem; }
.zone-setup-card .zip-form {
    justify-content: center;
    margin-top: 0;
}
.zone-setup-card .zip-form input[type="text"] {
    background: var(--c-bg);
    border: 1.5px solid var(--c-border);
    color: var(--c-text);
}
.zone-setup-or {
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: var(--c-text-muted);
    margin-bottom: 0;
}
.zone-setup-or a { color: var(--c-teal); text-decoration: none; }
.zone-setup-or a:hover { text-decoration: underline; }
.zone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
}
.zone-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-surface);
    border: 1.5px solid var(--c-border);
    border-radius: 8px;
    padding: 0.75rem 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.93rem;
    color: var(--c-green);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.zone-card:hover {
    border-color: var(--c-lime);
    background: var(--c-lime-light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    text-decoration: none;
    color: var(--c-green);
}
.zone-card--selected {
    flex-direction: column;
    border-color: var(--c-lime);
    background: var(--c-lime);
    color: #fff;
    box-shadow: 0 2px 8px var(--c-green);
}
.zone-card--selected:hover {
    border-color: var(--c-green-mid);
    background: var(--c-lime);
    color: #fff;
}
.zone-card-my-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 650;
    color: rgba(255,255,255,0.82);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.15rem;
}

/* ── Danger zone (garden delete) ─────────────────────────── */

.danger-zone {
    border-color: #fca5a5;
    margin-top: 1.25rem;
}
.danger-zone .section-title { color: #c0392b; }
.danger-zone-desc { font-size: 0.9rem; color: var(--c-text-muted); margin-bottom: 0.9rem; }

/* ── Confirm modal ───────────────────────────────────────── */

[x-cloak] { display: none !important; }

/* Modal box: white card. overflow:hidden clips green header to the border-radius. */
.confirm-modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 0 2rem 1.5rem;   /* no top padding — header bleeds edge-to-edge */
    max-width: 560px;
    width: calc(100% - 2rem);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.confirm-modal-title {
    background: var(--c-green);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 1rem 2rem;
    margin: 0 -2rem 1.25rem; /* negative side margins bleed to box edges */
}
.confirm-modal-body {
    font-size: 0.93rem;
    color: var(--c-text-muted);
    margin: 0 0 1.5rem;
    line-height: 1.5;
}
.confirm-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    align-items: stretch;
}
/* form wrapper inside actions must not interrupt the flex layout */
.confirm-modal-actions form { display: contents; }
body.modal-open { overflow: hidden; }


/* ── Email management ────────────────────────────────────── */

.email-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.email-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--c-border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    flex-wrap: wrap;
}
.email-row:has(.email-radio:checked) {
    border-color: var(--c-teal);
    background: var(--c-teal-light);
}
.email-radio { accent-color: var(--c-teal); cursor: pointer; flex-shrink: 0; }
.email-address { font-size: 0.95rem; color: var(--c-text); flex: 1; word-break: break-all; }
.email-badges { display: flex; gap: 0.35rem; flex-shrink: 0; }
.email-badge--primary  { background: var(--c-lime-light); color: var(--c-green); border-color: var(--c-lime); }
.email-badge--verified { background: var(--c-teal-light); color: var(--c-teal); border-color: var(--c-teal); }
.email-badge--unverified { background: var(--c-amber-light); color: #92400e; border-color: var(--c-amber); }

.email-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.btn-remove {
    padding: 0.6rem 1rem;
    border: 1.5px solid #fca5a5;
    border-radius: 8px;
    background: #fff5f5;
    color: #c0392b;
    font-size: 0.97rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.btn-remove:hover { background: #fef2f2; border-color: #c0392b; }

/* ── Profile ─────────────────────────────────────────────── */

.profile-saved {
    background: var(--c-teal-light);
    border: 1px solid var(--c-teal);
    color: var(--c-teal);
    border-radius: 7px;
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.profile-zone-hint {
    margin-top: -0.75rem;
    margin-bottom: 1.25rem;
}
.profile-email-link {
    display: inline;
    margin: 0 0 0 0.4rem;
    font-size: 0.88rem;
    color: var(--c-teal);
    font-weight: 600;
}

/* ── Dashboard ───────────────────────────────────────────── */

.page-intro { color: var(--c-text-muted); margin-bottom: 1.75rem; font-size: 1rem; }
.dashboard-form { max-width: 580px; margin: 0.5rem auto 0; }
.dashboard-form .form-group { margin-bottom: 1.4rem; }
.dashboard-form .form-group label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--c-text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
}
.dashboard-form select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-size: 1rem;
    border: 1.5px solid var(--c-border);
    border-radius: 7px;
    background: var(--c-surface);
    color: var(--c-text);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232A6B1A' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.dashboard-form select:focus {
    outline: none;
    border-color: var(--c-lime);
    box-shadow: 0 0 0 3px rgba(125,197,47,0.18);
}
.geo-bar { margin-bottom: 1.5rem; }
.geo-bar-row { display: flex; align-items: center; gap: 0; }
.geo-bar input {
    flex: 1;
    padding: 0.6rem 0.9rem;
    font-size: 0.97rem;
    border: 1.5px solid var(--c-border);
    border-right: none;
    border-radius: 7px 0 0 7px;
    outline: none;
    color: var(--c-text);
    background: var(--c-surface);
    transition: border-color 0.15s;
}
.geo-bar input:focus { border-color: var(--c-lime); }
.geo-bar button {
    background: var(--c-green);
    color: white;
    border: none;
    padding: 0.6rem 1.1rem;
    border-radius: 0 7px 7px 0;
    cursor: pointer;
    font-size: 0.93rem;
    font-weight: 600;
    transition: background 0.15s;
    white-space: nowrap;
}
.geo-bar button:hover { background: var(--c-green-mid); }
.geo-bar button:disabled { opacity: 0.55; cursor: not-allowed; }
#geo-status { display: block; margin-top: 0.4rem; font-size: 0.85rem; color: var(--c-amber); min-height: 1.2em; }


/* ── Dashboard result card (HTMX partial) ────────────────── */

.result-card h3 { margin-top: 1.25rem; }
.result-card .detail-link { margin-top: 1.25rem; font-size: 0.87rem; color: var(--c-text-muted); }
.result-card .detail-link a { color: var(--c-teal); font-weight: 600; }


/* ── Mobile ──────────────────────────────────────────────── */

@media (max-width: 600px) {
    .action-plan-grid { grid-template-columns: 1fr; }
    .action-plan-col,
    .action-plan-col + .action-plan-col {
        padding: 0.9rem 0 0;
        border-left: none;
        border-top: 1.5px solid var(--c-border);
    }
    .action-plan-col:first-child {
        padding-top: 0;
        border-top: none;
    }
    .garden-grid { grid-template-columns: 1fr; }
    .planting-hero { padding: 1.75rem 1.25rem 1.5rem; }
    .planting-hero h1 { font-size: 1.5rem; }
    .zone-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
    .frost-bar { flex-direction: column; gap: 0.35rem; }
    .garden-header { flex-direction: column; }
    /* gsm-box: hide label on mobile to give full width to the status message */
    .gsm-dot,
    .gsm-box__heading { display: none; }
    .gsm-box { padding: 0.5rem 0.75rem; gap: 0.5rem; margin-bottom: -0.75rem; }
    .garden-status-msg { font-size: 0.82rem; }
    /* stack message text and save link vertically on narrow screens */
    .garden-status-msg--nudge .gsm-inner { flex-wrap: wrap; gap: 0.25rem; }
    .garden-status-msg--nudge .gsm-inner a { margin-left: 0; }
}
