/* =============================================
   HARMONY HARVEST — MOBILE APP DESIGN SYSTEM
   ============================================= */

:root {
  --primary:       #4CAF50;
  --primary-dark:  #388E3C;
  --primary-light: #C8E6C9;
  --secondary:     #8BC34A;
  --secondary-light:#DCEDC8;
  --accent:        #FFC107;
  --accent-light:  #FFF8E1;

  --bg:            #F1F8F1;
  --surface:       #FFFFFF;
  --surface-2:     #F9FBF9;

  --text-primary:  #1B2A1B;
  --text-secondary:#5A7A5A;
  --text-hint:     #9EBB9E;

  --divider:       #E3EDE3;
  --error:         #E53935;
  --success:       #43A047;

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

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

  --nav-height:    64px;
  --appbar-height: 56px;
  --transition:    .25s cubic-bezier(.4,0,.2,1);
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  justify-content: center;
  align-items: center;
}

button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* -------- App Shell -------- */
#app {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,.15);
}

/* -------- App Bar -------- */
.app-bar {
  height: var(--appbar-height);
  min-height: var(--appbar-height);
  background: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 4px;
  position: relative;
  z-index: 10;
  box-shadow: 0 1px 0 var(--divider);
}

.app-bar-leading, .app-bar-actions {
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-bar-title {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -.3px;
}

.icon-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: background var(--transition);
  font-size: 22px;
}
.icon-btn:active { background: var(--divider); }

/* -------- Screen Container -------- */
.screen-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(24px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  will-change: opacity, transform;
}

.screen.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

.screen.exit {
  opacity: 0;
  transform: translateX(-24px);
}

.screen-scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px;
  scrollbar-width: none;
}
.screen-scroll::-webkit-scrollbar { display: none; }

/* -------- Bottom Nav -------- */
.bottom-nav {
  height: var(--nav-height);
  min-height: var(--nav-height);
  background: var(--surface);
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--divider);
  position: relative;
  z-index: 10;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-hint);
  transition: color var(--transition);
  position: relative;
  padding: 8px 4px 6px;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
  opacity: 0;
  transition: opacity var(--transition);
}

.nav-item.active { color: var(--primary); }
.nav-item.active::before { opacity: 1; }

.nav-icon { font-size: 24px; }
.nav-label { font-size: 10px; font-weight: 500; letter-spacing: .3px; }

.nav-item:active { opacity: .7; }

/* -------- FAB -------- */
.fab {
  position: absolute;
  right: 16px;
  bottom: 20px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-3);
  font-size: 26px;
  z-index: 8;
  transition: transform var(--transition), box-shadow var(--transition);
}
.fab:active {
  transform: scale(.93);
  box-shadow: var(--shadow-1);
}

/* -------- Dashboard -------- */
.dashboard-hero {
  margin: 16px 0 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.greeting-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.greeting-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.4px;
}

.dashboard-date {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: right;
  margin-top: 4px;
  line-height: 1.6;
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--divider);
}

.stat-card.accent { background: var(--accent-light); border-color: #FFE082; }
.stat-card.secondary { background: var(--secondary-light); border-color: #C5E1A5; }

.stat-icon {
  font-size: 22px;
  color: var(--primary);
}
.stat-card.accent .stat-icon { color: #F57F17; }
.stat-card.secondary .stat-icon { color: var(--secondary); }

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.section-action {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.section-action:active { background: var(--primary-light); }

/* Care Progress Card */
.care-progress-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-1);
  margin-bottom: 20px;
  border: 1px solid var(--divider);
}

.care-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.care-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.care-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.progress-bar-wrap {
  background: var(--divider);
  border-radius: var(--radius-full);
  height: 8px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.progress-bar-fill.primary { background: var(--primary); }
.progress-bar-fill.secondary { background: var(--secondary); }

/* Upcoming Cards */
.upcoming-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-1);
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--divider);
  cursor: pointer;
  transition: transform var(--transition);
}
.upcoming-card:active { transform: scale(.98); }

.upcoming-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.upcoming-avatar.urgent { background: #FFEBEE; }
.upcoming-avatar.soon   { background: var(--accent-light); }
.upcoming-avatar.ok     { background: var(--primary-light); }

.upcoming-info { flex: 1; min-width: 0; }
.upcoming-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.upcoming-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.upcoming-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.upcoming-badge.urgent { background: #FFEBEE; color: var(--error); }
.upcoming-badge.soon   { background: var(--accent-light); color: #E65100; }
.upcoming-badge.ok     { background: var(--primary-light); color: var(--primary-dark); }

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.quick-action-btn {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-1);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--divider);
  transition: transform var(--transition), box-shadow var(--transition);
}

.quick-action-btn .material-icons-round {
  font-size: 24px;
  color: var(--primary);
}

.quick-action-btn:active {
  transform: scale(.95);
  box-shadow: none;
}

/* -------- Search Bar -------- */
.search-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 10px;
}

.search-bar {
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  padding: 0 4px 0 12px;
  border: 1px solid var(--divider);
  box-shadow: var(--shadow-1);
  height: 44px;
}

.search-icon {
  font-size: 20px;
  color: var(--text-hint);
  margin-right: 8px;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-size: 14px;
  color: var(--text-primary);
}
.search-input::placeholder { color: var(--text-hint); }

.search-clear {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-hint);
  font-size: 18px;
}
.search-clear:active { background: var(--divider); }

.filter-btn {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--divider);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 22px;
  box-shadow: var(--shadow-1);
  flex-shrink: 0;
}
.filter-btn:active { background: var(--divider); }
.filter-btn.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }

/* Filter Chips */
.filter-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.filter-chips::-webkit-scrollbar { display: none; }

.chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--divider);
  white-space: nowrap;
  transition: all var(--transition);
}
.chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.chip:active { opacity: .7; }

/* -------- Plant List -------- */
.plant-list { }

.plant-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--divider);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.plant-card:active { transform: scale(.98); box-shadow: none; }

.plant-card-inner {
  display: flex;
  align-items: center;
  padding: 14px;
  gap: 12px;
}

.plant-avatar {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.plant-info { flex: 1; min-width: 0; }

.plant-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}

.plant-species {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.plant-tags { display: flex; gap: 5px; flex-wrap: wrap; }

.plant-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: .2px;
}

.tag-watered   { background: #E3F2FD; color: #1565C0; }
.tag-fertilized{ background: #E8F5E9; color: #2E7D32; }
.tag-overdue   { background: #FFEBEE; color: var(--error); }
.tag-upcoming  { background: var(--accent-light); color: #E65100; }
.tag-ok        { background: var(--primary-light); color: var(--primary-dark); }

.plant-chevron {
  font-size: 20px;
  color: var(--text-hint);
  flex-shrink: 0;
}

/* Plant card bottom strip */
.plant-card-strip {
  height: 3px;
  background: var(--divider);
}
.plant-card-strip.overdue { background: var(--error); }
.plant-card-strip.soon    { background: var(--accent); }
.plant-card-strip.ok      { background: var(--primary); }

/* -------- Plant Detail -------- */
.detail-hero {
  height: 180px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  margin: 0 -16px;
  flex-shrink: 0;
}

.detail-body { padding: 20px 0; }

.detail-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.detail-species {
  font-size: 14px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 16px;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.info-tile {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid var(--divider);
  box-shadow: var(--shadow-1);
}

.info-tile-label {
  font-size: 11px;
  color: var(--text-hint);
  font-weight: 500;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.info-tile-label .material-icons-round { font-size: 14px; }

.info-tile-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.detail-log-item {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 6px;
  border: 1px solid var(--divider);
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-log-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.detail-log-text { flex: 1; }
.detail-log-type { font-size: 13px; font-weight: 600; text-transform: capitalize; }
.detail-log-date { font-size: 11px; color: var(--text-secondary); }

.detail-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.btn-detail-edit {
  flex: 1;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  box-shadow: var(--shadow-2);
  transition: transform var(--transition);
}
.btn-detail-edit:active { transform: scale(.97); }

.btn-detail-delete {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #FFEBEE;
  color: var(--error);
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-1);
}
.btn-detail-delete:active { transform: scale(.97); }

/* -------- Care Log -------- */
.care-log-list { }

.log-item {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--divider);
  display: flex;
  align-items: center;
  gap: 12px;
}

.log-icon-wrap {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.log-icon-wrap.watered   { background: #E3F2FD; color: #1E88E5; }
.log-icon-wrap.fertilized{ background: #E8F5E9; color: #43A047; }
.log-icon-wrap.pruned    { background: #F3E5F5; color: #8E24AA; }
.log-icon-wrap.repotted  { background: var(--accent-light); color: #FB8C00; }
.log-icon-wrap.other     { background: var(--divider); color: var(--text-secondary); }

.log-info { flex: 1; min-width: 0; }
.log-plant-name {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.log-type-date { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.log-notes { font-size: 12px; color: var(--text-hint); margin-top: 2px; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.log-delete-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-hint);
  font-size: 18px;
}
.log-delete-btn:active { background: var(--divider); }

/* Week stats card */
.week-stats-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--divider);
  margin-bottom: 8px;
}

.week-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--divider);
}
.week-stat-row:last-child { border-bottom: none; padding-bottom: 0; }

.week-stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-stat-label .material-icons-round { font-size: 18px; }

.week-stat-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

/* -------- Task List -------- */
.task-list { margin-bottom: 4px; }

.task-item {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--divider);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity var(--transition);
}

.task-item.done { opacity: .55; }

.task-check {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--divider);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  cursor: pointer;
  font-size: 14px;
  color: transparent;
}
.task-check.done { background: var(--primary); border-color: var(--primary); color: #fff; }

.task-info { flex: 1; min-width: 0; }

.task-title-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.task-item.done .task-title-text { text-decoration: line-through; color: var(--text-secondary); }

.task-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.task-priority {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.task-priority.high   { background: #FFEBEE; color: var(--error); }
.task-priority.medium { background: var(--accent-light); color: #E65100; }
.task-priority.low    { background: var(--primary-light); color: var(--primary-dark); }

.task-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.task-action-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-hint);
  font-size: 18px;
}
.task-action-btn:active { background: var(--divider); }

.badge {
  min-width: 22px; height: 22px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* -------- Empty State -------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 64px;
  color: var(--divider);
  margin-bottom: 16px;
}

.empty-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-sub {
  font-size: 13px;
  color: var(--text-hint);
  margin-bottom: 24px;
  line-height: 1.6;
}

.btn-empty {
  padding: 12px 28px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-2);
  transition: transform var(--transition);
}
.btn-empty:active { transform: scale(.97); }

/* -------- Overlay & Bottom Sheet -------- */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(2px);
}
.backdrop.visible { opacity: 1; 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: 200;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  max-height: 92vh;
  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: 10px auto 0;
  flex-shrink: 0;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--divider);
  flex-shrink: 0;
}

.sheet-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.sheet-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 22px;
}
.sheet-close:active { background: var(--divider); }

.sheet-body {
  overflow-y: auto;
  padding: 20px 20px 40px;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

/* -------- Form Fields -------- */
.form-field {
  position: relative;
  margin-bottom: 20px;
}

.form-input {
  width: 100%;
  height: 52px;
  border: 1.5px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 16px 14px 4px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface-2);
  outline: none;
  transition: border-color var(--transition);
  appearance: none;
}

.form-input:focus { border-color: var(--primary); background: var(--surface); }

.form-label {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-hint);
  pointer-events: none;
  transition: all var(--transition);
  background: transparent;
}

.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
  top: 10px;
  font-size: 11px;
  color: var(--primary);
  font-weight: 500;
  transform: translateY(0);
}

.form-label.form-label-always {
  top: 10px;
  font-size: 11px;
  color: var(--text-hint);
  font-weight: 500;
  transform: translateY(0);
}
.form-input:focus ~ .form-label.form-label-always { color: var(--primary); }

.form-select {
  cursor: pointer;
  padding-top: 16px;
}

.form-textarea {
  height: auto;
  padding-top: 20px;
  resize: none;
  line-height: 1.5;
}

.form-textarea ~ .form-label { top: 14px; }
.form-textarea:focus ~ .form-label,
.form-textarea:not(:placeholder-shown) ~ .form-label {
  top: 6px; font-size: 11px; transform: none;
}

/* Care type chips in log form */
.care-type-label {
  font-size: 12px;
  color: var(--text-hint);
  font-weight: 500;
  margin-bottom: 8px;
  margin-top: -4px;
}

.care-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.care-type-chip {
  padding: 8px 12px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--divider);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition);
  background: var(--surface-2);
}
.care-type-chip .material-icons-round { font-size: 16px; }
.care-type-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.care-type-chip:active { transform: scale(.96); }

/* -------- Reminder -------- */
.reminder-info { text-align: center; margin-bottom: 16px; }

.reminder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
}

.reminder-label { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.reminder-sub   { font-size: 12px; color: var(--text-secondary); }

/* Toggle */
.toggle { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  width: 48px; height: 26px;
  background: var(--divider);
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(22px); }

/* -------- Confirm Dialog -------- */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(2px);
  animation: fadeIn .2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.dialog {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 28px 24px 20px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  box-shadow: var(--shadow-3);
  animation: scaleIn .25s cubic-bezier(.34,1.56,.64,1);
}

@keyframes scaleIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }

.dialog-icon-wrap {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #FFEBEE;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
}

.dialog-icon { font-size: 30px; color: var(--error); }

.dialog-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.dialog-message { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.5; }

.dialog-actions {
  display: flex;
  gap: 10px;
}

.btn-dialog-cancel {
  flex: 1;
  height: 46px;
  border-radius: var(--radius-full);
  background: var(--divider);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}
.btn-dialog-cancel:active { opacity: .8; }

.btn-dialog-confirm {
  flex: 1;
  height: 46px;
  border-radius: var(--radius-full);
  background: var(--error);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(229,57,53,.4);
}
.btn-dialog-confirm:active { opacity: .8; }

/* -------- Snackbar -------- */
.snackbar {
  position: fixed;
  bottom: calc(var(--nav-height) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: #323232;
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 400;
  min-width: 260px;
  max-width: calc(100% - 32px);
  box-shadow: var(--shadow-3);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}

.snackbar.show { transform: translateX(-50%) translateY(0); }

.snackbar-msg { font-size: 13px; flex: 1; }
.snackbar-action {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  padding: 4px 8px;
}

/* -------- Buttons -------- */
.btn-primary {
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-2);
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-primary:active { transform: scale(.97); box-shadow: var(--shadow-1); }
.btn-full { width: 100%; }

/* -------- Skeleton Loading -------- */
.skeleton {
  background: linear-gradient(90deg, var(--divider) 25%, #e8f0e8 50%, var(--divider) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.skeleton-card {
  height: 78px;
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
}
