/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0f0f0f;
  --bg2:      #161616;
  --bg3:      #1e1e1e;
  --bg4:      #252525;
  --border:   #2a2a2a;
  --border2:  #333;
  --text:     #e8e8e8;
  --muted:    #888;
  --faint:    #555;
  --green:    #4ade80;
  --green-bg: #14532d;
  --green-dim:#166534;
  --amber:    #fbbf24;
  --amber-bg: #451a03;
  --amber-dim:#92400e;
  --red:      #f87171;
  --red-bg:   #450a0a;
  --teal:     #2dd4bf;
  --teal-bg:  #042f2e;
  --gold:     #d97706;
  --gold-bg:  #1c1000;
  --white:    #ffffff;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Header ── */
header {
  border-bottom: 1px solid var(--border);
  padding: 2rem 1.5rem 1.5rem;
  background: var(--bg);
}
.header-inner { max-width: 900px; margin: 0 auto; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
h1 .white { color: var(--white); }
h1 .green { color: var(--green); }

.tagline {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1rem;
}

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 3px;
  letter-spacing: 0.03em;
}
.badge-green  { background: var(--green-bg);  color: var(--green);  border: 1px solid var(--green-dim); }
.badge-amber  { background: var(--amber-bg);  color: var(--amber);  border: 1px solid var(--amber-dim); }
.badge-teal   { background: var(--teal-bg);   color: var(--teal);   border: 1px solid #0f5554; }
.badge-red    { background: var(--red-bg);    color: var(--red);    border: 1px solid #7f1d1d; }

/* ── Tab Nav ── */
.tab-nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.tab-nav-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  padding: 0 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-nav-inner::-webkit-scrollbar { display: none; }

.tab-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 1rem 1.25rem 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--white);
  border-bottom-color: var(--green);
}
.tab-btn i { font-size: 15px; }

/* ── Tab Panels ── */
.tab-panel { display: none; max-width: 900px; margin: 0 auto; padding: 1.5rem; }
.tab-panel.active { display: block; }

/* ── Progress Bar ── */
.progress-bar-wrap { margin-bottom: 1.5rem; }
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.progress-track {
  height: 3px;
  background: var(--bg4);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

/* ── Fertilizer Strip ── */
.fert-strip {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.fert-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.fert-nums { display: flex; gap: 8px; margin-bottom: 6px; }
.fert-n, .fert-p, .fert-k {
  font-size: 18px;
  font-weight: 700;
  padding: 2px 12px;
  border-radius: 4px;
}
.fert-n { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-dim); }
.fert-p { background: var(--red-bg); color: var(--red); border: 1px solid #7f1d1d; }
.fert-k { background: var(--teal-bg); color: var(--teal); border: 1px solid #0f5554; }
.fert-note { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ── Section Label ── */
.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
}

/* ── Phases ── */
.phase {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg2);
  margin-bottom: 10px;
  overflow: hidden;
}
.phase-fall { border-color: var(--gold); }

.phase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  gap: 12px;
}
.phase-header:hover { background: var(--bg3); }

.phase-left { display: flex; align-items: center; gap: 12px; }
.phase-right { display: flex; align-items: center; gap: 10px; }

.phase-month {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--faint);
  min-width: 30px;
}
.phase-title { font-size: 16px; font-weight: 600; color: var(--white); }

.phase-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.tag-green { background: var(--green-bg); color: var(--green); }
.tag-amber { background: var(--amber-bg); color: var(--amber); }
.tag-teal  { background: var(--teal-bg);  color: var(--teal); }
.tag-gold  { background: var(--gold-bg);  color: var(--gold); }

.phase-chev { font-size: 16px; color: var(--faint); transition: transform 0.2s; }
.phase.open .phase-chev { transform: rotate(180deg); }

.phase-body {
  display: none;
  border-top: 1px solid var(--border);
  padding: 4px 0 8px;
}
.phase.open .phase-body { display: block; }

/* ── Tasks ── */
.task {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.task:last-child { border-bottom: none; }
.task:hover { background: var(--bg3); }

.task-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border2);
  background: var(--bg);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.task-check.done { background: var(--green); border-color: var(--green); }
.task-check.done::after {
  content: '';
  display: block;
  width: 5px; height: 9px;
  border: 2px solid #000;
  border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

.task-content { flex: 1; min-width: 0; }
.task-name { font-size: 14px; font-weight: 500; color: var(--white); margin-bottom: 3px; }
.task-name.done { text-decoration: line-through; color: var(--faint); }
.task-detail { font-size: 13px; color: var(--muted); line-height: 1.5; }

.task-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
  letter-spacing: 0.04em;
}
.pill-red    { background: var(--red-bg);   color: var(--red);   border: 1px solid #7f1d1d; }
.pill-amber  { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-dim); }
.pill-green  { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-dim); }

/* ── Money Banner ── */
.money-banner {
  background: var(--gold-bg);
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.money-icon { font-size: 20px; color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.money-title { font-size: 14px; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.money-sub { font-size: 13px; color: #a16207; line-height: 1.5; }

/* ── Fall Steps ── */
.fall-step {
  display: flex;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.fall-step:last-of-type { border-bottom: none; }
.fall-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--gold-bg);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.fall-text { font-size: 13px; color: var(--text); line-height: 1.5; padding-top: 3px; }

/* ── Skip List ── */
.skip-list {
  background: var(--bg3);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
}
.skip-title { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.skip-items { display: flex; flex-wrap: wrap; gap: 6px; }
.skip-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--muted);
  background: var(--bg4); border: 1px solid var(--border2);
  padding: 3px 8px; border-radius: 3px;
}
.skip-item i { color: var(--red); font-size: 12px; }

/* ── Watering Tab ── */
.water-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 0;
}
.wstat {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
}
.wstat-val { font-size: 18px; font-weight: 700; color: var(--white); }
.wstat-label { font-size: 11px; color: var(--muted); margin-top: 2px; }

.faucet-card {
  display: flex;
  gap: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 8px;
  margin-top: 8px;
}
.faucet-a { border-left: 3px solid var(--green); }
.faucet-b { border-left: 3px solid var(--teal); }

.faucet-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dot-a { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-dim); }
.dot-b { background: var(--teal-bg);  color: var(--teal);  border: 1px solid #0f5554; }

.faucet-name { font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.faucet-detail { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 6px; }
.faucet-covers { font-size: 12px; color: var(--faint); display: flex; gap: 5px; align-items: flex-start; }
.faucet-covers i { font-size: 13px; flex-shrink: 0; margin-top: 1px; }

.week-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.day-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
}
.day-water { border-top: 2px solid var(--teal); }
.day-rest  { background: var(--bg); }
.day-name { font-size: 12px; font-weight: 600; color: var(--white); margin-bottom: 5px; display: flex; align-items: center; gap: 5px; }
.day-name i { color: var(--teal); }
.day-detail { font-size: 12px; color: var(--muted); line-height: 1.5; }
.day-rest-label { font-size: 12px; color: var(--faint); font-style: italic; }

.tip-card, .warn-card {
  display: flex;
  gap: 12px;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 8px;
  align-items: flex-start;
}
.tip-card  { background: var(--green-bg); border: 1px solid var(--green-dim); }
.warn-card { background: var(--amber-bg); border: 1px solid var(--amber-dim); }

.tip-icon  { font-size: 18px; color: var(--green); flex-shrink: 0; margin-top: 1px; }
.warn-icon { font-size: 18px; color: var(--amber); flex-shrink: 0; margin-top: 1px; }
.tip-title  { font-size: 13px; font-weight: 600; color: var(--green); margin-bottom: 3px; }
.warn-title { font-size: 13px; font-weight: 600; color: var(--amber); margin-bottom: 3px; }
.tip-text  { font-size: 12px; color: #16a34a; line-height: 1.5; }
.warn-text { font-size: 12px; color: #a16207; line-height: 1.5; }

.shop-list {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.shop-row {
  display: flex;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.shop-row:last-child { border-bottom: none; }
.shop-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg4);
  color: var(--muted);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.shop-name { font-size: 14px; font-weight: 500; color: var(--white); margin-bottom: 2px; }
.shop-sub  { font-size: 12px; color: var(--muted); }

/* ── Soil Tab ── */
.soil-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.soil-metric {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
}
.soil-metric.good { border-top: 2px solid var(--green); }
.soil-metric.low  { border-top: 2px solid var(--red); }

.sm-label  { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.sm-value  { font-size: 22px; font-weight: 700; color: var(--white); margin-bottom: 2px; }
.sm-target { font-size: 11px; color: var(--faint); margin-bottom: 4px; }
.sm-status { font-size: 11px; display: flex; align-items: center; gap: 4px; }
.good .sm-status { color: var(--green); }
.low  .sm-status { color: var(--red); }

.insight-card {
  display: flex;
  gap: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 8px;
  align-items: flex-start;
}
.insight-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.good-icon { color: var(--green); }
.warn-icon { color: var(--amber); }
.skip-icon { color: var(--faint); }
.insight-title { font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.insight-body  { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 1.25rem 1.5rem;
}
.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--faint);
}

/* ── Mobile ── */
@media (max-width: 480px) {
  header { padding: 1.25rem 1rem 1rem; }
  .tab-panel { padding: 1rem; }
  h1 { font-size: 2.25rem; }
  .tab-btn { padding: 0.875rem 0.875rem 0.75rem; font-size: 13px; }
  .water-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; }
}
