/* styles.css */
/* Visual system and styling for Doudsfeed — baby feeding tracker */

/* --- Design Variables --- */
:root {
  --bg-color: #F8F5EE; /* Calm oatmeal cream */
  --bg-blobs: #FDFBF7;
  
  /* Substance Colors */
  --breast-milk: #FAD2C4; /* Soft warm pink-peach */
  --breast-milk-dark: #EFA691;
  --formula-milk: #D4EDDA; /* Soft mint green */
  --formula-milk-dark: #A5D2AC;
  --water: #D1ECF1; /* Soft water blue */
  --water-dark: #97CDD6;

  /* Neutrals */
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-bg-solid: #FFFFFF;
  --text-primary: #4A3E3D; /* Soft dark brown/charcoal */
  --text-secondary: #8E7D7A; /* Muted warm grey */
  --border-color: #ECE5DA; /* Oatmeal outline */
  --accent-peach: #F6A390;
  --accent-mint: #98D0B9;
  --accent-lavender: #C3BED8;
  
  /* Shadows & Radius */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 12px 36px rgba(135, 120, 110, 0.08);
  --shadow-card: 0 8px 24px rgba(135, 120, 110, 0.05);
  --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  
  /* Transitions */
  --transition-quick: all 0.15s ease;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- Base Rules --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Nunito', sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-color);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

a {
  color: var(--accent-peach);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* --- Ambient Background Animations --- */
.background-decor {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background-color: var(--bg-blobs);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  mix-blend-mode: multiply;
  animation: float 25s infinite alternate ease-in-out;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background-color: var(--breast-milk);
}

.blob-2 {
  bottom: -15%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  background-color: var(--formula-milk);
  animation-delay: -5s;
}

.blob-3 {
  top: 40%;
  right: 15%;
  width: 35vw;
  height: 35vw;
  background-color: var(--water);
  animation-delay: -10s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  33% {
    transform: translate(5%, 10%) scale(1.1) rotate(120deg);
  }
  66% {
    transform: translate(-5%, 5%) scale(0.9) rotate(240deg);
  }
  100% {
    transform: translate(0, 0) scale(1) rotate(360deg);
  }
}

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

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 1.5rem 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}
.divider:not(:empty)::before { margin-right: .75em; }
.divider:not(:empty)::after { margin-left: .75em; }

/* --- App Container --- */
.app-container {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 1rem;
}

/* --- Invitation Banner --- */
.invitation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg-solid);
  border: 2px solid var(--breast-milk);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  flex-wrap: wrap;
  gap: 1rem;
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.banner-icon {
  color: var(--accent-peach);
  animation: pulse 2s infinite;
}

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

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

/* --- Button Styling --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  transition: var(--transition-quick);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.btn-primary {
  background-color: var(--breast-milk);
  color: var(--text-primary);
  border: 1px solid var(--breast-milk-dark);
}
.btn-primary:hover {
  background-color: var(--breast-milk-dark);
  transform: translateY(-2px);
}
.btn-primary:active {
  transform: translateY(0) scale(0.97);
}

.btn-secondary {
  background-color: var(--card-bg-solid);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background-color: var(--bg-color);
  transform: translateY(-1px);
}
.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

.btn-google {
  background-color: var(--card-bg-solid);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.btn-google:hover {
  background-color: #fafafa;
  border-color: #d8d8d8;
  transform: translateY(-1px);
}
.google-icon {
  width: 18px;
  height: 18px;
}

.btn-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  box-shadow: none;
}
.btn-text:hover {
  color: var(--text-primary);
  background-color: rgba(0,0,0,0.03);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

.btn-link {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: underline;
}
.btn-link:hover {
  color: var(--text-primary);
}

/* --- Forms & Inputs --- */
.input-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
}

.field-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding-left: 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="datetime-local"],
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg-solid);
  outline: none;
  transition: var(--transition-quick);
}

input:focus, select:focus {
  border-color: var(--accent-peach);
  box-shadow: 0 0 0 3px rgba(246, 163, 144, 0.15);
}

/* --- 1. Auth Card Screen --- */
.auth-card {
  max-width: 420px;
  width: 100%;
  margin: 4rem auto;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 2.5rem 2rem;
  text-align: center;
  animation: scaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-logo {
  width: 90px;
  height: 90px;
  border-radius: 22px;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
  border: 3px solid white;
}

.logo-text {
  font-size: 2.25rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.login-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  text-align: left;
}

.mock-user-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.mock-user-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: var(--card-bg-solid);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  text-align: left;
  font-weight: 600;
  transition: var(--transition-quick);
}
.mock-user-btn:hover {
  border-color: var(--accent-peach);
  background-color: var(--bg-color);
  transform: translateX(3px);
}

.mock-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #FFF;
}

.mock-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.auth-footer {
  margin-top: 1.5rem;
}

/* --- 2. Main Dashboard Layout --- */
.main-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeIn 0.4s ease;
  width: 100%;
}

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

/* --- App Header --- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 150;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  border: 2px solid white;
}

.header-title {
  font-size: 1.5rem;
  line-height: 1.1;
}

.header-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Baby Selector Dropdown */
.baby-selector-wrapper {
  display: flex;
  align-items: center;
  background: var(--card-bg-solid);
  border: 1px solid var(--border-color);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  gap: 0.5rem;
}

.baby-icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.baby-select {
  border: none;
  background: transparent;
  padding: 0;
  font-weight: 700;
  width: auto;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  padding-right: 0.5rem;
}
.baby-select:focus {
  box-shadow: none;
}

/* Language Selector Dropdown */
.language-selector-wrapper {
  display: flex;
  align-items: center;
  background: var(--card-bg-solid);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  gap: 0.4rem;
}

.lang-icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.lang-select {
  border: none;
  background: transparent;
  padding: 0;
  font-weight: 700;
  width: auto;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  padding-right: 0.25rem;
}
.lang-select:focus {
  box-shadow: none;
}

/* User Profile Widget */
.user-widget {
  position: relative;
  cursor: pointer;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: var(--shadow-card);
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: 110%;
  background: var(--card-bg-solid);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius-md);
  padding: 1rem;
  min-width: 200px;
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 100;
}

.user-widget:hover .user-dropdown {
  display: flex;
}

.user-name {
  font-weight: 700;
  font-size: 0.95rem;
}
.user-email {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: -0.5rem;
}

.demo-switcher {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background-color: var(--bg-color);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

.switcher-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.switcher-select {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  background-color: var(--card-bg-solid);
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

/* --- Setup Empty Family / Baby Card --- */
.setup-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 3rem 2rem;
  text-align: center;
  max-width: 500px;
  margin: 2rem auto;
}

.setup-icon {
  width: 64px;
  height: 64px;
  color: var(--accent-peach);
  margin-bottom: 1.5rem;
}

.animate-bounce {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.setup-form {
  margin-top: 2rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.setup-form h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* --- Dashboard Grid --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 1.25rem;
  align-items: start;
}

/* Card layout wrapper */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.card-header-icon {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.card-header-icon h2 {
  font-size: 1.35rem;
}

.icon-peach {
  color: var(--accent-peach);
  width: 24px;
  height: 24px;
}

/* --- Tracking input panel --- */
.tracking-panel {
  background: var(--card-bg);
}

.feed-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.form-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.substance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.substance-grid input[type="radio"] {
  display: none;
}

.substance-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0.5rem;
  border-radius: var(--radius-md);
  background: var(--card-bg-solid);
  border: 2px solid transparent;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.substance-icon-wrapper {
  font-size: 1.75rem;
  margin-bottom: 0.4rem;
  transition: var(--transition-quick);
}

.substance-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Substance selected statuses */
#sub-breast:checked + .sub-breast {
  background-color: var(--breast-milk);
  border-color: var(--breast-milk-dark);
}
#sub-breast:checked + .sub-breast .substance-name {
  color: var(--text-primary);
}

#sub-formula:checked + .sub-formula {
  background-color: var(--formula-milk);
  border-color: var(--formula-milk-dark);
}
#sub-formula:checked + .sub-formula .substance-name {
  color: var(--text-primary);
}

#sub-water:checked + .sub-water {
  background-color: var(--water);
  border-color: var(--water-dark);
}
#sub-water:checked + .sub-water .substance-name {
  color: var(--text-primary);
}

.substance-card:hover:not(:checked) {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(135,120,110,0.12);
}

/* Quantity slider */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quantity-val {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent-peach);
}

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: #EAE3D9;
  outline: none;
  margin: 0.5rem 0;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-peach);
  border: 3px solid white;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: var(--transition-quick);
}
.slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.quick-qty-row {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.btn-qty {
  flex: 1;
  font-size: 0.75rem;
  font-weight: 700;
  background-color: var(--card-bg-solid);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0;
  border-radius: 6px;
  transition: var(--transition-quick);
}
.btn-qty:hover {
  background-color: var(--bg-color);
  border-color: var(--text-secondary);
}

/* Time Picker Input */
.time-input-wrapper {
  display: flex;
  gap: 0.5rem;
}

.time-select {
  flex: 1;
}

.log-btn {
  margin-top: 0.5rem;
}

/* --- Right Column & Tabs --- */
.right-column-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.4rem;
  border-radius: 50px;
  box-shadow: var(--shadow-card);
  align-self: flex-start;
}

.tab-btn {
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: var(--transition-quick);
}
.tab-btn.active {
  background: var(--card-bg-solid);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
}
.tab-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* Tab Panes */
.tab-pane {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
}

.tab-pane.active {
  display: flex;
}

/* --- Today Summary --- */
.summary-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.summary-main {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.summary-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 6px solid var(--breast-milk);
  background: var(--card-bg-solid);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
}
.summary-circle #today-total-qty {
  font-family: 'Quicksand', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
}
.summary-circle .unit {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 700;
  margin-top: 0.2rem;
}

.summary-stats {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.stat-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.stat-dot.breast { background-color: var(--breast-milk-dark); }
.stat-dot.formula { background-color: var(--formula-milk-dark); }
.stat-dot.water { background-color: var(--water-dark); }

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.stat-value {
  font-weight: 700;
  font-size: 0.9rem;
  margin-left: auto;
}

.last-feed-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--bg-color);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Feed History List */
.feed-history h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.feed-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* Custom Scrollbar for feeds list */
.feed-list-container::-webkit-scrollbar {
  width: 6px;
}
.feed-list-container::-webkit-scrollbar-track {
  background: transparent;
}
.feed-list-container::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}

.feed-item {
  display: flex;
  align-items: center;
  background: var(--card-bg-solid);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  transition: var(--transition-quick);
  animation: slideIn 0.3s ease;
}

.feed-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

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

.feed-item-icon {
  font-size: 1.5rem;
  margin-right: 0.75rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feed-item-icon.breast { background-color: var(--breast-milk); }
.feed-item-icon.formula { background-color: var(--formula-milk); }
.feed-item-icon.water { background-color: var(--water); }

.feed-item-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.feed-item-substance {
  font-weight: 700;
  font-size: 0.95rem;
}

.feed-item-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.feed-item-qty {
  margin-left: auto;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-right: 1rem;
}

.feed-item-delete {
  color: var(--text-secondary);
  opacity: 0.4;
  transition: var(--transition-quick);
  padding: 0.25rem;
  border-radius: 50%;
}
.feed-item-delete:hover {
  opacity: 1;
  color: #DC3545;
  background-color: rgba(220, 53, 69, 0.1);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
  color: var(--text-secondary);
  gap: 0.5rem;
  text-align: center;
}
.empty-state i {
  width: 40px;
  height: 40px;
  opacity: 0.6;
}

/* --- Reporting Section --- */
.reporting-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.reporting-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.period-selector {
  display: flex;
  background-color: var(--bg-color);
  padding: 0.25rem;
  border-radius: 50px;
  border: 1px solid var(--border-color);
}

.period-btn {
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: var(--transition-quick);
}
.period-btn.active {
  background-color: var(--card-bg-solid);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
}

.reporting-summary-bar {
  display: flex;
  gap: 1rem;
}

.summary-stat-box {
  flex: 1;
  background-color: var(--card-bg-solid);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.box-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.box-val {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.2rem;
}

.chart-container {
  position: relative;
  height: 280px;
  width: 100%;
  background-color: var(--card-bg-solid);
  border-radius: var(--radius-md);
  padding: 1rem;
  border: 1px solid var(--border-color);
}

/* --- Family Settings Section --- */
.settings-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.settings-card h3 {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

.settings-card h4 {
  font-size: 1rem;
  color: var(--text-primary);
}

.settings-helper-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: -0.5rem;
}

.members-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.member-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--card-bg-solid);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-color);
}

.member-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.member-name {
  font-weight: 700;
  font-size: 0.9rem;
}
.member-email {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.member-role {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 50px;
  background-color: var(--bg-color);
  color: var(--text-secondary);
}

.settings-form .input-row {
  display: flex;
  gap: 0.5rem;
}
.settings-form .input-row input {
  flex: 1;
}

.feedback-msg {
  font-size: 0.8rem;
  margin-top: 0.25rem;
  font-weight: 600;
}
.feedback-msg.success { color: var(--accent-mint); }
.feedback-msg.error { color: #DC3545; }

.babies-settings-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.baby-settings-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--card-bg-solid);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.baby-settings-item i {
  color: var(--accent-peach);
}

.baby-settings-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.baby-settings-name {
  font-weight: 700;
  font-size: 0.9rem;
}
.baby-settings-age {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Firebase box badge */
.firebase-setup-box {
  border: 2px dashed var(--border-color);
  background: rgba(255,255,255,0.4);
}

.status-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg-solid);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
.status-indicator span {
  font-size: 0.9rem;
  font-weight: 700;
}

.badge {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
}
.badge-demo {
  background-color: var(--accent-lavender);
  color: #4A465B;
}
.badge-firebase {
  background-color: #E2F0D9;
  color: #385723;
  border: 1px solid #C5E0B4;
}

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(74, 62, 61, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 1;
  transition: var(--transition-smooth);
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-card {
  max-width: 480px;
  width: 100%;
  background-color: var(--card-bg-solid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-color);
  overflow: hidden;
  animation: modalEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 1rem;
}

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

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 {
  font-size: 1.25rem;
}

.btn-close {
  font-size: 1.75rem;
  color: var(--text-secondary);
  line-height: 1;
}
.btn-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-help {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* --- Responsive Rules --- */
@media (max-width: 820px) {
  body {
    padding: 0.5rem;
  }
  
  .app-container {
    padding-top: 0;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .app-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  .header-actions {
    justify-content: space-between;
  }

  .tab-nav {
    width: 100%;
    justify-content: space-between;
  }
  
  .tab-btn {
    flex: 1;
    padding: 0.6rem 0.5rem;
    font-size: 0.9rem;
    text-align: center;
  }
  
  .summary-main {
    justify-content: center;
    text-align: center;
  }
  
  .summary-circle {
    margin: 0 auto;
  }
  
  .summary-stats {
    width: 100%;
  }
}

/* --- Breastfeeding Size Selector --- */
.breast-size-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.breast-size-grid input[type="radio"] {
  display: none;
}

.size-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-md);
  background-color: var(--card-bg-solid);
  border: 2px solid transparent;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}

.size-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.size-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

#size-short:checked + .size-card,
#size-medium:checked + .size-card,
#size-long:checked + .size-card {
  background-color: var(--breast-milk);
  border-color: var(--breast-milk-dark);
}

.size-card:hover:not(:checked) {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(135,120,110,0.1);
}

/* --- Profile Settings & Avatar Selector --- */
.profile-settings-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--card-bg-solid);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.profile-avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: var(--shadow-card);
  background-color: #FFF;
}

.profile-info-column {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.profile-name-text {
  font-size: 1.1rem;
  font-weight: 700;
}

.profile-email-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.avatar-selector-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.avatar-select-btn {
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid transparent;
  transition: var(--transition-quick);
  background-color: var(--card-bg-solid);
  box-shadow: var(--shadow-card);
}

.avatar-select-btn img {
  width: 100%;
  height: auto;
  display: block;
}

.avatar-select-btn:hover {
  transform: scale(1.15);
}

.avatar-select-btn.active {
  border-color: var(--accent-peach);
  transform: scale(1.1);
}

/* --- Updated Substance Selected Statuses --- */
#sub-pumped:checked + .sub-pumped {
  background-color: var(--breast-milk);
  border-color: var(--breast-milk-dark);
}
#sub-pumped:checked + .sub-pumped .substance-name {
  color: var(--text-primary);
}

#sub-direct:checked + .sub-direct {
  background-color: var(--breast-milk);
  border-color: var(--breast-milk-dark);
}
#sub-direct:checked + .sub-direct .substance-name {
  color: var(--text-primary);
}

@media (max-width: 600px) {
  .breast-size-grid {
    grid-template-columns: 1fr;
  }
  .avatar-selector-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
