/* ==========================================================================
   LEAFMATE - Modern Botanical & Glassmorphism Design System
   ========================================================================== */

/* Self-hosted Plus Jakarta Sans (100% DSGVO-konform, kein externer Server-Aufruf) */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Core Brand Colors (LeafMate Fresh Botanical Palette) */
  --primary: #0f3922;
  --primary-hover: #071b10;
  --primary-accent: #059669;
  --primary-light: #d1fae5;
  --primary-subtle: #ecfdf5;
  
  --accent-mint: #10b981;
  --accent-sage: #34d399;
  --accent-gold: #f59e0b;
  --accent-sun: #f97316;
  --accent-sun-bg: #fff7ed;
  --accent-water: #0284c7;
  --accent-water-light: #e0f2fe;

  /* Status Colors */
  --status-urgent: #ef4444;
  --status-urgent-bg: #fee2e2;
  --status-warning: #f59e0b;
  --status-warning-bg: #fef3c7;
  --status-good: #10b981;
  --status-good-bg: #d1fae5;

  /* Health Badges */
  --health-vital: #10b981;
  --health-good: #3b82f6;
  --health-attention: #f59e0b;
  --health-critical: #ef4444;

  /* Surfaces & Neutrals (Light Theme) */
  --bg-main: #f8faf7;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-card: rgba(255, 255, 255, 0.7);

  --text-primary: #0d1712;
  --text-secondary: #33443a;
  --text-muted: #52665a;
  --text-inverse: #ffffff;

  --border-color: #e5ece6;
  --border-light: #f0f4f1;
  --border-glass: rgba(255, 255, 255, 0.6);

  /* Elevation Shadows */
  --shadow-sm: 0 2px 8px rgba(27, 67, 50, 0.04);
  --shadow-md: 0 8px 24px rgba(27, 67, 50, 0.08);
  --shadow-lg: 0 16px 40px rgba(27, 67, 50, 0.12);
  --shadow-glow: 0 0 20px rgba(82, 183, 136, 0.35);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

/* ==========================================================================
   Dark Theme (Deep Forest / Midnight Moss)
   ========================================================================== */
[data-theme="dark"] {
  color-scheme: dark;
  --bg-main: #0d1a12;
  --bg-surface: #14241b;
  --bg-surface-elevated: #1a2e22;
  --bg-glass: rgba(20, 36, 27, 0.85);
  --bg-glass-card: rgba(26, 46, 34, 0.7);

  --text-primary: #eef7f0;
  --text-secondary: #b1c7b8;
  --text-muted: #768f7f;
  --text-inverse: #101c14;

  --border-color: #233b2d;
  --border-light: #1b2f23;
  --border-glass: rgba(255, 255, 255, 0.08);

  --primary: #10b981;
  --primary-hover: #34d399;
  --primary-light: #064e3b;
  --primary-subtle: #022c22;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2.5px solid #10b981;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.28);
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.55;
  min-height: 100vh;
  padding-bottom: 70px;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Header & Glassmorphism Nav
   ========================================================================== */
.app-header {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px 10px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.header-main-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.header-primary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  flex-shrink: 0;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(6deg);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.brand-svg {
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.6px;
  background: linear-gradient(135deg, #064e3b 0%, #059669 60%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

[data-theme="dark"] .brand-title {
  background: linear-gradient(135deg, #ffffff 0%, #a7f3d0 60%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.2;
}

/* Feature Tool Slidebar (Single-Row Horizontal Swipeable Pill Bar) */
.header-slidebar-wrapper {
  position: relative;
  width: 100%;
}

.header-slidebar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: visible;
  white-space: nowrap;
  padding: 2px 2px 6px 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.header-slidebar::-webkit-scrollbar {
  display: none;
}

/* Slidebar Chips / Pills */
.slide-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.slide-chip:hover {
  background: #f0fdf4;
  color: #065f46;
  border-color: #34d399;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.18);
}

.slide-chip:active {
  transform: scale(0.96);
}

[data-theme="dark"] .slide-chip {
  background: var(--bg-surface-elevated);
  border-color: rgba(52, 211, 153, 0.25);
  color: var(--text-primary);
}

[data-theme="dark"] .slide-chip:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #a7f3d0;
}

/* Mehr / Extras Dropdown Menu & Container */
.more-menu-container {
  position: relative;
  display: inline-flex;
}

.btn-more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-more-toggle.active {
  background: var(--bg-surface-elevated);
  border-color: var(--primary);
  color: var(--primary);
}

.menu-caret {
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.btn-more-toggle.active .menu-caret {
  transform: rotate(180deg);
}

.more-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 290px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.18), 0 4px 12px -2px rgba(0, 0, 0, 0.1);
  padding: 8px 6px;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeInDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.more-dropdown-panel.open {
  display: block;
}

.dropdown-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 6px 10px 4px 10px;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 6px;
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  box-sizing: border-box;
}

.dropdown-item:hover, .dropdown-item:focus {
  background: var(--bg-hover);
  color: var(--primary);
  outline: none;
}

.dropdown-item-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-item-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
}

.dropdown-item-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-item-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .more-dropdown-panel {
  background: rgba(30, 41, 59, 0.94);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Mobile Bottom Sheet Adaption */
@media (max-width: 600px) {
  .more-dropdown-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
    padding: 16px 14px 28px 14px;
    z-index: 2000;
    animation: slideUpBottom 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

@keyframes slideUpBottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Theme Toggle Button */
.btn-theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-theme-toggle:hover {
  background: var(--bg-main);
  transform: translateY(-1px);
}

/* Language Toggle Button (Header) */
.btn-lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-lang-toggle:hover {
  background: var(--bg-main);
  border-color: var(--primary);
  transform: translateY(-1px);
}
.btn-lang-toggle:active {
  transform: scale(0.96);
}

/* Drawer Language Selector */
.drawer-lang-selector {
  display: flex;
  gap: 8px;
  margin: 6px 16px 14px 16px;
}
.lang-choice-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}
.lang-choice-btn:hover {
  background: var(--bg-main);
  border-color: var(--primary);
  color: var(--text-primary);
}
.lang-choice-btn.active {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 0 1px var(--primary);
}
.lang-choice-btn .lang-flag {
  font-size: 20px;
  line-height: 1;
}
.lang-choice-btn .lang-name {
  font-size: 12px;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.42);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background: var(--bg-main);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.btn-ai {
  background: linear-gradient(135deg, #1b4332 0%, #7928ca 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(121, 40, 202, 0.3);
}
.btn-ai:hover {
  background: linear-gradient(135deg, #142f23 0%, #681ebb 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(121, 40, 202, 0.45);
}

.btn-water {
  background: var(--accent-water-light);
  color: var(--accent-water);
  border-color: #bae6fd;
}
.btn-water:hover {
  background: #bae6fd;
  color: #0369a1;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-danger {
  background-color: #fee2e2;
  color: var(--status-urgent);
  border-color: #fecaca;
}
.btn-danger:hover {
  background-color: #fecaca;
}

.btn-outline {
  background: transparent;
  color: var(--primary-accent);
  border: 1.5px solid var(--accent-mint);
}
.btn-outline:hover {
  background: var(--primary-subtle);
  border-color: var(--primary-accent);
  transform: translateY(-1px);
}

#btnInstallPwa {
  animation: pulse-pwa-btn 2.5s infinite ease-in-out;
}
@keyframes pulse-pwa-btn {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(82, 183, 136, 0); }
  50% { transform: scale(1.04); box-shadow: 0 0 12px rgba(82, 183, 136, 0.4); }
}

/* Notification Button & Card */
.btn-notification-active {
  border-color: var(--accent-mint) !important;
  color: var(--primary-accent) !important;
  background: var(--primary-subtle) !important;
}
.notification-status-card {
  transition: var(--transition);
}
.notification-status-card.granted {
  border-color: var(--accent-mint) !important;
  background: var(--primary-subtle) !important;
}
.notification-status-card.denied {
  border-color: #fca5a5 !important;
  background: #fef2f2 !important;
}

/* AI Key Indicator in Header */
.ai-key-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.ai-key-indicator:hover {
  background: var(--bg-main);
}
.ai-key-indicator.active {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  color: #6d28d9;
  border-color: #ddd6fe;
}
[data-theme="dark"] .ai-key-indicator.active {
  background: #2e1065;
  color: #c4b5fd;
  border-color: #5b21b6;
}

/* ==========================================================================
   Main Container Layout
   ========================================================================== */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px;
}

/* ==========================================================================
   DAILY TASKS WIDGET ("Heute zu erledigen")
   ========================================================================== */
.daily-tasks-card {
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  color: white;
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.daily-tasks-card::after {
  content: "💧";
  position: absolute;
  right: 20px;
  bottom: -15px;
  font-size: 110px;
  opacity: 0.12;
  pointer-events: none;
}

.daily-tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.daily-tasks-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.daily-tasks-badge {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.daily-tasks-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.daily-task-item {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  min-width: 220px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: var(--transition);
}
.daily-task-item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.daily-task-info {
  display: flex;
  flex-direction: column;
}

.daily-task-name {
  font-size: 14px;
  font-weight: 700;
}

.daily-task-status {
  font-size: 12px;
  opacity: 0.9;
}

.btn-task-check {
  background: white;
  color: var(--primary);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.btn-task-check:hover {
  transform: scale(1.1);
  background: #d8f3dc;
}

/* ==========================================================================
   Climate & Weather Smart Forecast Widget
   ========================================================================== */
.climate-widget-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.climate-widget-card:hover {
  box-shadow: var(--shadow-md);
}

.climate-widget-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.climate-info-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.climate-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}
[data-theme="dark"] .climate-icon-wrap {
  background: linear-gradient(135deg, #78350f, #92400e);
}

.climate-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.climate-temp-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.climate-temp {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.climate-location-btn {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.climate-location-btn:hover {
  background: var(--border-color);
  transform: translateY(-1px);
}

.climate-subtext {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.climate-subtext strong {
  color: var(--text-primary);
}

.climate-impact-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #bbf7d0;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  color: #166534;
  max-width: 440px;
}
[data-theme="dark"] .climate-impact-badge {
  background: linear-gradient(135deg, #14532d, #166534);
  border-color: #15803d;
  color: #dcfce7;
}

.climate-impact-badge.impact-high {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border-color: #fed7aa;
  color: #9a3412;
}
[data-theme="dark"] .climate-impact-badge.impact-high {
  background: linear-gradient(135deg, #7c2d12, #9a3412);
  border-color: #c2410c;
  color: #ffedd5;
}

.climate-impact-badge.impact-winter {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-color: #bfdbfe;
  color: #1e40af;
}
[data-theme="dark"] .climate-impact-badge.impact-winter {
  background: linear-gradient(135deg, #1e3a8a, #1e40af);
  border-color: #2563eb;
  color: #dbeafe;
}

.impact-indicator {
  font-size: 22px;
}

.impact-text {
  display: flex;
  flex-direction: column;
}
.impact-text strong {
  font-size: 13px;
  font-weight: 700;
}
.impact-text span {
  font-size: 12px;
  opacity: 0.9;
}

/* Forecast Box in Plant Cards */
.forecast-info-box {
  background: var(--bg-main);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-bottom: 14px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.forecast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.forecast-diff {
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
}
.forecast-diff.earlier {
  background: #fef3c7;
  color: #b45309;
}
[data-theme="dark"] .forecast-diff.earlier {
  background: #78350f;
  color: #fde68a;
}
.forecast-diff.later {
  background: #e0f2fe;
  color: #0369a1;
}
[data-theme="dark"] .forecast-diff.later {
  background: #0c4a6e;
  color: #bae6fd;
}
.forecast-diff.normal {
  background: #dcfce7;
  color: #15803d;
}
[data-theme="dark"] .forecast-diff.normal {
  background: #14532d;
  color: #bbf7d0;
}

.forecast-desc {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
}

/* City Search Results */
.city-search-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px;
}

.city-result-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  transition: var(--transition);
}
.city-result-item:hover {
  background: var(--bg-main);
  color: var(--primary);
}

/* ==========================================================================
   Room Carousel / Pills
   ========================================================================== */
.room-carousel-container {
  margin-bottom: 24px;
}

.room-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px 2px;
}

.room-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.room-pill:hover {
  background: var(--bg-main);
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.room-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(27, 67, 50, 0.25);
}

.room-pill-count {
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}
.room-pill.active .room-pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

/* ==========================================================================
   Quick Stats Grid
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-total .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-urgent .stat-icon { background: var(--status-urgent-bg); color: var(--status-urgent); }
.stat-warning .stat-icon { background: var(--status-warning-bg); color: var(--status-warning); }
.stat-good .stat-icon { background: var(--status-good-bg); color: var(--status-good); }

.stat-content .stat-number {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
}
.stat-content .stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 3px;
}

/* ==========================================================================
   Toolbar & Search
   ========================================================================== */
.toolbar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 22px;
  margin-bottom: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.toolbar-left {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  flex: 1;
}

.search-box {
  position: relative;
  min-width: 260px;
  flex: 1;
}
.search-box input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  outline: none;
  background: var(--bg-main);
  color: var(--text-primary);
  transition: var(--transition);
}
.search-box input:focus {
  border-color: var(--primary-accent);
  background: var(--bg-surface);
  box-shadow: 0 0 0 4px rgba(45, 106, 79, 0.12);
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.select-filter {
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  background: var(--bg-main);
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.pill-group {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.pill-btn {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.pill-btn:hover {
  background: var(--bg-main);
}
.pill-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.btn-view-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  transition: var(--transition);
}

.btn-view-toggle:hover {
  color: var(--text-primary);
}

.btn-view-toggle.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

/* ==========================================================================
   Plant Cards Grid
   ========================================================================== */
.plant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}

.plant-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 18px -2px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: auto 380px;
  view-transition-class: plant-card;
  container-type: inline-size;
  container-name: plantcard;
}

[data-theme="dark"] .plant-card {
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  border-color: rgba(255, 255, 255, 0.08);
}

.plant-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(82, 183, 136, 0.35) inset;
  border-color: rgba(82, 183, 136, 0.45);
}

[data-theme="dark"] .plant-card:hover {
  box-shadow: 0 16px 38px -8px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(82, 183, 136, 0.35) inset;
  border-color: rgba(82, 183, 136, 0.55);
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  height: 230px;
  background: #e9ecef;
  overflow: hidden;
  cursor: pointer;
}

/* Light-Sheen Effect on Card Image Hover */
.card-img-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: -130%;
  width: 70%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  transition: left 0.75s ease-out;
  pointer-events: none;
  z-index: 2;
}

.plant-card:hover .card-img-wrapper::after {
  left: 150%;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.plant-card:hover .card-img {
  transform: scale(1.05);
}

.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  background: linear-gradient(135deg, #d8f3dc, #b7e4c7);
}

/* Card Badges Corner Slot System (Prevents Overlap & Collisions) */
.card-badges-top-left {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  z-index: 3;
  pointer-events: none;
}

.card-badges-top-right {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  z-index: 3;
  pointer-events: none;
}

.card-badges-bottom-left {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  z-index: 3;
  pointer-events: none;
}

.card-badges-bottom-right {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  z-index: 3;
  pointer-events: none;
}

.card-badges-top-left > *,
.card-badges-top-right > *,
.card-badges-bottom-left > *,
.card-badges-bottom-right > * {
  position: static !important;
  margin: 0 !important;
  pointer-events: auto;
}

/* Glassmorphic Badges on Image */
.badge-water-status {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}
.badge-urgent { background: #ef4444; color: white; }
.badge-warning { background: #f59e0b; color: white; }
.badge-good { background: #10b981; color: white; }

.badge-room {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(15, 23, 42, 0.65);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.badge-pet {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  backdrop-filter: blur(8px);
}
.badge-pet.pet-safe { color: #15803d; }
.badge-pet.pet-toxic { color: #b91c1c; }

.badge-health {
  position: absolute;
  bottom: 14px;
  right: 14px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  color: white;
  backdrop-filter: blur(8px);
}
.health-vital { background: #10b981; }
.health-good { background: #3b82f6; }
.health-attention { background: #f59e0b; }
.health-critical { background: #ef4444; }

/* Card Body */
.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.plant-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.plant-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}

.plant-botanical {
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* Specs Row */
.plant-specs-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
  font-size: 13px;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}
.spec-item strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Moisture Meter Progress Bar */
.moisture-container {
  margin-bottom: 16px;
}
.moisture-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.moisture-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.moisture-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Card Actions */
.card-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 70px 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border-color);
  grid-column: 1 / -1;
}
.empty-icon {
  font-size: 60px;
  margin-bottom: 16px;
}
.empty-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}
.empty-desc {
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 24px auto;
}

/* ==========================================================================
   Modals & Popups
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal-overlay.active {
  display: flex;
}

body.modal-open {
  overflow: hidden !important;
}

.modal-content {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 660px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overscroll-behavior: contain;
}
.modal-content-lg {
  max-width: 840px;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--bg-surface-elevated);
  z-index: 10;
  flex-shrink: 0;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--primary);
}
[data-theme="dark"] .modal-title {
  color: var(--accent-mint);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-main);
}

.modal-body {
  padding: 28px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain;
}

.modal-footer {
  padding: 18px 28px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-surface-elevated);
  flex-shrink: 0;
}

/* Detail Modal Action Rows */
.detail-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.detail-footer-secondary-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.detail-footer-primary-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
select,
textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 4px rgba(45, 106, 79, 0.12);
}

/* Photo Upload Box */
.photo-upload-container {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  background: var(--bg-main);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}
.photo-upload-container:hover {
  border-color: var(--primary-accent);
  background: var(--primary-subtle);
}

.photo-preview {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: none;
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.photo-placeholder span {
  font-size: 38px;
}

/* AI Components */
.photo-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.ai-loading-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: var(--radius-md);
  color: #6d28d9;
  font-size: 13px;
  font-weight: 600;
  margin-top: 14px;
}

.ai-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #ddd6fe;
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.ai-success-banner {
  padding: 16px 18px;
  background: #eefbf4;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-md);
  margin-top: 14px;
  color: #065f46;
  font-size: 13px;
  animation: modalFadeIn 0.3s ease;
}
[data-theme="dark"] .ai-success-banner {
  background: #064e3b;
  border-color: #047857;
  color: #a7f3d0;
}

.ai-banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.ai-banner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.ai-health-box {
  grid-column: 1 / -1;
  background: white;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #d1fae5;
  margin-top: 8px;
  color: #1f2937;
}
[data-theme="dark"] .ai-health-box {
  background: #042f2e;
  border-color: #115e59;
  color: #ccfbf1;
}

/* Detail Hero Header */
.detail-hero {
  position: relative;
  height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  background: #112d21;
}

.detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 24px 20px;
  background: linear-gradient(transparent, rgba(10, 25, 18, 0.9));
  color: white;
}

.detail-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.detail-botanical {
  font-size: 14px;
  opacity: 0.85;
  font-style: italic;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.detail-badge {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

/* Tabs inside Detail Modal */
.detail-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
  overflow-x: auto;
}

.detail-tab-btn {
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.detail-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
[data-theme="dark"] .detail-tab-btn.active {
  color: var(--accent-mint);
  border-bottom-color: var(--accent-mint);
}

/* Care Guide Cards */
.care-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.care-card {
  background: var(--bg-main);
  border-radius: var(--radius-md);
  padding: 16px;
  border-left: 4px solid var(--primary);
}
.care-card.sun { border-left-color: var(--accent-sun); }
.care-card.water { border-left-color: var(--accent-water); }
.care-card.feed { border-left-color: #8b5cf6; }
.care-card.winter { border-left-color: #0ea5e9; }
.care-card.health { border-left-color: var(--health-vital); grid-column: 1 / -1; }

.care-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}

.care-card-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* History Lists */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.history-item-date {
  font-weight: 700;
  color: var(--text-primary);
}

.history-item-detail {
  color: var(--text-muted);
}

.quick-amount-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-pill-opt {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn-pill-opt:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #112d21;
  color: white;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1500;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================
   Wachstums-Foto-Timeline & Vorher/Nachher-Slider
   ========================================== */

/* Growth Photo Upload in Modal */
.growth-photo-upload-zone {
  margin-top: 6px;
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--bg-main);
  transition: var(--transition);
}
.growth-photo-upload-zone:hover {
  border-color: var(--accent-mint);
}
.growth-photo-preview {
  position: relative;
  display: inline-block;
  margin-top: 8px;
}
.growth-preview-img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  display: block;
}
.btn-remove-preview {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: var(--transition);
}
.btn-remove-preview:hover {
  background: var(--status-urgent);
  transform: scale(1.1);
}

/* Before/After Comparison Card */
.growth-compare-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.growth-compare-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.growth-compare-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.growth-select-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.growth-select-group select {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
}

/* Before/After Slider Container */
.before-after-container {
  --pos: 50%;
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  user-select: none;
  background: #081c15;
  box-shadow: var(--shadow-md);
}
.ba-image-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.ba-image-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ba-before-layer {
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
  z-index: 2;
}
.ba-after-layer {
  z-index: 1;
}

/* Badges on the slider */
.ba-badge {
  position: absolute;
  top: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 4;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.ba-badge-before {
  left: 12px;
  background: rgba(27, 67, 50, 0.85);
  color: #d8f3dc;
  border: 1px solid rgba(149, 213, 178, 0.4);
}
.ba-badge-after {
  right: 12px;
  background: rgba(16, 185, 129, 0.88);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Divider Line & Handle */
.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  width: 3px;
  background: white;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: white;
  color: #1b4332;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -1px;
}

/* Transparent Range Slider Overlay */
.ba-slider-range {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 10;
  margin: 0;
  padding: 0;
}

/* History Item Photo Thumbnail */
.history-thumb-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  border: 1.5px solid var(--border-color);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.history-thumb-wrap:hover {
  transform: scale(1.08);
  border-color: var(--accent-mint);
}
.history-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.history-thumb-icon {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border-radius: 4px;
  padding: 1px 3px;
}

/* Image Lightbox */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 28, 21, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.lightbox-caption {
  margin-top: 14px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 16px;
  border-radius: var(--radius-full);
}
.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}

/* ==========================================================================
   Mobile Floating Action Button (FAB)
   ========================================================================== */
.mobile-fab {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  color: #ffffff;
  border: none;
  font-size: 24px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(27, 67, 50, 0.4);
  cursor: pointer;
  z-index: 90;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

[data-theme="dark"] .mobile-fab {
  background: linear-gradient(135deg, #2d6a4f, #52b788);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.mobile-fab:active {
  transform: scale(0.92);
}

/* Mobile adjustments are consolidated in the main Responsive section below */

@media (max-width: 640px) {
  .header-inner {
    padding: 8px 12px 6px 12px;
  }
  .form-row, .care-cards-grid, .ai-banner-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .card-actions {
    grid-template-columns: 1fr 1fr;
  }
  .before-after-container {
    height: 240px;
  }
  .growth-compare-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================
   Pflanzen-Doktor & Schadbild-Diagnose
   ========================================== */
.btn-doctor-header {
  border-color: #f59e0b;
  color: #b45309;
}
[data-theme="dark"] .btn-doctor-header {
  border-color: #f59e0b;
  color: #fbbf24;
}
.btn-doctor-header:hover {
  background: rgba(245, 158, 11, 0.12);
}

.doctor-photo-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-main);
  transition: var(--transition);
}
.doctor-photo-zone:hover {
  border-color: #f59e0b;
}

.symptom-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.symptom-chip {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.symptom-chip:hover {
  border-color: #f59e0b;
  color: var(--text-primary);
}
.symptom-chip.selected {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.2);
}
[data-theme="dark"] .symptom-chip.selected {
  background: #78350f;
  border-color: #f59e0b;
  color: #fef3c7;
}

.doctor-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #fde68a;
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

.doctor-card {
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  animation: modalFadeIn 0.3s ease;
}

.doctor-card.severity-mild {
  border-left: 5px solid #10b981;
}
.doctor-card.severity-moderate {
  border-left: 5px solid #f59e0b;
}
.doctor-card.severity-critical {
  border-left: 5px solid #ef4444;
}

.doctor-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.doctor-badge-severity {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}
.doctor-badge-severity.mild {
  background: #d1fae5;
  color: #065f46;
}
.doctor-badge-severity.moderate {
  background: #fef3c7;
  color: #92400e;
}
.doctor-badge-severity.critical {
  background: #fee2e2;
  color: #991b1b;
}

.doctor-steps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.doctor-step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-primary);
}
.doctor-step-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: var(--radius-sm);
  line-height: 1.2;
}

.doctor-existing-photos-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
}

.doctor-existing-photos-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 6px;
}

.doctor-existing-photo-item {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-color);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-main);
}
.doctor-existing-photo-item:hover {
  border-color: #f59e0b;
  transform: scale(1.05);
}
.doctor-existing-photo-item.active {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.4);
}
.doctor-existing-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.doctor-existing-photo-item .badge-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  font-size: 9px;
  padding: 2px 4px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

/* ==========================================
   Benutzerverwaltung & Haushalt Sharing
   ========================================== */
.btn-user-auth {
  border-color: var(--border-color);
  transition: var(--transition);
}
.btn-user-auth.logged-in {
  border-color: var(--accent-mint);
  color: var(--primary-accent);
  background: var(--primary-subtle);
}
[data-theme="dark"] .btn-user-auth.logged-in {
  border-color: var(--accent-mint);
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.15);
}

.btn-header-logout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
  transition: var(--transition);
}

.btn-header-logout:hover {
  color: #ef4444;
  border-color: #fca5a5;
  background: rgba(239, 68, 68, 0.08);
}

[data-theme="dark"] .btn-header-logout:hover {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(239, 68, 68, 0.15);
}

.btn-drawer-logout {
  transition: var(--transition);
}

.btn-drawer-logout:hover {
  color: #dc2626 !important;
  background: rgba(239, 68, 68, 0.12) !important;
}

.auth-tab-btn {
  transition: var(--transition);
}
.auth-tab-btn.active {
  color: var(--primary) !important;
  border-bottom-color: var(--primary) !important;
}
[data-theme="dark"] .auth-tab-btn.active {
  color: var(--accent-mint) !important;
  border-bottom-color: var(--accent-mint) !important;
}

/* In-Context Authentifizierungs-Fehlermeldungen */
.auth-error-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 14px;
  border-radius: var(--radius-md, 10px);
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
  animation: authSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="dark"] .auth-error-banner {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.auth-error-banner .auth-banner-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}
.auth-error-banner .auth-banner-msg {
  flex: 1;
  font-weight: 500;
  word-break: break-word;
}
.auth-error-banner .auth-banner-close {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: inherit;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}
.auth-error-banner .auth-banner-close:hover {
  opacity: 1;
}

@keyframes authSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.input-field-error {
  border-color: #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.03) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18) !important;
  animation: inputShake 0.35s ease-in-out;
}

@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.history-watered-by {
  font-size: 11px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.history-watered-badge {
  background: var(--primary-subtle);
  color: var(--primary-accent);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 10px;
  border: 1px solid rgba(45, 106, 79, 0.2);
}
[data-theme="dark"] .history-watered-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.3);
}

/* =======================================================
   HAUSHALTS- & MITGLIEDERVERWALTUNG (BENTO CARDS)
   ======================================================= */

.members-cards-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.member-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.member-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.member-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.member-card-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.member-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
  text-transform: uppercase;
  border: 2px solid var(--border-color);
}

.member-avatar-owner {
  background: rgba(234, 179, 8, 0.15);
  color: #b45309;
  border-color: rgba(234, 179, 8, 0.4);
}

.member-avatar-admin {
  background: rgba(14, 165, 233, 0.15);
  color: #0284c7;
  border-color: rgba(14, 165, 233, 0.4);
}

.member-avatar-member {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.4);
}

.member-avatar-guest {
  background: rgba(148, 163, 184, 0.18);
  color: #64748b;
  border-color: rgba(148, 163, 184, 0.4);
}

.member-meta-text {
  min-width: 0;
  flex: 1;
}

.member-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.member-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.member-handle {
  font-size: 12px;
  color: var(--text-muted);
}

.member-self-badge {
  font-size: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-weight: 600;
}

.member-joined-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Role Badges */
.badge-role {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-role-owner {
  background: rgba(234, 179, 8, 0.15);
  color: #b45309;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.badge-role-admin {
  background: rgba(14, 165, 233, 0.15);
  color: #0284c7;
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.badge-role-member {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-role-guest {
  background: rgba(148, 163, 184, 0.18);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* Interactive Role Selector */
.member-role-select {
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast);
}

.member-role-select:focus {
  border-color: var(--primary);
}

.member-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  gap: 8px;
  flex-wrap: wrap;
}

.member-role-assignment-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.member-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-left: auto;
}

.btn-member-action {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.btn-member-action:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--primary);
}

.btn-member-action.danger {
  color: #ef4444;
}

.btn-member-action.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
}

/* =======================================================
   5 TOP COMMUNITY-FEATURES: Dünger, Ableger, Kalender, Urlaub & Ruhestätte
   ======================================================= */

/* Header Badge Count */
.badge-count-pill {
  display: inline-block;
  background: #64748b;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  margin-left: 4px;
}

/* Plant Card Badges */
.badge-fertilizer {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.badge-fertilizer.fertilizer-due {
  background: rgba(245, 158, 11, 0.95);
  animation: pulse-glow 2s infinite ease-in-out;
}

.badge-fertilizer.fertilizer-winter {
  background: rgba(100, 116, 139, 0.85);
}

.badge-propagation {
  position: absolute;
  top: 40px;
  left: 8px;
  background: rgba(14, 165, 233, 0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  z-index: 2;
}

/* Propagation Form Box */
.propagation-toggle-box {
  background: var(--bg-tertiary, rgba(0,0,0,0.03));
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-top: 14px;
}

/* 📅 KALENDER STYLES */
.calendar-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.calendar-grid-container {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 18px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-secondary, rgba(0,0,0,0.03));
  text-align: center;
  padding: 8px 0;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-color);
}

.cal-day-cell {
  background: var(--bg-card);
  min-height: 56px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.cal-day-cell:hover {
  background: var(--bg-hover);
}

.cal-day-cell.other-month {
  opacity: 0.35;
  background: var(--bg-main);
}

.cal-day-cell.today {
  box-shadow: inset 0 0 0 2px var(--primary);
  background: rgba(34, 197, 94, 0.05);
}

.cal-day-cell.selected {
  background: rgba(34, 197, 94, 0.15);
}

.cal-day-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.cal-day-badges {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.cal-badge {
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-badge.water {
  background: #dbeafe;
  color: #1d4ed8;
}

[data-theme="dark"] .cal-badge.water {
  background: #1e3a8a;
  color: #93c5fd;
}

.cal-badge.fertilize {
  background: #d1fae5;
  color: #047857;
}

[data-theme="dark"] .cal-badge.fertilize {
  background: #064e3b;
  color: #6ee7b7;
}

.calendar-day-details {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.cal-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}

.cal-task-item:last-child {
  border-bottom: none;
}

/* ✈️ URLAUBS-MODUS STYLES */
.vacation-plan-container {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.vacation-room-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
}

.vacation-room-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vacation-plant-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 13px;
}

.vacation-plant-item:last-child {
  border-bottom: none;
}

/* 🪦 RUHESTÄTTE (PLANT GRAVEYARD) STYLES */
.graveyard-intro-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
}

.graveyard-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}

.graveyard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  content-visibility: auto;
  contain-intrinsic-size: auto 240px;
}

.graveyard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.graveyard-card-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.graveyard-plant-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.graveyard-death-tag {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.graveyard-card-body {
  padding: 12px 14px;
  font-size: 13px;
  flex: 1;
}

.graveyard-learnings {
  background: var(--bg-main);
  border-left: 3px solid var(--primary);
  padding: 8px 10px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 10px;
  font-style: italic;
  font-size: 12px;
  color: var(--text-secondary);
}

.graveyard-card-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-main);
}

/* ==========================================================================
   FEATURE STYLES: Streaks & Gamification
   ========================================================================== */
.streak-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(245, 158, 11, 0.16));
  color: #ea580c;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  animation: flame-pulse 2s infinite ease-in-out;
}
.streak-badge-btn:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(245, 158, 11, 0.25));
}
[data-theme="dark"] .streak-badge-btn {
  color: #fdba74;
  border-color: rgba(245, 158, 11, 0.4);
}
@keyframes flame-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(234, 88, 12, 0); }
  50% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.35); }
}

.gamification-hero {
  display: flex;
  gap: 20px;
  align-items: center;
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  color: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  flex-wrap: wrap;
}
.gamification-streak-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 110px;
}
.streak-flame-icon {
  font-size: 32px;
  line-height: 1;
}
.streak-hero-number {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  color: #fde047;
}
.streak-hero-label {
  font-size: 11px;
  opacity: 0.9;
  text-align: center;
  font-weight: 600;
}
.gamification-xp-col {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gamification-level-title {
  font-size: 18px;
  font-weight: 800;
  color: #fde047;
}
.gamification-xp-bar-wrap {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.gamification-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #52b788, #74c69d, #fde047);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}
.gamification-xp-text {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
}
.gamification-stats-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 12px;
}
.gamification-stats-pills span {
  background: rgba(255, 255, 255, 0.15);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.badge-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  transition: var(--transition);
}
.badge-card.earned {
  border-color: rgba(82, 183, 136, 0.5);
  background: linear-gradient(135deg, rgba(82, 183, 136, 0.08), rgba(116, 198, 157, 0.12));
}
.badge-card.locked {
  opacity: 0.45;
  filter: grayscale(1);
}
.badge-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.badge-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.badge-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ==========================================================================
   FEATURE STYLES: QR-Pflanzenschild
   ========================================================================== */
.qr-label-card {
  background: white;
  color: #111827;
  border: 2px dashed #94a3b8;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  max-width: 320px;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.qr-label-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
  margin-bottom: 12px;
  color: #1b4332;
}
.qr-label-room {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: #475569;
  font-size: 11px;
}
.qr-code-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  background: white;
  min-height: 180px;
}
.qr-code-wrapper canvas,
.qr-code-wrapper img {
  border-radius: 4px;
}
.qr-label-name {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
  margin-top: 8px;
  line-height: 1.2;
}
.qr-label-botanical {
  font-size: 12px;
  font-style: italic;
  color: #64748b;
  margin-bottom: 10px;
}
.qr-label-badges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.qr-badge-item {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  text-align: left;
  line-height: 1.2;
  box-sizing: border-box;
}
.qr-badge-icon {
  font-size: 13px;
  flex-shrink: 0;
}
.qr-badge-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qr-badge-item.badge-light {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.qr-badge-item.badge-water {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}
.qr-badge-item.badge-amount {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}
.qr-badge-item.badge-pet-safe {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.qr-badge-item.badge-pet-toxic {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
.qr-badge-item.badge-fert {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #6b21a8;
}
.qr-badge-item.badge-extra {
  background: #f0fdf4;
  border-color: #dcfce7;
  color: #166534;
}

/* ==========================================================================
   FEATURE STYLES: Statistiken & Analytics
   ========================================================================== */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-ov-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-ov-icon {
  font-size: 24px;
}
.stat-ov-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.stat-ov-label {
  font-size: 12px;
  color: var(--text-muted);
}
.stats-chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.stats-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
}
.stats-canvas-wrap {
  width: 100%;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.stats-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}
.stats-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.stats-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stats-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 6px 10px;
  background: var(--bg-main);
  border-radius: var(--radius-sm);
}
.stats-breakdown-name {
  font-weight: 600;
}
.stats-breakdown-val {
  font-weight: 700;
  color: var(--primary);
}

/* ==========================================================================
   Modern App Drawer (Side-Over Menu) & Native Mobile Bottom Nav
   ========================================================================== */

/* Menu Toggle Button in Header */
.btn-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-menu-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-menu-toggle:active {
  transform: scale(0.96);
}

.menu-icon-bars {
  font-size: 16px;
  line-height: 1;
}

/* Drawer Backdrop Overlay */
.drawer-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-overlay.active {
  display: block;
  opacity: 1;
}

/* App Drawer Panel */
.app-drawer {
  position: fixed;
  top: 0;
  right: -380px;
  width: 350px;
  max-width: 88vw;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  box-shadow: -12px 0 35px rgba(0, 0, 0, 0.22);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.app-drawer.open {
  transform: translateX(-380px);
}

[data-theme="dark"] .app-drawer {
  background: #17211b;
  border-left-color: rgba(255, 255, 255, 0.12);
  box-shadow: -14px 0 40px rgba(0, 0, 0, 0.5);
}

/* Drawer Header */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface-elevated);
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-brand-icon {
  font-size: 22px;
}

.drawer-brand-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.btn-drawer-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.btn-drawer-close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* Drawer User Profile Card */
.drawer-user-card {
  margin: 14px 16px 8px 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(2, 132, 199, 0.06));
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

[data-theme="dark"] .drawer-user-card {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(2, 132, 199, 0.09));
  border-color: rgba(34, 197, 94, 0.35);
}

.drawer-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.drawer-user-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer-user-meta strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-user-meta span {
  font-size: 11px;
  color: var(--text-muted);
}

.drawer-household-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  background: var(--bg-surface);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.btn-mini-copy {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
}
.btn-mini-copy:hover {
  background: var(--bg-hover);
}

.btn-drawer-auth {
  width: 100%;
  font-size: 12px;
  padding: 8px 10px;
  justify-content: center;
  font-weight: 600;
}

/* Drawer Scrollable Content */
.drawer-scrollable {
  flex-grow: 1;
  overflow-y: auto;
  padding: 6px 14px 24px 14px;
  -webkit-overflow-scrolling: touch;
}

.drawer-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 16px 6px 6px 6px;
}

.drawer-nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.drawer-nav-item:hover, .drawer-nav-item:focus {
  background: var(--bg-hover);
  border-color: var(--border-color);
  color: var(--primary);
  outline: none;
}

.drawer-nav-item:active {
  transform: scale(0.98);
}

.drawer-item-highlight {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.25);
  color: var(--primary);
}
.drawer-item-highlight:hover {
  background: rgba(34, 197, 94, 0.16);
  border-color: var(--primary);
}

.drawer-icon {
  font-size: 19px;
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.drawer-item-text {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
}

.drawer-item-text strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-item-text span {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-pill-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  text-transform: uppercase;
}

.drawer-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
}

/* ==========================================================================
   Mobile Bottom Navigation Bar
   ========================================================================== */
.mobile-bottom-nav {
  display: none; /* Desktop hidden */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 900;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="dark"] .mobile-bottom-nav {
  background: rgba(23, 33, 27, 0.95);
  border-top-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.4);
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  font-family: inherit;
}

.nav-tab-icon {
  font-size: 20px;
  line-height: 1.2;
  transition: transform 0.2s ease;
}

.nav-tab-label {
  font-size: 10px;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: -0.2px;
  transition: color 0.2s ease;
}

.nav-tab:hover, .nav-tab:focus {
  color: var(--primary);
  outline: none;
}

.nav-tab.active {
  color: var(--primary);
}

.nav-tab.active .nav-tab-icon {
  transform: translateY(-2px);
}

.nav-tab.active .nav-tab-label {
  color: var(--primary);
  font-weight: 700;
}

/* Center Elevated Add Button */
.nav-tab-add {
  position: relative;
}

.nav-tab-add-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(27, 67, 50, 0.4);
  transform: translateY(-8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .nav-tab-add-circle {
  background: linear-gradient(135deg, #2d6a4f, #52b788);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.nav-tab-add:active .nav-tab-add-circle {
  transform: translateY(-6px) scale(0.92);
}

/* Badge dot for bottom nav menu */
.badge-dot {
  position: absolute;
  top: 8px;
  right: calc(50% - 14px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--bg-surface);
}

/* ==========================================================================
   Responsive Architecture & Mobile-First UX (Smartphones & Tablets <= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Main Container - eliminate wasted space */
  .container {
    padding: 10px 14px 24px 14px !important;
  }

  /* Sleek Glassmorphic Mobile Header */
  .app-header {
    position: sticky;
    top: 0;
    z-index: 800;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  }

  .header-inner {
    padding: 8px 14px !important;
    gap: 0 !important;
  }

  .brand-text .brand-tagline {
    display: none !important;
  }

  .brand-title {
    font-size: 20px !important;
  }

  .brand-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 18px !important;
  }

  .header-primary-actions {
    gap: 8px !important;
  }

  .btn-menu-text {
    display: none !important;
  }

  /* Hide Desktop-only Elements on Mobile */
  .desktop-toolbar-wrapper,
  .btn-add-plant-header,
  .btn-user-auth,
  .btn-header-logout,
  .mobile-fab {
    display: none !important;
  }

  /* Show and Position Bottom Navigation */
  .mobile-bottom-nav {
    display: flex !important;
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 900;
  }

  /* Toast Notification positioned above Mobile Bottom Nav */
  .toast {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    left: 14px;
    right: 14px;
    justify-content: center;
    text-align: center;
    z-index: 1500;
  }

  /* ========================================================================
     MOBILE BOTTOM SHEETS & STICKY ACTION FOOTER (Solves Hidden Buttons!)
     ======================================================================== */
  .modal-overlay {
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 !important;
    overflow: hidden !important;
    z-index: 1200 !important;
  }

  .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92dvh !important;
    height: auto;
    border-radius: 24px 24px 0 0 !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: 0 -8px 36px rgba(0, 0, 0, 0.28) !important;
    animation: mobileSheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    margin: 0 !important;
  }

  .modal-content-lg {
    height: 92dvh !important;
  }

  @keyframes mobileSheetUp {
    from {
      transform: translateY(100%);
      opacity: 0.5;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .modal-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    background: var(--bg-surface-elevated) !important;
    padding: 18px 18px 12px 18px !important;
    border-bottom: 1px solid var(--border-color) !important;
    position: relative !important;
    flex-shrink: 0 !important;
  }

  /* Sleek drag handle bar at the top of bottom sheets */
  .modal-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    height: 4px;
    border-radius: 4px;
    background: var(--border-color);
    opacity: 0.85;
  }

  .modal-title {
    font-size: 18px !important;
    font-weight: 700 !important;
  }

  .modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px 16px 20px 16px !important;
    overscroll-behavior: contain !important;
  }

  /* Pinned / Sticky Modal Action Footer */
  .modal-footer {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 30 !important;
    background: var(--bg-surface-elevated) !important;
    border-top: 1px solid var(--border-color) !important;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08) !important;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    width: 100% !important;
    flex-shrink: 0 !important;
  }

  .modal-footer > .btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Pflanze erfassen / bearbeiten Modal Footer */
  #plantModal .modal-footer {
    display: flex !important;
    width: 100% !important;
    gap: 10px !important;
  }

  #plantModal .modal-footer [data-close="plantModal"] {
    flex: 1 !important;
    height: 48px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
  }

  #plantModal .modal-footer #btnSavePlant {
    flex: 2 !important;
    height: 48px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
  }

  /* Detail Modal Actions on Mobile */
  .detail-modal-footer {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)) 14px !important;
    width: 100% !important;
  }

  .detail-footer-secondary-row {
    display: flex !important;
    gap: 6px !important;
    overflow-x: auto !important;
    width: 100% !important;
    padding: 2px 2px 4px 2px !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
  }

  .detail-footer-secondary-row::-webkit-scrollbar {
    display: none;
  }

  .detail-footer-secondary-row .btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-size: 12px !important;
    padding: 7px 12px !important;
    border-radius: var(--radius-full) !important;
  }

  .detail-footer-primary-row {
    display: flex !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .detail-footer-primary-row #btnEditCurrentPlant {
    flex: 1 !important;
    height: 48px !important;
    font-size: 14px !important;
    border-radius: var(--radius-md) !important;
  }

  .detail-footer-primary-row #btnQuickWaterFromDetail {
    flex: 2 !important;
    height: 48px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: var(--radius-md) !important;
  }

  /* ========================================================================
     SMARTPHONE BARS: Carousel, Toolbar, Climate Widget, Stats & Grid
     ======================================================================== */

  /* Smart Weather / Climate Card */
  .climate-widget-card {
    padding: 12px 14px !important;
    margin-bottom: 14px !important;
    border-radius: var(--radius-md) !important;
  }

  .climate-widget-inner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .climate-info-main {
    gap: 12px !important;
  }

  .climate-icon-wrap {
    width: 44px !important;
    height: 44px !important;
    font-size: 22px !important;
    border-radius: var(--radius-sm) !important;
  }

  .climate-temp {
    font-size: 20px !important;
  }

  .climate-subtext {
    font-size: 11px !important;
    gap: 8px !important;
  }

  .climate-impact-badge {
    padding: 8px 12px !important;
    max-width: 100% !important;
    font-size: 12px !important;
    gap: 8px !important;
  }

  .climate-impact-badge .impact-indicator {
    font-size: 18px !important;
  }

  .climate-impact-badge .impact-text strong {
    font-size: 12px !important;
  }

  .climate-impact-badge .impact-text span {
    font-size: 11px !important;
    line-height: 1.3 !important;
  }

  /* Compact Stats Grid */
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
  }

  .stat-card {
    padding: 10px 12px !important;
    gap: 10px !important;
    border-radius: var(--radius-md) !important;
  }

  .stat-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 18px !important;
  }

  .stat-content .stat-number {
    font-size: 20px !important;
  }

  .stat-content .stat-label {
    font-size: 11px !important;
  }

  /* Edge-to-Edge Room Carousel */
  .room-carousel-container {
    margin: 0 -14px 14px -14px !important;
    padding: 0 !important;
  }

  .room-carousel {
    padding: 4px 14px 8px 14px !important;
    gap: 8px !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .room-carousel::-webkit-scrollbar {
    display: none !important;
  }

  .room-pill {
    padding: 8px 14px !important;
    font-size: 13px !important;
    flex-shrink: 0 !important;
  }

  /* Modern Toolbar: Full-Width Search + Swipeable Status Chips */
  .toolbar {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 16px !important;
    box-shadow: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .toolbar-left {
    width: 100% !important;
    min-width: 0 !important;
  }

  .search-box {
    min-width: 0 !important;
    width: 100% !important;
  }

  .search-box input {
    width: 100% !important;
    height: 44px !important;
    border-radius: var(--radius-full) !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
    font-size: 14px !important;
    padding-left: 42px !important;
  }

  .search-box .search-icon {
    left: 14px !important;
    font-size: 16px !important;
  }

  .toolbar-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
  }

  #statusPills {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 6px !important;
    padding: 2px 2px 6px 2px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  #statusPills::-webkit-scrollbar {
    display: none !important;
  }

  #statusPills .pill-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-size: 12px !important;
    padding: 7px 13px !important;
    border-radius: var(--radius-full) !important;
  }

  .view-mode-toggle {
    flex-shrink: 0 !important;
  }

  /* Plant Cards Grid on Mobile */
  .plant-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Compact Card Layout on Mobile (reduces 650px monster cards to ~280px) */
  .plant-card {
    border-radius: 18px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
  }

  .card-img-wrapper {
    height: 180px !important;
  }

  .card-body {
    padding: 14px 16px !important;
    gap: 8px !important;
  }

  .plant-name {
    font-size: 17px !important;
  }

  .plant-botanical {
    margin-bottom: 8px !important;
    font-size: 12px !important;
  }

  .plant-specs-row {
    padding: 6px 0 !important;
    margin-bottom: 8px !important;
    font-size: 12px !important;
    gap: 10px !important;
  }

  .forecast-info-box {
    margin-bottom: 8px !important;
    padding: 8px 10px !important;
  }

  .moisture-container {
    margin-bottom: 10px !important;
  }

  .card-actions {
    display: flex !important;
    gap: 8px !important;
    margin-top: 4px !important;
  }

  .card-actions .btn-water-quick {
    flex: 2 !important;
    height: 44px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: var(--radius-md) !important;
  }

  .card-actions .btn-card-secondary {
    flex: 1 !important;
    height: 44px !important;
    font-size: 13px !important;
    border-radius: var(--radius-md) !important;
  }

  /* Compact List Meta Row - only displayed in .plant-grid.list-view mode */
  .list-meta-row {
    display: none;
  }

  /* ========================================================================
     NATIVE MOBILE COMPACT LIST VIEW (.plant-grid.list-view)
     ======================================================================== */
  .plant-grid.list-view {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .plant-grid.list-view .plant-card {
    flex-direction: row !important;
    align-items: center !important;
    padding: 10px 12px !important;
    border-radius: 16px !important;
    min-height: 74px !important;
    gap: 12px !important;
  }

  .plant-grid.list-view .card-img-wrapper {
    width: 58px !important;
    height: 58px !important;
    border-radius: 12px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  }

  .plant-grid.list-view .card-img-placeholder {
    font-size: 26px !important;
  }

  /* In List View, hide redundant nested boxes to keep rows ultra-clean */
  .plant-grid.list-view .card-badges-top-left,
  .plant-grid.list-view .card-badges-top-right,
  .plant-grid.list-view .card-badges-bottom-left,
  .plant-grid.list-view .card-badges-bottom-right,
  .plant-grid.list-view .badge-water-status,
  .plant-grid.list-view .badge-room,
  .plant-grid.list-view .badge-pet,
  .plant-grid.list-view .badge-fert,
  .plant-grid.list-view .badge-health,
  .plant-grid.list-view .plant-specs-row,
  .plant-grid.list-view .forecast-info-box,
  .plant-grid.list-view .water-info-box,
  .plant-grid.list-view .moisture-container,
  .plant-grid.list-view .btn-card-secondary {
    display: none !important;
  }

  .plant-grid.list-view .card-body {
    padding: 0 !important;
    flex: 1 !important;
    min-width: 0 !important;
    justify-content: center !important;
    gap: 2px !important;
  }

  .plant-grid.list-view .plant-title-row {
    margin-bottom: 0 !important;
  }

  .plant-grid.list-view .plant-name {
    font-size: 15px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .plant-grid.list-view .plant-botanical {
    font-size: 11px !important;
    margin-bottom: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .plant-grid.list-view .list-meta-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 11px !important;
    color: var(--text-muted) !important;
    margin-top: 2px !important;
  }

  .plant-grid.list-view .card-actions {
    margin-top: 0 !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .plant-grid.list-view .btn-water-quick {
    width: 44px !important;
    height: 44px !important;
    border-radius: var(--radius-full) !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    flex: none !important;
    box-shadow: 0 3px 10px rgba(56, 189, 248, 0.3) !important;
  }

  .plant-grid.list-view .btn-water-quick .btn-water-text {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .mobile-bottom-nav {
    display: none !important;
  }

  .desktop-toolbar-wrapper {
    display: block;
    margin-top: 8px;
  }

  .desktop-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: visible;
  }
}

/* ==========================================================================
   Schädlings- & Quarantäne-Manager Styles
   ========================================================================== */
.plant-card.is-quarantine {
  border: 2px solid #ef4444 !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25) !important;
}

.plant-card.is-quarantine::before {
  display: none !important; /* Replaced by localized .badge-quarantine in .card-badges-top-left */
}

.badge-quarantine {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(6px);
}

.room-chip.quarantine-chip {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
  font-weight: 700;
}

[data-theme="dark"] .room-chip.quarantine-chip {
  background: #450a0a;
  color: #fca5a5;
  border-color: #7f1d1d;
}

.quarantine-care-card {
  border: 2px solid #f87171 !important;
  background: linear-gradient(to bottom, var(--bg-surface), rgba(239, 68, 68, 0.05)) !important;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.quarantine-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.quarantine-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

[data-theme="dark"] .quarantine-status-pill {
  background: #7f1d1d;
  color: #fecaca;
}

.treatment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.treatment-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.treatment-item.is-done {
  opacity: 0.6;
  background: var(--bg-surface);
  border-color: var(--border-color);
}

.treatment-item.is-done .treatment-name {
  text-decoration: line-through;
}

.treatment-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--primary);
}

.treatment-content {
  flex: 1;
}

.treatment-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.treatment-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.treatment-tag {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ==========================================================================
   Vorher/Nachher Wachstums-Vergleich & Split-Slider
   ========================================================================== */
.growth-compare-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.growth-compare-mode-toggle {
  display: flex;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
}

.compare-mode-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.compare-mode-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(45, 106, 79, 0.3);
}

.growth-select-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.growth-select-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.growth-select-col label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.growth-select-col select {
  font-size: 12px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-primary);
  max-width: 170px;
}

.growth-metrics-banner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.growth-metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.metric-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.metric-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.growth-metric-divider {
  width: 1px;
  height: 32px;
  background: var(--border-color);
}

.compare-side-by-side-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 600px) {
  .compare-side-by-side-grid {
    grid-template-columns: 1fr;
  }
}

.compare-side-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.compare-side-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}

.compare-side-img-wrap {
  width: 100%;
  height: 340px;
  background: #081c15;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.compare-side-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.badge-mini {
  font-size: 11px;
  background: var(--primary-subtle);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* ==========================================
   PFLANZEN-ENZYKLOPÄDIE & AUTOCOMPLETE STYLES
   ========================================== */

/* Autocomplete Popover Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% - 14px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 1050;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s ease;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: var(--primary-subtle);
}

.autocomplete-item-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}

.autocomplete-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.autocomplete-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-item-botanical {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-item-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 3px;
}

.autocomplete-item-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* Encyclopedia Modal Layout */
.encyclopedia-modal-content {
  width: 95%;
  max-width: 840px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
}

.encyclopedia-toolbar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
  flex-shrink: 0;
}

.encyclopedia-search-wrap {
  position: relative;
  margin-bottom: 10px;
}

.encyclopedia-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.6;
  pointer-events: none;
}

.encyclopedia-search-wrap input {
  width: 100%;
  padding: 10px 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-primary);
  font-size: 14px;
  box-sizing: border-box;
}

.btn-clear-search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
}

.encyclopedia-filters-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.encyclopedia-filters-row select {
  flex: 1 1 calc(50% - 4px);
  min-width: 140px;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .encyclopedia-filters-row select {
    flex: 1 1 auto;
  }
}

.encyclopedia-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  align-content: start;
}

.encyclopedia-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  content-visibility: auto;
  contain-intrinsic-size: auto 180px;
}

.encyclopedia-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.1));
  border-color: var(--primary);
}

.encyclopedia-card-header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.encyclopedia-card-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.encyclopedia-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.encyclopedia-card-botanical {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
}

.encyclopedia-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.encyclopedia-pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.encyclopedia-tips {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
  background: var(--bg-surface);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

.encyclopedia-card-actions {
  margin-top: auto;
}

.btn-adopt-plant {
  width: 100%;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ==========================================
   Unauthenticated Guest State & Auth Gate
   ========================================== */
body.is-unauthenticated #dailyTasksSection,
body.is-unauthenticated .daily-tasks-card,
body.is-unauthenticated .stats-grid,
body.is-unauthenticated .room-carousel-container,
body.is-unauthenticated .toolbar,
body.is-unauthenticated #btnAddPlant,
body.is-unauthenticated #btnFabAddPlant,
body.is-unauthenticated .mobile-bottom-nav,
body.is-unauthenticated #btnBatchWaterHeader,
body.is-unauthenticated #btnOpenDoctor,
body.is-unauthenticated #btnCalendar,
body.is-unauthenticated #btnStatsAnalytics {
  display: none !important;
}

.auth-gate-card {
  max-width: 520px;
  margin: 36px auto;
  padding: 36px 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.auth-gate-card .empty-icon {
  font-size: 56px;
  margin-bottom: 12px;
}

.auth-gate-card .empty-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.auth-gate-card .empty-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto 22px;
}

.auth-gate-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Modal Shake Effect when backdrop clicked without login */
@keyframes modalShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.modal-shake {
  animation: modalShake 0.4s ease-in-out;
}

/* ==========================================
   Custom Native-like Dialog System (Botanika Style)
   ========================================== */
.custom-dialog-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.custom-dialog-overlay.active {
  display: flex !important;
}

.custom-dialog-card {
  max-width: 420px;
  width: 100%;
  background: var(--bg-surface-elevated, var(--bg-surface));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 18px);
  padding: 24px 22px 20px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.35);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: dialogScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dialogScaleIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.custom-dialog-badge-wrap {
  margin-bottom: 12px;
}

.custom-dialog-icon-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--primary-subtle, rgba(16, 185, 129, 0.12));
  border: 1px solid var(--accent-mint, rgba(16, 185, 129, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto;
}

.custom-dialog-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.custom-dialog-body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 20px;
  word-break: break-word;
  max-width: 100%;
}

.custom-dialog-input-wrap {
  width: 100%;
  margin-bottom: 18px;
}

.custom-dialog-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md, 10px);
  background: var(--bg-surface);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
  box-sizing: border-box;
}

.custom-dialog-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.custom-dialog-footer {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.custom-dialog-btn {
  flex: 1;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md, 10px);
  justify-content: center;
  cursor: pointer;
}

[data-theme="dark"] .custom-dialog-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65);
}

[data-theme="dark"] .custom-dialog-icon-badge {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
}

.custom-dialog-icon-badge.is-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

[data-theme="dark"] .custom-dialog-icon-badge.is-danger {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
}

.custom-dialog-btn.btn-danger {
  background: var(--danger, #ef4444) !important;
  color: #ffffff !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.custom-dialog-btn.btn-danger:hover {
  background: #dc2626 !important;
}

/* ==========================================================================
   INTERAKTIVE APP-TOUR & USER GUIDE (BOTANIKA STYLE)
   ========================================================================== */

.user-guide-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 9999;
}

.user-guide-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.user-guide-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg, 24px);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 20px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.user-guide-overlay.active .user-guide-card {
  transform: translateY(0) scale(1);
}

.guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.guide-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--primary, #10b981);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 4px 10px;
  border-radius: var(--radius-full, 999px);
  border: 1px solid rgba(16, 185, 129, 0.25);
  text-transform: uppercase;
}

.guide-step-counter {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted, #64748b);
}

.guide-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.guide-close-btn:hover {
  color: var(--text-primary, #0f172a);
  background: var(--bg-surface-elevated, #f1f5f9);
}

.guide-slide-viewport {
  position: relative;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.guide-slide {
  text-align: center;
  animation: guideFadeSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes guideFadeSlide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.guide-icon-badge {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.25));
  border: 2px solid rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  box-shadow: 0 8px 20px -4px rgba(16, 185, 129, 0.25);
}

.guide-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
  margin: 0 0 4px 0;
  letter-spacing: -0.3px;
}

.guide-subtitle {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary, #10b981);
  margin: 0 0 12px 0;
}

.guide-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary, #475569);
  margin-bottom: 14px;
  text-align: center;
}

.guide-highlights {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
  text-align: left;
}

.guide-chip {
  background: var(--bg-surface-elevated, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary, #1e293b);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease;
}

.guide-pro-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  padding: 9px 12px;
  text-align: left;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-primary, #1e293b);
}

.guide-tip-icon {
  font-size: 15px;
  flex-shrink: 0;
  line-height: 1.2;
}

.guide-tip-text {
  flex: 1;
}

.guide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.guide-dots-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
}

.guide-dot {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: var(--border-color, #cbd5e1);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.guide-dot.active {
  width: 20px;
  background: var(--primary, #10b981);
}

.guide-nav-btn {
  min-width: 88px;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
}

.guide-skip-row {
  text-align: center;
  margin-top: 10px;
}

.btn-link-subtle {
  background: none;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.btn-link-subtle:hover {
  color: var(--text-primary, #0f172a);
  text-decoration: underline;
}

/* Dark Mode Overrides */
[data-theme="dark"] .user-guide-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .guide-header,
[data-theme="dark"] .guide-footer {
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .guide-chip {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

[data-theme="dark"] .guide-pro-tip {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fef3c7;
}

[data-theme="dark"] .guide-dot {
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .guide-dot.active {
  background: var(--primary, #10b981);
}

[data-theme="dark"] .guide-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* ==========================================================================
   MODERN WEB GUIDANCE & UI/UX DESIGN SYSTEM UPGRADES
   ========================================================================== */

/* 1. View Transitions API Styling */
@supports (view-transition-name: test) {
  ::view-transition {
    pointer-events: none;
  }
  
  :root {
    view-transition-name: none;
  }

  ::view-transition-group(.plant-card) {
    animation-duration: 0.35s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }

  ::view-transition-old(.plant-card):only-child {
    animation: plantFadeOut 0.25s ease-out forwards;
  }

  ::view-transition-new(.plant-card):only-child {
    animation: plantFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }

  @keyframes plantFadeIn {
    from {
      opacity: 0;
      transform: translateY(12px) scale(0.96);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes plantFadeOut {
    from {
      opacity: 1;
      transform: scale(1);
    }
    to {
      opacity: 0;
      transform: scale(0.95);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
  .plant-card,
  .room-pill,
  .modal-content {
    transition: none !important;
    animation: none !important;
  }
}

/* 2. CSS Container Queries for Plant Grid & Individual Cards */
.plant-grid {
  container-type: inline-size;
  container-name: plantgrid;
}

@container plantgrid (max-width: 360px) {
  .plant-card .plant-specs-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .plant-card .card-img-wrapper {
    height: 190px;
  }
}

@container plantcard (max-width: 300px) {
  .plant-card .plant-specs-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    font-size: 11px;
  }
  .plant-card .card-img-wrapper {
    height: 180px;
  }
  .plant-card .card-body {
    padding: 14px 16px;
    gap: 8px;
  }
}

@container plantcard (min-width: 440px) {
  .plant-card .card-img-wrapper {
    height: 260px;
  }
  .plant-card .card-body {
    padding: 22px 24px;
    gap: 14px;
  }
  .plant-card .plant-name {
    font-size: 19px;
  }
}

/* Quick Water Ripple Effect on Action Button */
.btn-water-quick.watering-ripple {
  animation: waterButtonRipple 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes waterButtonRipple {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 0 14px rgba(14, 165, 233, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
  }
}

/* 3. Smart State Styling with CSS :has() */
.plant-card:has(.badge-quarantine) {
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.12);
  background-image: linear-gradient(180deg, rgba(239, 68, 68, 0.03) 0%, transparent 60%);
}

.plant-card:has(.badge-water-status.status-urgent),
.plant-card:has(.badge-water-status.urgent) {
  border-left: 4px solid var(--status-urgent);
  animation: urgentGlowPulse 3s infinite ease-in-out;
}

@keyframes urgentGlowPulse {
  0%, 100% {
    box-shadow: 0 2px 10px rgba(27, 67, 50, 0.04);
  }
  50% {
    box-shadow: 0 4px 18px rgba(239, 68, 68, 0.2);
  }
}

.plant-card:has(.badge-propagation) {
  border-top: 3px solid var(--accent-mint);
}

/* Smart Form Validation Feedback with :user-valid and :user-invalid */
input:user-invalid,
select:user-invalid,
textarea:user-invalid {
  border-color: var(--status-urgent) !important;
  background-color: rgba(239, 68, 68, 0.03);
}

input:user-valid:not(:placeholder-shown) {
  border-color: var(--accent-mint) !important;
}

/* 4. Glassmorphism 2.0 & Enhanced Sheen */
.app-header {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .app-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.room-pill {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.room-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(82, 183, 136, 0.2);
}

.room-pill.active {
  box-shadow: 0 4px 16px rgba(45, 106, 79, 0.3);
  transform: translateY(-1px);
}

/* 5. Shimmer Skeleton Loading Screens */
.skeleton-card {
  pointer-events: none;
  min-height: 380px;
}

.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
}

[data-theme="dark"] .skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
}

@keyframes skeletonShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-block {
  background: rgba(0, 0, 0, 0.07);
  border-radius: var(--radius-sm);
}

[data-theme="dark"] .skeleton-block {
  background: rgba(255, 255, 255, 0.06);
}

/* 6. Quick Action Water Spring & Celebration Splash */
.moisture-fill {
  transition: width 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.water-splash-feedback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  background: rgba(2, 132, 199, 0.95);
  color: white;
  padding: 10px 18px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.4);
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  animation: splashPop 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes splashPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
  75% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.9);
  }
}

/* ==========================================================================
   LEAFMATE GUEST LANDING PAGE & COMPLIANCE STYLING
   ========================================================================== */

.guest-landing-wrapper {
  margin-top: 8px;
  margin-bottom: 40px;
  animation: fadeInLanding 0.4s ease-out;
}

@keyframes fadeInLanding {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Landing Hero Card */
.landing-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 253, 244, 0.85) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl, 24px);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
}

[data-theme="dark"] .landing-hero-card {
  background: linear-gradient(135deg, rgba(20, 30, 25, 0.95) 0%, rgba(10, 24, 18, 0.85) 100%);
  border-color: rgba(52, 211, 153, 0.2);
}

.landing-hero-content {
  flex: 1.1;
  max-width: 620px;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--primary-light, #d1fae5);
  color: var(--primary, #0f3922);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

[data-theme="dark"] .landing-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.landing-hero-title {
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 800;
  line-height: 1.18;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.landing-hero-title .highlight-text {
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-hero-subtitle {
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 26px;
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.landing-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.landing-hero-trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.04);
  padding: 4px 10px;
  border-radius: 9999px;
}

[data-theme="dark"] .trust-pill {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

.landing-hero-visual {
  flex: 0.9;
  display: flex;
  justify-content: center;
  align-items: center;
}

.landing-hero-img {
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(5, 150, 105, 0.15);
  animation: heroFloat 6s ease-in-out infinite alternate;
}

@keyframes heroFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* Feature Showcase */
.landing-features-container {
  margin-bottom: 48px;
}

.landing-section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 36px auto;
}

.landing-section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.landing-section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.landing-feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 18px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.landing-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-accent);
}

.feature-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.feature-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.feature-icon-badge.doctor-badge { background: #fee2e2; }
.feature-icon-badge.climate-badge { background: #fef3c7; }
.feature-icon-badge.calendar-badge { background: #e0f2fe; }
.feature-icon-badge.household-badge { background: #dcfce7; }
.feature-icon-badge.encyclopedia-badge { background: #f3e8ff; }
.feature-icon-badge.privacy-badge { background: #ccfbf1; }

[data-theme="dark"] .feature-icon-badge.doctor-badge { background: rgba(239, 68, 68, 0.2); }
[data-theme="dark"] .feature-icon-badge.climate-badge { background: rgba(245, 158, 11, 0.2); }
[data-theme="dark"] .feature-icon-badge.calendar-badge { background: rgba(2, 132, 199, 0.2); }
[data-theme="dark"] .feature-icon-badge.household-badge { background: rgba(16, 185, 129, 0.2); }
[data-theme="dark"] .feature-icon-badge.encyclopedia-badge { background: rgba(168, 85, 247, 0.2); }
[data-theme="dark"] .feature-icon-badge.privacy-badge { background: rgba(20, 184, 166, 0.2); }

.feature-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
}

[data-theme="dark"] .feature-tag {
  background: rgba(255, 255, 255, 0.08);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex-grow: 1;
}

.feature-visual-preview {
  margin-top: auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.02);
}

.feature-preview-img {
  width: 100%;
  height: auto;
  display: block;
}

.feature-mini-mockup {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mockup-pill-task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--text-primary);
}

.badge-due {
  background: var(--status-urgent);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.mockup-qr-demo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-muted);
}

.mockup-ency-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ency-tag {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.mockup-privacy-points {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-mint);
  padding: 8px 10px;
  background: rgba(16, 185, 129, 0.08);
  border-radius: 8px;
  text-align: center;
}

/* Compliance Card */
.landing-compliance-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--primary-accent);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}

.compliance-inner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.compliance-badge {
  font-size: 32px;
  background: var(--primary-subtle);
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme="dark"] .compliance-badge {
  background: rgba(16, 185, 129, 0.15);
}

.compliance-content {
  flex: 1;
}

.compliance-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.compliance-desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

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

/* Landing Footer */
.landing-footer {
  border-top: 1px solid var(--border-color);
  padding: 32px 0 16px 0;
  text-align: center;
}

.landing-footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.landing-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.landing-footer-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.landing-footer-tagline {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.landing-footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.landing-footer-link {
  background: none;
  border: none;
  color: var(--primary-accent);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.landing-footer-link:hover {
  color: var(--primary);
}

.landing-footer-bottom {
  font-size: 12px;
  color: var(--text-muted);
}

/* Drawer Legal Footer Link */
.drawer-legal-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.drawer-legal-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 4px;
}

.drawer-legal-btn:hover {
  color: var(--primary-accent);
  background: rgba(0, 0, 0, 0.05);
}

.drawer-legal-separator {
  color: var(--border-color);
  font-size: 10px;
}

/* Legal Modal Styling */
.legal-modal-content {
  max-width: 820px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.legal-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-header-icon {
  font-size: 26px;
}

.legal-header-sub {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.legal-tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding: 0 20px;
  background: var(--bg-surface);
  overflow-x: auto;
}

.legal-tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.legal-tab-btn:hover {
  color: var(--text-primary);
}

.legal-tab-btn.active {
  color: var(--primary-accent);
  border-bottom-color: var(--primary-accent);
}

.legal-modal-body {
  padding: 24px;
  overflow-y: auto;
  line-height: 1.6;
  font-size: 14px;
  color: var(--text-secondary);
}

.legal-document h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.legal-document h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 20px 0 8px 0;
}

.legal-lead {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.legal-box {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}

[data-theme="dark"] .legal-box {
  background: rgba(255, 255, 255, 0.03);
}

.legal-box h4 {
  margin-top: 0;
}

.legal-highlight-banner {
  background: rgba(16, 185, 129, 0.1);
  border-left: 4px solid var(--accent-mint);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-primary);
}

.legal-faq-item {
  margin-bottom: 16px;
}

.legal-rights-list {
  padding-left: 20px;
  margin: 12px 0;
}

.legal-rights-list li {
  margin-bottom: 8px;
}


/* Mobile Responsiveness for Landing Page */
@media (max-width: 768px) {
  .landing-hero-card {
    flex-direction: column;
    padding: 24px 20px;
    gap: 24px;
  }

  .landing-hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .landing-hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .landing-features-grid {
    grid-template-columns: 1fr;
  }

  .compliance-inner {
    flex-direction: column;
  }

  .compliance-actions {
    flex-direction: column;
    width: 100%;
  }

  .compliance-actions .btn {
    width: 100%;
  }
}

/* ==============================================================================
   TESTSYSTEM / STAGING BANNER & BADGES
   ============================================================================== */
.staging-banner {
  background: linear-gradient(90deg, #92400e 0%, #b45309 35%, #d97706 70%, #92400e 100%);
  background-size: 200% 100%;
  animation: stagingShimmer 12s linear infinite;
  color: #ffffff;
  padding: 6px 16px;
  font-size: 0.85rem;
  box-shadow: 0 2px 10px rgba(180, 83, 9, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
}

@keyframes stagingShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.staging-banner-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.staging-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.staging-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.8);
  animation: stagingPulse 2s infinite;
  flex-shrink: 0;
}

@keyframes stagingPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.8); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.staging-badge {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: 0.6px;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.staging-text {
  font-size: 0.85rem;
  color: #fffbeb;
}

.staging-subtext {
  opacity: 0.9;
  font-size: 0.82rem;
}

.staging-banner-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.staging-tag {
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #fef3c7;
}

.staging-live-btn {
  background: #ffffff;
  color: #92400e !important;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, background-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.staging-live-btn:hover {
  background: #fef3c7;
  transform: translateY(-1px);
}

.staging-brand-badge {
  display: inline-block;
  background: #d97706;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .staging-banner {
    padding: 6px 10px;
  }
  .staging-banner-inner {
    justify-content: center;
    text-align: center;
  }
  .staging-subtext {
    display: none;
  }
  .staging-tag {
    display: none;
  }
  .staging-live-btn {
    font-size: 0.72rem;
    padding: 2px 8px;
  }
}


