:root {
  --green-dark: #1b4332;
  --green-medium: #2d6a4f;
  --green-light: #52b788;
  --green-accent: #95d5b2;
  --green-pale: #f0f7f4;
  --bg: #fafcfb;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --text-medium: #555;
  --text-light: #888;
  --border: #e8ece9;
  --shadow: rgba(0, 0, 0, 0.04);
  --shadow-hover: rgba(0, 0, 0, 0.08);
  --danger: #e74c3c;
  --warning: #f39c12;
  --success: #27ae60;
  --radius: 16px;
  --radius-sm: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ========== HEADER ========== */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green-dark);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}
.header h1 .leaf { font-size: 1.4rem; }

.header-actions { display: flex; gap: 0.5rem; }

/* ========== NAV ========== */
.header-nav {
  display: flex;
  gap: 0.25rem;
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  padding: 0.2rem;
}
.nav-btn {
  background: transparent;
  color: var(--text-medium);
  border: none;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-btn:hover { color: var(--green-dark); background: rgba(45,106,79,0.06); }
.nav-btn.active { background: var(--white); color: var(--green-dark); box-shadow: 0 1px 3px var(--shadow); }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--green-medium);
  color: white;
}
.btn-primary:hover { background: var(--green-dark); }

.btn-outline {
  background: transparent;
  color: var(--text-medium);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--green-light); color: var(--green-dark); }

.btn-danger { background: none; color: var(--danger); border: 1.5px solid var(--danger); }
.btn-danger:hover { background: #fdf0ef; }

.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.78rem; }
.btn-lg { padding: 0.65rem 1.3rem; font-size: 0.95rem; }

/* ========== RECORD WATER BUTTON ========== */
.record-water-btn {
  background: var(--green-medium);
  color: white;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s;
}
.record-water-btn:hover { background: var(--green-dark); }
.record-water-btn-lg { font-size: 0.95rem; padding: 0.65rem 1.4rem; }

/* ========== MAIN ========== */
.main { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }

/* ========== DASHBOARD GRID ========== */
.plant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.plant-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.2s;
  cursor: pointer;
}
.plant-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow-hover);
}

.plant-card-photo {
  width: 100%;
  height: 180px;
  background: var(--green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
}
.plant-card-photo img { width: 100%; height: 100%; object-fit: cover; }

.plant-card-placeholder {
  width: 100%;
  height: 180px;
  background: var(--green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.5;
}

.plant-card-body { padding: 1rem 1rem 0.5rem; }
.plant-card-name { font-size: 1rem; font-weight: 700; color: var(--text-dark); }
.plant-card-species { font-size: 0.8rem; color: var(--text-light); font-style: italic; margin-top: 0.15rem; }
.plant-card-location { font-size: 0.8rem; color: var(--text-light); margin-top: 0.3rem; }

.plant-card-footer {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ========== STATUS BADGES ========== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}
.status-good { background: #edf7ef; color: #27ae60; }
.status-due { background: #fef9ec; color: #d4960a; }
.status-overdue { background: #fdf0ef; color: #c0392b; }
.status-unknown { background: #f5f5f5; color: #999; }

/* ========== PLANT DETAIL ========== */
.plant-detail { max-width: 800px; margin: 0 auto; }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-light);
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  transition: color 0.15s;
}
.back-btn:hover { color: var(--green-dark); }

.plant-hero {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}
.plant-hero-photo {
  width: 100%;
  height: 280px;
  background: var(--green-pale);
}
.plant-hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.plant-hero-info { padding: 1.25rem; }
.plant-hero-name { font-size: 1.5rem; font-weight: 800; color: var(--text-dark); }
.plant-hero-species { font-size: 0.9rem; color: var(--text-light); font-style: italic; margin-top: 0.15rem; }
.plant-hero-location { font-size: 0.85rem; color: var(--text-light); margin-top: 0.4rem; }

/* ========== SECTION CARDS ========== */
.section-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}
.section-card h3 {
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

/* ========== CARE GRID ========== */
.care-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}
.care-item {
  padding: 0.85rem;
  background: var(--green-pale);
  border-radius: var(--radius-sm);
}
.care-item-label { font-size: 0.7rem; font-weight: 700; color: var(--green-medium); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.2rem; }
.care-item-value { font-size: 0.85rem; color: var(--text-dark); }
.care-item-highlight {
  background: var(--green-pale);
  border: 1.5px solid var(--green-accent);
}

/* ========== WATERING RECOMMENDATION ========== */
.watering-recommendation {
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}
.rec-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; color: var(--green-medium); letter-spacing: 0.5px; }
.rec-value { font-size: 1rem; font-weight: 700; color: var(--text-dark); margin: 0.15rem 0; }
.rec-freq { font-size: 0.78rem; color: var(--text-light); }

/* ML comparison badges */
.ml-under { color: #e67e22; font-size: 0.72rem; font-weight: 600; background: #fef5eb; padding: 0.1rem 0.45rem; border-radius: 8px; }
.ml-over { color: #2980b9; font-size: 0.72rem; font-weight: 600; background: #ebf5fb; padding: 0.1rem 0.45rem; border-radius: 8px; }
.ml-good { color: #27ae60; font-size: 0.72rem; font-weight: 600; background: #edf7ef; padding: 0.1rem 0.45rem; border-radius: 8px; }
.watering-notes { font-size: 0.78rem; color: var(--text-light); font-style: italic; }

.modal-rec {
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  color: var(--green-dark);
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ========== PHOTO GALLERY ========== */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
}
.photo-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item.is-favorite { outline: 2px solid var(--green-light); outline-offset: -2px; }
.photo-item-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.15s;
}
.photo-item:hover .photo-item-actions { opacity: 1; }
.photo-action-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.photo-fav-btn { background: rgba(255,255,255,0.85); color: var(--green-dark); }
.photo-del-btn { background: rgba(255,255,255,0.85); color: var(--danger); }

/* ========== WATERING HISTORY ========== */
.watering-list { list-style: none; }
.watering-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.watering-item:last-child { border-bottom: none; }
.watering-date { font-weight: 600; color: var(--text-dark); font-size: 0.85rem; }
.watering-amount { font-size: 0.82rem; color: var(--text-light); }
.watering-delete { background: none; border: none; color: var(--text-light); cursor: pointer; opacity: 0.4; font-size: 1rem; transition: all 0.15s; }
.watering-delete:hover { opacity: 1; color: var(--danger); }

/* ========== FORMS ========== */
.form-group { margin-bottom: 0.85rem; }
.form-group label { display: block; font-weight: 600; color: var(--text-dark); margin-bottom: 0.3rem; font-size: 0.82rem; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: border-color 0.15s;
  background: var(--white);
  color: var(--text-dark);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--green-light);
}
.form-textarea { resize: vertical; min-height: 70px; }

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  backdrop-filter: blur(4px);
}
.modal {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal h2 { color: var(--text-dark); margin-bottom: 1.25rem; font-size: 1.15rem; font-weight: 700; }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1.25rem; }

/* ========== SPECIES SEARCH ========== */
.species-search-wrapper { position: relative; }
.species-dropdown {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
  display: none;
  box-shadow: 0 8px 20px var(--shadow);
}
.species-dropdown.active { display: block; }
.species-option { padding: 0.55rem 0.85rem; cursor: pointer; transition: background 0.1s; }
.species-option:hover { background: var(--green-pale); }
.species-option-name { font-weight: 600; font-size: 0.85rem; }
.species-option-scientific { font-size: 0.75rem; color: var(--text-light); font-style: italic; }

/* ========== EMPTY STATE ========== */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state-icon { font-size: 3rem; margin-bottom: 0.75rem; opacity: 0.6; }
.empty-state h2 { color: var(--text-dark); margin-bottom: 0.5rem; font-weight: 700; }
.empty-state p { color: var(--text-light); margin-bottom: 1.5rem; }

/* ========== UPLOAD ========== */
.upload-area {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.upload-area:hover { border-color: var(--green-light); background: var(--green-pale); }
.upload-area-icon { font-size: 1.5rem; margin-bottom: 0.3rem; opacity: 0.5; }
.upload-area-text { font-size: 0.82rem; color: var(--text-light); }

/* ========== TOAST ========== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.toast {
  background: var(--green-dark);
  color: white;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  animation: slideIn 0.25s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== CARE TIPS ========== */
.care-tips-text { font-size: 0.85rem; color: var(--text-medium); line-height: 1.7; }
.toxicity-warning {
  background: #fef5eb;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  color: #e67e22;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.toxicity-safe { background: #edf7ef; color: #27ae60; }

/* ========== CALENDAR ========== */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.calendar-nav { display: flex; align-items: center; gap: 0.5rem; }
.calendar-title { font-size: 1rem; font-weight: 700; color: var(--text-dark); margin: 0; white-space: nowrap; }
.calendar-view-btns { display: flex; gap: 0.2rem; }
.calendar-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Day view */
.calendar-day-view { display: flex; flex-direction: column; gap: 0.6rem; }
.calendar-plant-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 0.85rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}
.calendar-plant-card:hover { transform: translateY(-1px); box-shadow: 0 4px 12px var(--shadow-hover); }
.calendar-plant-photo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.calendar-plant-photo img { width: 100%; height: 100%; object-fit: cover; }
.calendar-plant-info { flex: 1; min-width: 0; }
.calendar-plant-name { font-weight: 700; color: var(--text-dark); font-size: 0.9rem; }
.calendar-plant-loc { font-size: 0.75rem; color: var(--text-light); }
.calendar-plant-rec { font-size: 0.75rem; color: var(--green-medium); font-weight: 500; margin-top: 0.15rem; }
.calendar-plant-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; flex-shrink: 0; }
.cal-status { font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.55rem; border-radius: 10px; }
.cal-status-overdue { background: #fdf0ef; color: #c0392b; }
.cal-status-due { background: #fef9ec; color: #d4960a; }
.cal-status-upcoming { background: #edf7ef; color: #27ae60; }

/* Week view */
.calendar-week-view {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
}
.week-day {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  min-height: 100px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}
.week-day:hover { border-color: var(--green-light); }
.week-day-today { border-color: var(--green-medium); background: var(--green-pale); }
.week-day-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.week-day-name { font-size: 0.65rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.3px; }
.week-day-num { font-size: 0.82rem; font-weight: 700; color: var(--text-dark); }
.today-num {
  background: var(--green-medium);
  color: white;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}
.week-day-plants { display: flex; flex-wrap: wrap; gap: 3px; }
.week-plant-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
}
.week-plant-dot img { width: 100%; height: 100%; object-fit: cover; }
.cal-dot-overdue { border-color: #c0392b; }
.cal-dot-due { border-color: #d4960a; }
.cal-dot-upcoming { border-color: #27ae60; }
.week-plant-extra { font-size: 0.6rem; color: var(--text-light); font-weight: 600; }

/* Month view */
.calendar-month-view { overflow-x: auto; }
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.month-header-cell {
  background: var(--green-dark);
  color: white;
  text-align: center;
  padding: 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.month-cell {
  background: var(--white);
  padding: 0.4rem;
  min-height: 64px;
  cursor: pointer;
  transition: background 0.1s;
}
.month-cell:hover { background: var(--green-pale); }
.month-cell-empty { background: #fafcfb; cursor: default; }
.month-cell-empty:hover { background: #fafcfb; }
.month-cell-today { background: var(--green-pale); }
.month-cell-num { font-size: 0.75rem; font-weight: 600; color: var(--text-dark); margin-bottom: 0.2rem; }
.month-cell-today .month-cell-num {
  background: var(--green-medium);
  color: white;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}
.month-cell-dots { display: flex; flex-wrap: wrap; gap: 2px; }
.month-dot { width: 7px; height: 7px; border-radius: 50%; }
.month-dot-overdue { background: #c0392b; }
.month-dot-due { background: #d4960a; }
.month-dot-upcoming { background: #27ae60; }
.month-dot-extra { font-size: 0.5rem; color: var(--text-light); }

/* ========== AUTH ========== */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 2rem 1rem;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.auth-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.auth-card h2 { font-size: 1.3rem; font-weight: 700; color: var(--text-dark); margin-bottom: 0.25rem; }
.auth-subtitle { font-size: 0.85rem; color: var(--text-light); margin-bottom: 1.5rem; }
.auth-card .form-group { text-align: left; }
.auth-submit { width: 100%; justify-content: center; margin-top: 0.5rem; }
.auth-switch { margin-top: 1.25rem; font-size: 0.82rem; color: var(--text-light); }
.auth-switch a { color: var(--green-medium); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.auth-error {
  background: #fdf0ef;
  color: #c0392b;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  margin-bottom: 1rem;
  text-align: left;
}

/* ========== USER MENU ========== */
.user-menu { position: relative; }
.user-menu-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-pale);
  color: var(--green-dark);
  border: 1.5px solid var(--border);
}
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  z-index: 200;
  text-align: left;
}
.user-dropdown.active { display: block; }
.user-dropdown-name { font-weight: 700; font-size: 0.9rem; color: var(--text-dark); }
.user-dropdown-email { font-size: 0.78rem; color: var(--text-light); margin-top: 0.1rem; }
.user-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 0.5rem 0; }
.user-dropdown button {
  background: none;
  border: none;
  color: var(--text-medium);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.3rem 0;
  width: 100%;
  text-align: left;
}
.user-dropdown button:hover { color: var(--danger); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .header h1 { font-size: 1.1rem; }
  .plant-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .care-grid { grid-template-columns: 1fr; }
  .plant-hero-photo { height: 200px; }
  .main { padding: 1rem; }
  .modal { padding: 1.25rem; }
  .calendar-header { flex-direction: column; align-items: stretch; text-align: center; }
  .calendar-nav { justify-content: center; }
  .calendar-view-btns { justify-content: center; }
  .calendar-week-view { grid-template-columns: 1fr; }
  .week-day { min-height: auto; }
  .month-cell { min-height: 48px; padding: 0.3rem; }
  .header-content { flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
  .header-nav { order: 3; width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .plant-grid { grid-template-columns: 1fr; }
}

/* ========== GARDEN ========== */
.garden-page { max-width: 1100px; margin: 0 auto; }

.garden-tabs {
  display: flex;
  gap: 0.35rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 0.35rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}
.garden-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-medium);
  cursor: pointer;
  transition: all 0.15s;
}
.garden-tab:hover { color: var(--green-dark); background: rgba(45,106,79,0.04); }
.garden-tab.active { background: var(--green-pale); color: var(--green-dark); box-shadow: 0 1px 3px var(--shadow); }

.garden-section { margin-bottom: 1.5rem; }
.garden-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.garden-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.garden-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
}
.garden-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow-hover);
}

.garden-card-icon {
  font-size: 2.5rem;
  padding: 1rem 1rem 0;
  text-align: center;
}

.garden-card-body { padding: 0 1rem 0.5rem; }
.garden-card-name { font-size: 1rem; font-weight: 700; color: var(--text-dark); }
.garden-card-sci { font-size: 0.78rem; color: var(--text-light); font-style: italic; margin-top: 0.1rem; }
.garden-card-loc { font-size: 0.78rem; color: var(--text-light); margin-top: 0.25rem; }

.garden-card-water-info {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.78rem;
  color: var(--green-medium);
  font-weight: 500;
}
.garden-card-water-amt { font-size: 0.72rem; color: var(--text-light); font-weight: 400; }

.garden-card-quick-facts {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-light);
}

.garden-card-footer {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}

.garden-card-growing { border-left: 3px solid var(--green-light); }

/* Garden water alerts */
.garden-water-alerts {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1rem;
  margin-bottom: 1.25rem;
}
.garden-water-alerts h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.6rem;
}
.garden-water-list { display: flex; flex-direction: column; gap: 0.4rem; }
.garden-water-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
}
.garden-water-overdue { background: #fdf0ef; }
.garden-water-due { background: #fef9ec; }
.garden-water-icon { font-size: 1.3rem; flex-shrink: 0; }
.garden-water-info { flex: 1; min-width: 0; }
.garden-water-name { font-weight: 600; font-size: 0.85rem; color: var(--text-dark); display: block; }
.garden-water-detail { font-size: 0.75rem; color: var(--text-light); }

/* Garden profile hero */
.garden-profile-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  flex-wrap: wrap;
}
.garden-profile-icon { font-size: 3rem; }
.garden-category-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 0.35rem;
}
.garden-cat-flowers { background: #fce4ec; color: #c62828; }
.garden-cat-fruits_veggies { background: #e8f5e9; color: #2e7d32; }

.garden-planted-date {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* Garden water guide box */
.garden-water-guide {
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  padding: 1rem;
}
.garden-water-guide-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.garden-guide-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--green-medium);
  letter-spacing: 0.5px;
  margin-bottom: 0.15rem;
}
.garden-guide-stat-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
}
.garden-water-notes {
  font-size: 0.82rem;
  color: var(--text-medium);
  line-height: 1.6;
  border-top: 1px solid var(--green-accent);
  padding-top: 0.65rem;
}

.garden-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .garden-grid { grid-template-columns: 1fr; }
  .garden-profile-hero { flex-direction: column; text-align: center; }
  .garden-profile-hero .btn { margin-left: 0 !important; }
  .garden-water-guide-main { grid-template-columns: 1fr; }
}
