/* ============================================================
   BURGI GARDEN — Domain views (plants, beds, detail, login)
   ============================================================ */

/* ── Filter bar (chips, like finance app chart filters) ── */
.filter-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-bottom: var(--space-md);
}
.filter-sep { width: 1px; height: 20px; background: var(--glass-border); margin: 0 2px; }
.filter-chip {
    padding: 5px 14px; border-radius: var(--radius-pill);
    background: var(--bg-elevated); border: 1px solid var(--glass-border);
    color: var(--text-secondary); font-size: var(--font-size-xs); font-weight: 600;
    cursor: pointer; transition: all var(--transition-fast); white-space: nowrap;
}
.filter-chip:hover { color: var(--text-primary); border-color: rgba(16,185,129,0.4); }
.filter-chip.active {
    background: rgba(16,185,129,0.15); color: var(--accent-emerald);
    border-color: var(--accent-emerald); box-shadow: var(--glow-emerald);
}
.filter-chip.chip-care.active { background: rgba(224,179,65,0.15); color: var(--accent-gold); border-color: var(--accent-gold); box-shadow: var(--glow-gold); }
.filter-chip.chip-tag.active { background: rgba(167,139,250,0.15); color: var(--accent-lavender); border-color: var(--accent-lavender); }
.filter-meta { font-size: var(--font-size-xs); color: var(--text-muted); margin-bottom: var(--space-md); }

/* ── Watering recommendation list ── */
.water-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-md); }
.water-bed {
    border: 1px solid rgba(56,189,248,0.25); border-left: 4px solid var(--accent-sky);
    border-radius: var(--radius-lg); padding: var(--space-md); background: var(--bg-card);
}
.water-bed h4 { display: flex; align-items: center; gap: 8px; font-size: var(--font-size-md); color: var(--text-primary); margin-bottom: 6px; }
.water-bed h4 .material-symbols-outlined { color: var(--accent-sky); font-size: 20px; }
.water-bed .plant-line { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: var(--font-size-sm); color: var(--text-secondary); border-top: 1px solid rgba(56,189,248,0.08); }
.water-bed .plant-line:first-of-type { border-top: none; }
.water-bed .plant-line .dot-h { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--accent-emerald); }
/* watering levels */
.water-bed.wl-2 { border-left-color: var(--accent-clay); border-color: rgba(224,122,95,0.30); box-shadow: 0 0 14px rgba(224,122,95,0.10); }
.water-bed.wl-1 { border-left-color: var(--accent-sky); }
.water-bed.wl-0 { border-left-color: var(--accent-emerald); }
.water-bed h4 .material-symbols-outlined { font-size: 20px; }
.water-bed.wl-2 h4 .material-symbols-outlined { color: var(--accent-clay); }
.water-bed.wl-1 h4 .material-symbols-outlined { color: var(--accent-sky); }
.water-bed.wl-0 h4 .material-symbols-outlined { color: var(--accent-emerald); }
.wl-sentence { font-size: var(--font-size-sm); color: var(--text-primary); }
.wl-tag { margin-left: auto; padding: 1px 9px; border-radius: var(--radius-pill); font-size: 10px; font-weight: 700; }
.wl-tag-0 { background: rgba(16,185,129,0.15); color: var(--accent-emerald); }
.wl-tag-1 { background: rgba(56,189,248,0.15); color: var(--accent-sky); }
.wl-tag-2 { background: rgba(224,122,95,0.18); color: var(--accent-clay); }

/* ── Card grid (plants + beds) ── */
.garden-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-lg);
}

.garden-card {
    display: flex; flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    text-decoration: none; color: inherit;
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}
.garden-card:hover {
    transform: translateY(-4px);
    border-color: rgba(16,185,129,0.35);
    box-shadow: 0 12px 28px rgba(0,0,0,0.35), var(--glow-emerald);
}

.garden-card .thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-deep));
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.garden-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.garden-card .thumb .placeholder { font-size: 46px; opacity: 0.55; }
.garden-card .thumb .health-tag {
    position: absolute; top: 8px; right: 8px;
    backdrop-filter: blur(6px); background: rgba(7,20,14,0.55);
}

.garden-card .body { padding: var(--space-md); flex: 1; display: flex; flex-direction: column; gap: 6px; }
.garden-card .title { font-weight: 700; font-size: var(--font-size-md); color: var(--text-primary); }
.garden-card .subtitle { font-size: var(--font-size-xs); color: var(--text-muted); font-style: italic; }
.garden-card .meta-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }

/* ── Month chips ── */
.month-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.month-chip {
    width: 26px; height: 22px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-family: var(--font-mono); font-weight: 600;
    background: var(--bg-input); color: var(--text-muted);
    border: 1px solid transparent;
}
.month-chip.on-prune { background: rgba(16,185,129,0.18); color: var(--accent-emerald); border-color: rgba(16,185,129,0.4); }
.month-chip.on-fert  { background: rgba(224,179,65,0.18); color: var(--accent-gold); border-color: rgba(224,179,65,0.4); }
.month-chip.on-spray { background: rgba(56,189,248,0.18); color: var(--accent-sky); border-color: rgba(56,189,248,0.4); }
.month-chip.current { outline: 2px solid var(--accent-bloom); outline-offset: 1px; }

.legend { display: flex; flex-wrap: wrap; gap: var(--space-md); margin: var(--space-sm) 0 var(--space-md); }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: var(--font-size-xs); color: var(--text-muted); }
.legend .dot { width: 10px; height: 10px; border-radius: 3px; }
.dot.prune { background: var(--accent-emerald); }
.dot.fert  { background: var(--accent-gold); }
.dot.spray { background: var(--accent-sky); }

/* ── Detail layout ── */
.detail-grid { display: grid; grid-template-columns: 320px 1fr; gap: var(--space-xl); align-items: start; }
.detail-hero {
    border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--glass-border);
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-deep));
    aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
}
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero .placeholder { font-size: 72px; opacity: 0.5; }

.detail-title { font-size: var(--font-size-2xl); font-weight: 800; letter-spacing: -0.02em; }
.detail-latin { font-style: italic; color: var(--text-muted); margin-bottom: var(--space-md); }

.kv-list { display: grid; grid-template-columns: max-content 1fr; gap: 10px var(--space-lg); margin-top: var(--space-md); }
.kv-list dt { font-size: var(--font-size-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 600; }
.kv-list dd { font-size: var(--font-size-sm); color: var(--text-primary); }

.upload-form { margin-top: var(--space-md); display: flex; gap: var(--space-sm); align-items: center; }
.upload-form input[type="file"] { font-size: var(--font-size-xs); }

.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); text-decoration: none; font-size: var(--font-size-sm); margin-bottom: var(--space-md); }
.back-link:hover { color: var(--accent-emerald); }

/* ── Edit panel (write-back forms) — hidden until toggled ── */
.edit-toggle { margin-top: var(--space-lg); }
.edit-panel {
    display: none;
    margin-top: var(--space-md); padding: var(--space-lg);
    border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
    background: var(--bg-card);
}
.edit-panel.open { display: block; animation: fadeIn var(--transition-slow) ease; }
.edit-panel h3 { display: flex; align-items: center; gap: 8px; font-size: var(--font-size-md); color: var(--text-primary); margin-bottom: var(--space-md); }
.edit-panel h3 .material-symbols-outlined { color: var(--accent-emerald); font-size: 20px; }
.edit-form { display: flex; flex-direction: column; gap: var(--space-md); max-width: 420px; }
.edit-form .field { display: flex; flex-direction: column; gap: 4px; }
.edit-form label { font-size: var(--font-size-xs); }
.edit-form .check-row { flex-direction: row; align-items: center; gap: 8px; cursor: pointer; }
.edit-form .check-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent-emerald); cursor: pointer; }
.edit-form .check-row span { font-size: var(--font-size-sm); color: var(--text-primary); font-weight: 600; text-transform: none; letter-spacing: 0; }
.edit-form .btn { align-self: flex-start; }

/* ── Weather summary banner ── */
.water-banner {
    display: flex; align-items: center; gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg); margin-bottom: var(--space-lg);
    border: 1px solid var(--glass-border); background: var(--glass-bg);
}
.water-banner .material-symbols-outlined { font-size: 34px; }
.water-banner.dry { border-left: 4px solid var(--accent-clay); }
.water-banner.dry .material-symbols-outlined { color: var(--accent-clay); }
.water-banner.wet { border-left: 4px solid var(--accent-sky); }
.water-banner.wet .material-symbols-outlined { color: var(--accent-sky); }
.water-banner .big { font-family: var(--font-mono); font-size: var(--font-size-xl); font-weight: 700; }

/* ── Care-now lists (dashboard) ── */
.care-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-lg); }
.care-col h4 { display: flex; align-items: center; gap: 6px; font-size: var(--font-size-sm); margin-bottom: var(--space-sm); }
.care-col ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.care-col li { font-size: var(--font-size-sm); color: var(--text-secondary); padding: 4px 0; border-bottom: 1px solid rgba(16,185,129,0.06); }

/* ── Settings rows ── */
.setting-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--space-md) 0; border-bottom: 1px solid rgba(16,185,129,0.07); gap: var(--space-md);
}
.setting-row:last-child { border-bottom: none; }
.setting-row .label { font-weight: 600; color: var(--text-primary); }
.setting-row .sub { font-size: var(--font-size-xs); color: var(--text-muted); }
.status-ok { color: var(--accent-emerald); }
.status-off { color: var(--accent-clay); }

/* ── Care journal timeline ── */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.tl-item:not(:last-child)::before {
    content: ''; position: absolute; left: 5px; top: 16px; bottom: 0;
    width: 2px; background: var(--glass-border);
}
.tl-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 3px; flex-shrink: 0; position: relative; z-index: 1; }
.tl-body { flex: 1; min-width: 0; }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.action-badge { padding: 2px 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; }
.sev-badge { padding: 1px 8px; border-radius: var(--radius-pill); font-size: 10px; font-weight: 700; border: 1px solid; background: transparent; }
.tl-plant { color: var(--text-primary); font-weight: 600; text-decoration: none; font-size: var(--font-size-sm); }
.tl-plant:hover { color: var(--accent-emerald); }
.tl-date { color: var(--text-muted); font-size: 12px; font-family: var(--font-mono); margin-left: auto; }
.tl-line { font-size: var(--font-size-sm); color: var(--text-secondary); margin-top: 2px; }
.tl-line strong { color: var(--text-primary); }
.tl-followup { color: var(--accent-gold); }

/* ── Login ── */
.login-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: var(--space-lg); position: relative; z-index: 1;
}
.login-card {
    width: 100%; max-width: 420px; text-align: center;
    background: var(--glass-bg); backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border); border-radius: var(--radius-xl);
    padding: var(--space-2xl) var(--space-xl);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.login-card .logo-mark { font-size: 52px; filter: drop-shadow(0 0 14px rgba(16,185,129,0.5)); }
.login-card h1 {
    font-size: var(--font-size-2xl); font-weight: 800; margin: var(--space-md) 0 var(--space-xs);
    background: linear-gradient(135deg, var(--accent-emerald), var(--accent-lime));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.login-card .tagline { color: var(--text-secondary); font-size: var(--font-size-sm); margin-bottom: var(--space-xl); }
/* Login button — same design as finance app, garden (emerald) colors */
.btn-google {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 12px 24px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    color: var(--accent-emerald);
    font-family: var(--font-sans); font-size: 0.9rem; font-weight: 600;
    text-decoration: none; transition: all 0.25s ease;
}
.btn-google:hover {
    background: rgba(16, 185, 129, 0.18);
    border-color: var(--accent-emerald);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
    transform: translateY(-1px);
}
.btn-google svg { width: 18px; height: 18px; flex-shrink: 0; }
.login-dev { margin-top: var(--space-lg); font-size: var(--font-size-xs); }
.login-dev a { color: var(--accent-gold); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .detail-grid { grid-template-columns: 1fr; }
    .detail-hero { max-width: 320px; margin: 0 auto; }
    .garden-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-md); }
}
