/* ===================================================
   PLANT PULSE — DESIGN SYSTEM
   Material Design · Mobile-First · 360×740 viewport
=================================================== */

/* ---- CSS Variables ---- */
:root {
  --primary:       #4CAF50;
  --primary-dark:  #388E3C;
  --primary-light: #C8E6C9;
  --secondary:     #8BC34A;
  --accent:        #FFC107;
  --accent-dark:   #F9A825;
  --surface:       #FFFFFF;
  --surface-2:     #F5F7F5;
  --on-surface:    #1B1C1B;
  --on-surface-2:  #5C6360;
  --on-surface-3:  #8A928F;
  --divider:       #E8EDE9;
  --error:         #E53935;
  --blue:          #2196F3;
  --blue-light:    #E3F2FD;
  --amber-light:   #FFF8E1;
  --green-light:   #E8F5E9;
  --purple:        #9C27B0;
  --purple-light:  #F3E5F5;
  --danger:        #F44336;

  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  --shadow-1: 0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.08);
  --shadow-2: 0 3px 8px rgba(0,0,0,.12), 0 2px 4px rgba(0,0,0,.08);
  --shadow-3: 0 8px 24px rgba(0,0,0,.14), 0 4px 8px rgba(0,0,0,.08);

  --app-bar-h: 60px;
  --nav-h:     68px;
  --font:      'Inter', 'Roboto', system-ui, sans-serif;
  --transition: 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: var(--font);
  background: #1B1C1B;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, textarea { font-family: var(--font); }
a { text-decoration: none; }

/* ---- App Shell ---- */
#app {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}

/* ---- App Bar ---- */
.app-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--app-bar-h);
  background: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 4px;
  z-index: 100;
  box-shadow: var(--shadow-1);
  border-bottom: 1px solid var(--divider);
}
.app-bar-back {
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  color: var(--on-surface);
  transition: background var(--transition);
  flex-shrink: 0;
}
.app-bar-back:active { background: var(--divider); }
.app-bar-back.hidden { visibility: hidden; }
.app-bar-title {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--on-surface);
  letter-spacing: -.3px;
}
.app-bar-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.icon-btn {
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  color: var(--on-surface);
  transition: background var(--transition);
}
.icon-btn:active { background: var(--divider); }
.icon-btn .material-icons-round { font-size: 22px; }

/* ---- Screen Container ---- */
.screen-container {
  position: absolute;
  top: var(--app-bar-h);
  left: 0; right: 0;
  bottom: var(--nav-h);
  overflow: hidden;
}
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 250ms ease, transform 250ms ease;
}
.screen.active {
  display: flex;
  opacity: 1;
  transform: translateX(0);
}
.screen.slide-in {
  animation: slideIn 250ms ease forwards;
}
.screen.slide-out {
  animation: slideOut 200ms ease forwards;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-30px); }
}

.screen-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.screen-scroll::-webkit-scrollbar { display: none; }
.bottom-spacer { height: 20px; }

/* ---- Bottom Navigation ---- */
.bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--surface);
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--divider);
  box-shadow: 0 -2px 8px rgba(0,0,0,.06);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--on-surface-3);
  transition: color var(--transition);
  position: relative;
  padding: 0;
  min-width: 0;
}
.nav-item::before {
  content: '';
  position: absolute;
  top: 6px;
  width: 56px; height: 30px;
  border-radius: var(--radius-full);
  background: transparent;
  transition: background var(--transition);
}
.nav-item.active::before {
  background: var(--green-light);
}
.nav-item.active { color: var(--primary); }
.nav-icon { font-size: 22px !important; position: relative; z-index: 1; }
.nav-label { font-size: 10px; font-weight: 500; position: relative; z-index: 1; }

/* ---- Card ---- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: 16px;
  margin-bottom: 12px;
}

/* ---- Dashboard Banner ---- */
.dashboard-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(76,175,80,.35);
}
.banner-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,.8);
  font-weight: 400;
  margin-bottom: 4px;
}
.banner-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 6px;
}
.banner-desc {
  font-size: 13px;
  color: rgba(255,255,255,.75);
}
.banner-emoji { font-size: 56px; line-height: 1; }

/* ---- Stats Row ---- */
.stats-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.stat-card {
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:active { transform: scale(0.97); box-shadow: var(--shadow-2); }
.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.stat-icon .material-icons-round { font-size: 20px; }
.stat-green  { background: var(--green-light); color: var(--primary); }
.stat-blue   { background: var(--blue-light);  color: var(--blue); }
.stat-amber  { background: var(--amber-light); color: var(--accent-dark); }
.stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--on-surface);
  line-height: 1;
}
.stat-label {
  font-size: 11px;
  color: var(--on-surface-2);
  font-weight: 500;
  text-align: center;
}

/* ---- Section Header ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 10px;
}
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--on-surface);
}
.section-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
}

/* ---- Quick Actions ---- */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px 6px 12px;
  box-shadow: var(--shadow-1);
  transition: transform var(--transition);
  font-size: 11px;
  font-weight: 500;
  color: var(--on-surface-2);
}
.quick-action-btn:active { transform: scale(0.95); }
.qa-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.qa-icon .material-icons-round { font-size: 22px; }
.qa-primary { background: var(--green-light); color: var(--primary); }
.qa-blue    { background: var(--blue-light);  color: var(--blue); }
.qa-amber   { background: var(--amber-light); color: var(--accent-dark); }
.qa-purple  { background: var(--purple-light); color: var(--purple); }

/* ---- Plant List Tile ---- */
.plant-tile {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.plant-tile:active { transform: scale(0.98); box-shadow: var(--shadow-2); }
.plant-avatar {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--green-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  overflow: hidden;
}
.plant-avatar img { width: 100%; height: 100%; object-fit: cover; }
.plant-tile-body { flex: 1; min-width: 0; }
.plant-tile-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plant-tile-sub {
  font-size: 12px;
  color: var(--on-surface-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plant-tile-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.plant-tile-meta .chip-small {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.chip-water  { background: var(--amber-light); color: var(--accent-dark); }
.chip-ok     { background: var(--green-light); color: var(--primary-dark); }
.chip-loc    { background: var(--surface-2); color: var(--on-surface-2); }
.plant-tile-chevron {
  color: var(--on-surface-3);
  font-size: 20px !important;
  flex-shrink: 0;
}
.tile-water-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: var(--blue-light);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}
.tile-water-btn:active { background: #BBDEFB; }
.tile-water-btn .material-icons-round { font-size: 18px; }

/* ---- Search Bar ---- */
.search-bar-wrap {
  padding: 12px 16px 8px;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--divider);
}
.search-bar {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  padding: 0 12px;
  gap: 8px;
  border: 1.5px solid var(--divider);
}
.search-bar:focus-within { border-color: var(--primary); }
.search-icon { color: var(--on-surface-3); font-size: 20px !important; }
.search-bar input {
  flex: 1;
  border: none;
  background: none;
  padding: 11px 0;
  font-size: 14px;
  color: var(--on-surface);
  outline: none;
}
.search-clear {
  color: var(--on-surface-3);
  display: none;
  padding: 4px;
}
.search-clear.visible { display: flex; }
.search-clear .material-icons-round { font-size: 18px; }

/* ---- Filter Chips ---- */
.filter-chips {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
}
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border: 1.5px solid var(--divider);
  color: var(--on-surface-2);
  background: var(--surface);
  transition: all var(--transition);
  flex-shrink: 0;
}
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.plants-scroll { padding-top: 12px; }

/* ---- FAB ---- */
.fab {
  position: absolute;
  bottom: 20px; right: 20px;
  width: 56px; height: 56px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(76,175,80,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  transition: transform var(--transition), box-shadow var(--transition);
}
.fab:active {
  transform: scale(0.94);
  box-shadow: 0 2px 8px rgba(76,175,80,.4);
}
.fab .material-icons-round { font-size: 26px; }

/* ---- Health Card ---- */
.health-card { margin-bottom: 20px; }
.health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.health-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--on-surface-2);
  font-weight: 500;
}
.dot {
  width: 10px; height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.dot-green { background: var(--primary); }
.dot-amber { background: var(--accent); }
.health-pct { font-size: 13px; font-weight: 600; color: var(--on-surface); }
.progress-bar {
  height: 8px;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}
.fill-green { background: linear-gradient(90deg, var(--primary), var(--secondary)); }
.fill-amber { background: linear-gradient(90deg, var(--accent), #FFB300); }

/* ---- Attention Card ---- */
.attention-card {
  background: #FFF8E1;
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  border: 1px solid #FFE082;
  transition: transform var(--transition);
}
.attention-card:active { transform: scale(0.98); }
.attention-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--amber-light);
  color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.attention-body { flex: 1; }
.attention-name { font-size: 14px; font-weight: 600; color: var(--on-surface); }
.attention-sub  { font-size: 12px; color: #8D6E00; margin-top: 2px; }
.attention-water-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.attention-water-btn .material-icons-round { font-size: 18px; }

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-icon { font-size: 64px; line-height: 1; margin-bottom: 16px; }
.empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 8px;
}
.empty-desc {
  font-size: 14px;
  color: var(--on-surface-2);
  line-height: 1.5;
  margin-bottom: 24px;
}
.empty-action {
  background: var(--primary);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(76,175,80,.4);
  transition: transform var(--transition);
}
.empty-action:active { transform: scale(0.97); }

/* ---- Calendar ---- */
.calendar-card { margin-bottom: 16px; }
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.cal-month {
  font-size: 16px;
  font-weight: 600;
  color: var(--on-surface);
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 8px;
}
.cal-weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--on-surface-3);
  padding: 4px 0;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 400;
  color: var(--on-surface);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.cal-day:hover { background: var(--green-light); }
.cal-day.other-month { color: var(--on-surface-3); }
.cal-day.today {
  font-weight: 700;
  color: var(--primary);
}
.cal-day.selected {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.cal-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 4px; height: 4px;
  border-radius: var(--radius-full);
  background: var(--accent);
}
.cal-day.selected.has-event::after { background: rgba(255,255,255,.8); }

/* Calendar Event Tile */
.cal-event-tile {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-1);
}
.cal-event-color {
  width: 4px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--primary);
  flex-shrink: 0;
}
.cal-event-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--green-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cal-event-body { flex: 1; }
.cal-event-name { font-size: 14px; font-weight: 600; color: var(--on-surface); }
.cal-event-sub  { font-size: 12px; color: var(--on-surface-2); margin-top: 2px; }

/* ---- Plant Hub ---- */
.hub-banner {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  margin-bottom: 20px;
  cursor: pointer;
}
.hub-banner-img {
  height: 140px;
  background: linear-gradient(135deg, #2E7D32, #66BB6A);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hub-banner-body { padding: 16px; }
.hub-banner-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.hub-banner-title { font-size: 17px; font-weight: 700; color: var(--on-surface); margin-bottom: 4px; }
.hub-banner-sub   { font-size: 13px; color: var(--on-surface-2); line-height: 1.4; }

.tips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.tip-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  box-shadow: var(--shadow-1);
}
.tip-emoji { font-size: 28px; margin-bottom: 8px; }
.tip-title { font-size: 13px; font-weight: 600; color: var(--on-surface); margin-bottom: 4px; }
.tip-desc  { font-size: 11px; color: var(--on-surface-2); line-height: 1.4; }

.discover-tile {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-1);
  cursor: pointer;
}
.discover-emoji {
  font-size: 36px;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-light);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.discover-body { flex: 1; }
.discover-name { font-size: 15px; font-weight: 600; color: var(--on-surface); }
.discover-sub  { font-size: 12px; color: var(--on-surface-2); margin-top: 3px; line-height: 1.4; }
.discover-add-btn {
  padding: 7px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  transition: transform var(--transition);
}
.discover-add-btn:active { transform: scale(0.95); }

.guide-tile {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: transform var(--transition);
}
.guide-tile:active { transform: scale(0.98); }
.guide-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.guide-icon .material-icons-round { font-size: 22px; }
.guide-body { flex: 1; }
.guide-title { font-size: 14px; font-weight: 600; color: var(--on-surface); }
.guide-sub   { font-size: 12px; color: var(--on-surface-2); margin-top: 2px; }
.guide-chevron { color: var(--on-surface-3); font-size: 20px !important; }

/* ---- Plant Detail ---- */
.detail-hero {
  height: 220px;
  background: linear-gradient(135deg, var(--primary-light), var(--green-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 96px;
  flex-shrink: 0;
  position: relative;
}
.detail-body {
  padding: 20px 16px 16px;
  background: var(--surface-2);
  flex: 1;
}
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
}
.detail-header-text { flex: 1; }
.detail-name { font-size: 24px; font-weight: 700; color: var(--on-surface); line-height: 1.2; }
.detail-species { font-size: 14px; color: var(--on-surface-2); margin-top: 4px; font-style: italic; }
.detail-status-badge {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.badge-healthy { background: var(--green-light); color: var(--primary-dark); }
.badge-water   { background: var(--amber-light); color: #8D6E00; }

.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}
.detail-info-item {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-1);
}
.detail-info-icon { color: var(--primary); font-size: 20px !important; }
.detail-info-label { font-size: 11px; color: var(--on-surface-3); font-weight: 500; }
.detail-info-value { font-size: 13px; font-weight: 600; color: var(--on-surface); margin-top: 2px; }
.detail-notes {
  font-size: 14px;
  color: var(--on-surface-2);
  line-height: 1.6;
  min-height: 48px;
}
.water-btn {
  width: 100%;
  padding: 15px;
  margin-top: 20px;
  background: linear-gradient(135deg, #2196F3, #42A5F5);
  color: #fff;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(33,150,243,.4);
  transition: transform var(--transition), box-shadow var(--transition);
}
.water-btn:active { transform: scale(0.98); box-shadow: 0 2px 8px rgba(33,150,243,.3); }
.detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.btn-outline {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--divider);
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background var(--transition);
}
.btn-outline:active { background: var(--surface-2); }
.btn-danger {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: #FFF1F0;
  border: 1.5px solid #FFCDD2;
  font-size: 14px;
  font-weight: 600;
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background var(--transition);
}
.btn-danger:active { background: #FFEBEE; }

.care-suggestion {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: var(--shadow-1);
}
.care-sug-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.care-sug-text { font-size: 13px; color: var(--on-surface-2); line-height: 1.5; }
.care-sug-text strong { color: var(--on-surface); font-weight: 600; }

/* ---- Bottom Sheet ---- */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 200;
  pointer-events: none;
  transition: background 300ms ease;
}
.sheet-overlay.visible {
  background: rgba(0,0,0,.45);
  pointer-events: all;
}
.bottom-sheet {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 201;
  transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
}
.bottom-sheet.open {
  transform: translateX(-50%) translateY(0);
}
.sheet-handle {
  width: 36px; height: 4px;
  background: var(--divider);
  border-radius: var(--radius-full);
  margin: 12px auto 0;
  flex-shrink: 0;
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
  flex-shrink: 0;
}
.sheet-title { font-size: 18px; font-weight: 700; color: var(--on-surface); }
.sheet-body { padding: 8px 16px 24px; overflow-y: auto; flex: 1; }
.sheet-body::-webkit-scrollbar { display: none; }

/* ---- Form ---- */
.form-field {
  position: relative;
  margin-bottom: 20px;
}
.form-input {
  width: 100%;
  padding: 18px 14px 6px;
  border: 1.5px solid var(--divider);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--on-surface);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition);
  appearance: none;
}
.form-input:focus { border-color: var(--primary); }
.form-input.error { border-color: var(--error); }
.form-label {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--on-surface-3);
  pointer-events: none;
  transition: all var(--transition);
  transform-origin: left top;
  background: var(--surface);
  padding: 0 2px;
}
.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
  top: 0;
  transform: translateY(-50%) scale(0.75);
  color: var(--primary);
  font-weight: 600;
}
.form-input.error:focus + .form-label,
.form-input.error:not(:placeholder-shown) + .form-label {
  color: var(--error);
}
.form-date {
  padding: 14px;
  color: var(--on-surface);
}
.form-label-up {
  top: 0;
  transform: translateY(-50%) scale(0.75);
  color: var(--on-surface-3);
  font-weight: 600;
}
.form-textarea {
  padding-top: 22px;
  resize: none;
  line-height: 1.5;
}
.form-textarea + .form-label {
  top: 22px;
  transform: none;
}
.form-textarea:focus + .form-label,
.form-textarea:not(:placeholder-shown) + .form-label {
  top: 0;
  transform: translateY(-50%) scale(0.75);
  color: var(--primary);
}
.form-error {
  display: none;
  font-size: 11px;
  color: var(--error);
  margin-top: 4px;
  padding-left: 14px;
}
.form-field.has-error .form-error { display: block; }
.btn-primary {
  width: 100%;
  padding: 15px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 3px 12px rgba(76,175,80,.4);
  transition: transform var(--transition), box-shadow var(--transition);
  margin-top: 8px;
}
.btn-primary:active { transform: scale(0.98); box-shadow: 0 1px 6px rgba(76,175,80,.3); }

/* ---- Dialog ---- */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 300;
  pointer-events: none;
  transition: background 250ms ease;
}
.dialog-overlay.visible {
  background: rgba(0,0,0,.5);
  pointer-events: all;
}
.dialog {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 28px 24px 20px;
  width: calc(100% - 48px);
  max-width: 320px;
  z-index: 301;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: transform 250ms cubic-bezier(0.4,0,0.2,1), opacity 250ms ease;
  box-shadow: var(--shadow-3);
}
.dialog.visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: all;
}
.dialog-icon-wrap {
  width: 60px; height: 60px;
  border-radius: var(--radius-full);
  background: #FFF1F0;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.dialog-icon { font-size: 28px !important; color: var(--danger); }
.dialog-title { font-size: 18px; font-weight: 700; color: var(--on-surface); margin-bottom: 8px; }
.dialog-msg   { font-size: 14px; color: var(--on-surface-2); line-height: 1.5; margin-bottom: 24px; }
.dialog-actions {
  display: flex;
  gap: 10px;
}
.dialog-btn-cancel {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--divider);
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface-2);
}
.dialog-btn-cancel:active { background: var(--surface-2); }
.dialog-btn-confirm {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--danger);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.dialog-btn-confirm:active { opacity: .9; }

/* ---- Snackbar ---- */
.snackbar {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #323232;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease, transform 250ms ease;
  max-width: 340px;
  white-space: nowrap;
  box-shadow: var(--shadow-3);
}
.snackbar.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.snack-icon { font-size: 18px !important; }
.snack-green { color: #81C784; }
.snack-blue  { color: #64B5F6; }
.snack-red   { color: #EF9A9A; }
.snack-amber { color: #FFD54F; }

/* ---- Skeleton ---- */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, #ebebeb 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Utility ---- */
.hidden { display: none !important; }
