:root {
    --bg: #f0fdf4; --card: #ffffff; --border: #dcfce7;
    --text: #14532d; --text-mut: #4ade80; --text-dark: #166534;
    --crimson: #dc2626; --emerald: #16a34a; --amber: #d97706; --blue: #0284c7;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: system-ui, -apple-system, sans-serif; }
body { background: var(--bg); color: var(--text-dark); min-height: 100vh; padding: 1.5rem 1rem; background-image: radial-gradient(circle at 10% 10%, rgba(22,163,74,0.05) 0%, transparent 40%), radial-gradient(circle at 90% 90%, rgba(2,132,199,0.04) 0%, transparent 40%); display: flex; justify-content: center; }
main { width: 100%; max-width: 1000px; display: flex; flex-direction: column; gap: 1.2rem; }
header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #bbf7d0; padding-bottom: 0.8rem; }
.lg h1 { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.lg p { font-size: 0.75rem; color: #15803d; font-weight: 600; }

.summary-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.stat-card { background: var(--card); border: 1.5px solid #bbf7d0; border-radius: 8px; padding: 0.75rem 1rem; display: flex; flex-direction: column; align-items: center; text-align: center; }
.stat-val { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.stat-lbl { font-size: 0.65rem; color: #15803d; font-weight: 700; text-transform: uppercase; margin-top: 0.1rem; }

.grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
@media (min-width: 768px) { .grid { grid-template-columns: 310px 1fr; } }

.card { background: var(--card); border: 1.5px solid #bbf7d0; border-radius: 10px; padding: 1.2rem; display: flex; flex-direction: column; gap: 1rem; }
.card-title { font-size: 0.9rem; font-weight: 800; border-bottom: 1px solid #dcfce7; padding-bottom: 0.5rem; text-transform: uppercase; color: var(--text); display: flex; justify-content: space-between; align-items: center; }

.ig { display: flex; flex-direction: column; gap: 0.4rem; }
.il { font-size: 0.7rem; color: #15803d; font-weight: 700; text-transform: uppercase; }
.iw { display: flex; align-items: center; background: #f0fdf4; border: 1.5px solid #bbf7d0; border-radius: 6px; padding: 0.3rem 0.6rem; width: 100%; }
.iw input, .iw select { background: transparent; border: none; color: var(--text); width: 100%; font-size: 0.85rem; font-weight: 600; outline: none; }

.preset-pills { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.btn-preset { background: #dcfce7; border: 1px solid #86efac; color: var(--text); padding: 0.25rem 0.5rem; font-size: 0.7rem; font-weight: 700; border-radius: 99px; cursor: pointer; }

.btn { border: none; border-radius: 6px; padding: 0.65rem 1rem; color: #fff; font-size: 0.85rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; }
.btn-primary { background: var(--emerald); }
.btn-water { background: var(--blue); padding: 0.4rem 0.8rem; font-size: 0.75rem; }

.filter-bar { display: flex; gap: 0.3rem; background: #dcfce7; border: 1px solid #86efac; border-radius: 99px; padding: 0.2rem; width: fit-content; }
.btn-filter { background: transparent; border: none; padding: 0.35rem 0.75rem; font-size: 0.7rem; font-weight: 700; color: #15803d; border-radius: 99px; cursor: pointer; }
.btn-filter.active { background: var(--card); color: var(--text); border: 1px solid #86efac; }

.plant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.8rem; min-height: 120px; }
.plant-card { background: var(--card); border: 1.5px solid #bbf7d0; border-radius: 8px; padding: 0.8rem; display: flex; flex-direction: column; gap: 0.6rem; }
.card-overdue { border: 2px solid var(--crimson); background: #fef2f2; }

.card-header { display: flex; justify-content: space-between; align-items: center; }
.card-title-box { display: flex; align-items: center; gap: 0.4rem; }
.plant-icon { font-size: 1.2rem; }
.plant-name { font-size: 0.9rem; font-weight: 800; color: var(--text); }

.badge { font-size: 0.65rem; font-weight: 800; padding: 0.2rem 0.5rem; border-radius: 99px; text-transform: uppercase; }
.status-healthy { background: rgba(22,163,74,0.1); color: var(--emerald); border: 1px solid rgba(22,163,74,0.3); }
.status-duesoon { background: rgba(217,119,6,0.1); color: var(--amber); border: 1px solid rgba(217,119,6,0.3); }
.status-overdue { background: rgba(220,38,38,0.15); color: var(--crimson); border: 1px solid rgba(220,38,38,0.4); font-weight: 900; }

.card-info-row { font-size: 0.75rem; color: #15803d; font-weight: 600; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; border-top: 1px solid #dcfce7; padding-top: 0.5rem; }
.btn-del { background: transparent; border: none; font-size: 0.85rem; cursor: pointer; color: #94a3b8; }
.btn-del:hover { color: var(--crimson); }

.field-error { background: #fef2f2; border: 1px solid #fca5a5; border-radius: 6px; padding: 0.4rem 0.6rem; font-size: 0.7rem; color: var(--crimson); font-weight: 700; display: none; }
.empty-placeholder { color: #15803d; font-size: 0.8rem; font-style: italic; text-align: center; margin-top: 2rem; grid-column: 1 / -1; }

.test-widget { position: fixed; bottom: 1rem; right: 1rem; background: var(--card); border: 1.5px solid #bbf7d0; border-radius: 8px; padding: 0.75rem; max-width: 250px; shadow: 0 4px 15px rgba(0,0,0,0.1); z-index: 1000; font-size: 0.7rem; display: none; }
.test-title { font-weight: 800; border-bottom: 1px solid #dcfce7; padding-bottom: 0.3rem; margin-bottom: 0.4rem; color: var(--text); display: flex; justify-content: space-between; }
.test-line { display: flex; justify-content: space-between; margin-bottom: 0.2rem; }
.test-ok { color: var(--emerald); font-weight: 700; }
.test-fail { color: var(--crimson); font-weight: 700; }
footer { font-size: 0.65rem; color: #15803d; border-top: 1.5px solid #bbf7d0; padding-top: 0.6rem; display: flex; justify-content: space-between; align-items: center; margin-top: 0.5rem; }
