/* Dewey v2 - Premium Plant Tracker CSS */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Work+Sans:wght@500;600&display=swap');

:root {
  /* Premium Dark Palette */
  --bg-dark: #050a05;
  --bg-gradient: radial-gradient(circle at 50% 0%, #1a2e1e 0%, #050a05 80%);

  --surface: #141414;
  --surface-border: rgba(255, 255, 255, 0.08);
  --surface-highlight: rgba(255, 255, 255, 0.03);

  /* Accent Colors - Green Theme */
  --primary: #388e3c;
  --primary-gradient: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  --primary-glow: rgba(46, 125, 50, 0.4);

  --secondary: #424242;
  --text: #c0c0c0;
  /* Softer white - Light Silver */
  --text-muted: #888888;

  --status-good: #66bb6a;
  --status-bad: #ef5350;

  --border-radius: 20px;
  --border-radius-card: 28px;
  --border-radius-btn: 18px;
  --safe-area-bottom: env(safe-area-inset-bottom);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at 50% 0%, #1a2e1e 0%, #050a05 80%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  padding-bottom: calc(90px + var(--safe-area-bottom));
  min-height: 100vh;
}

/* Header */
header {
  padding: 1.5rem 1.5rem 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #fff, #aaa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Container */
.container {
  padding: 0 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-header {
  font-family: 'Work Sans', sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--primary);
  margin-bottom: 1rem;
  opacity: 0.9;
  font-weight: 600;
}

/* Cards */
/* Premium Card */
.card {
  background: rgba(20, 20, 20, 0.6);
  border-radius: var(--border-radius-card);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.card.compact {
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Subtle gradient overlay on cards */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03) 0%, transparent 40%);
  pointer-events: none;
}

.plant-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.plant-card .species {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

/* Badges */
.status-badge {
  padding: 0.5rem 1rem;
  border-radius: 14px;
  /* Pill shape like reference */
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.status-due {
  background: #2a1515;
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.2);
}

.status-good {
  background: #152a1a;
  color: #69f0ae;
  border-color: rgba(105, 240, 174, 0.2);
}

/* Info Row */
/* Info Data */
.info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 0 0 1.5rem 0;
  /* Remove side padding inside card */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  /* Separator line */
  background: transparent;
}

.info-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.4rem;
}

.info-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

/* Primary Action Button - Hybrid Gradient/Glow */
/* Primary Action Button - Glass Green */
.water-btn {
  width: 100%;
  padding: 1.1rem;
  border-radius: var(--border-radius-btn);
  background: rgba(46, 125, 50, 0.25);
  border: 1px solid rgba(46, 125, 50, 0.4);
  color: #81c784;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}

.water-btn:active {
  background: rgba(46, 125, 50, 0.4);
  transform: scale(0.98);
}

/* Translucent Icon Buttons */
.red-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(239, 83, 80, 0.15);
  border: 1px solid rgba(239, 83, 80, 0.2);
  color: #ef5350;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s;
}

.red-icon-btn:active {
  background: rgba(239, 83, 80, 0.3);
  transform: scale(0.95);
}

.water-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(46, 125, 50, 0.25);
  border: 1px solid rgba(46, 125, 50, 0.4);
  color: #81c784;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s;
}

.water-icon-btn:active {
  background: rgba(46, 125, 50, 0.4);
  transform: scale(0.95);
}

/* Secondary Buttons */
.btn-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0;
}

.btn-small {
  flex: 1;
  padding: 1rem;
  border-radius: var(--border-radius-btn);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s;
  cursor: pointer;
}

.btn-small:hover,
.btn-small:active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-small.danger {
  background: rgba(239, 83, 80, 0.15);
  border: 1px solid rgba(239, 83, 80, 0.2);
  color: #ef5350;
}

.btn-small.danger:active {
  background: rgba(239, 83, 80, 0.25);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

input:not([type="checkbox"]),
select {
  width: 100%;
  padding: 1.2rem;
  background: rgba(26, 26, 26, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

input[type="checkbox"] {
  accent-color: var(--primary);
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
}

input:not([type="checkbox"]):focus,
select:focus {
  outline: none;
  background: rgba(26, 26, 26, 0.6);
  border-color: var(--primary);
}



/* Bottom Nav - Floating Pill Style */
/* Bottom Nav - Glass Pill */
.bottom-nav {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  min-width: 280px;
  background: rgba(20, 20, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  /* Specific thin stroke */
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: 100px;
  display: flex;
  justify-content: space-evenly;
  padding: 0.8rem 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  z-index: 1000;
}

.nav-item {
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: all 0.3s;
}

.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-icon {
  font-size: 1.4rem;
  margin: 0;
  display: block;
}

/* Hide text labels in bottom nav for cleaner "icon only" look like reference */
.nav-item span:not(.nav-icon) {
  display: none;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* FAB */
/* FAB */
/* FAB */
.fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: rgba(46, 125, 50, 0.25);
  border: 1px solid rgba(46, 125, 50, 0.4);
  border-radius: 50%;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  color: #81c784;
  font-size: 1.5rem;
  text-decoration: none;
  z-index: 1001;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  padding: 0;
  margin: 0;
  line-height: 1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.fab:hover {
  background: rgba(46, 125, 50, 0.35);
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.4);
}

.fab:active {
  background: rgba(46, 125, 50, 0.4);
  transform: scale(0.95);
}

.fab i {
  /* Force icon to behave */
  display: inline-block;
  vertical-align: middle;
  margin: 0;
  padding: 0;
  line-height: 1;
  font-size: inherit;
}

.fab:active {
  transform: scale(0.9);
}

/* Circular Icon Button for Back/Settings */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s;
}

.icon-btn:active {
  background: rgba(255, 255, 255, 0.2);
}

/* List Items for History */
.history-item {
  background: #fff;
  /* White cards from reference image */
  color: #000;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  border-left: 5px solid #2e7d32;
  /* Green accent */
}

/* Upcoming Card override for white theme in image? 
   User asked to "match the layout... dont look at the styling". 
   Wait, "dont look at the styling" means keep my current Dark/Red/Green styling? 
   OR match the layout OF the image (which is white). 
   "only the layout". 
   So I should keep my Dark Theme but use the Structure (List of cards).
   I will keep .card style but layout them as requested.
*/
/* history-item replaced by card compact */
/* .history-item { ... } */

.fade-in {
  animation: fadeInUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Custom Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-card);
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.modal-body {
  margin-bottom: 1.5rem;
  color: var(--text);
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: rgba(20, 20, 23, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--surface-border);
  color: var(--text);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-color: var(--status-good);
}

.toast.error {
  border-color: var(--status-bad);
}