/* ============================================
   PASTURED POULTRY PARTNERSHIP APP
   Clean · Professional · Modern
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  /* Brand Colors */
  --green-900: #0F1F0E;
  --green-800: #1A2F19;
  --green-700: #243F22;
  --green-600: #2E5028;
  --green-500: #3A6434;
  --green-400: #4D7F47;
  --green-300: #6B9E65;
  --green-200: #A8C8A3;
  --green-100: #E8F2E7;
  --green-50:  #F3F8F2;

  --white: #FFFFFF;
  --gray-50:  #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  --amber: #D97706;
  --amber-light: #FEF3C7;
  --red: #DC2626;
  --red-light: #FEE2E2;
  --blue: #2563EB;
  --blue-light: #EFF6FF;

  /* Semantic */
  --bg: var(--gray-50);
  --surface: var(--white);
  --surface-2: var(--gray-100);
  --border: var(--gray-200);
  --border-strong: var(--gray-300);
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-400);
  --accent: var(--green-500);
  --accent-dark: var(--green-700);
  --accent-light: var(--green-100);

  /* Layout */
  --nav-height: 64px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  max-width: 430px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---- TOP BAR ---- */
.top-bar {
  background: var(--green-800);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-bar-left .farm-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-300);
  margin-bottom: 1px;
}
.top-bar-left .farm-name {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--white);
  line-height: 1.2;
}
.top-bar-right { display: flex; gap: 8px; }
.icon-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  cursor: pointer;
  color: var(--white);
  font-size: 18px;
  padding: 6px;
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.icon-btn:hover { background: rgba(255,255,255,0.18); }

/* ---- DATE HEADER ---- */
.date-header { padding: 16px 20px 8px; }
.date-today {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.date-full {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  color: var(--text-primary);
}

/* ---- PAGES ---- */
.page { display: none; padding-bottom: calc(var(--nav-height) + 20px); }
.page.active { display: block; }
.page-inner { padding: 0 16px; }
.page-header {
  padding: 20px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-title {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  color: var(--text-primary);
}

/* ---- BOTTOM NAV ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--nav-height);
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
  z-index: 200;
  box-shadow: 0 -1px 0 var(--border), var(--shadow-md);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: none;
  border: none;
  color: var(--text-muted);
  min-width: 52px;
  transition: color 0.15s;
}
.nav-item.active { color: var(--accent); }
.nav-item .nav-icon { font-size: 20px; }
.nav-item .nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav-center {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green-600);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  color: var(--white);
  font-size: 26px;
  margin-top: -12px;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
  transition: background 0.15s;
}
.nav-center:hover { background: var(--green-500); }

/* ---- SECTION TITLE ---- */
.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 20px 16px 8px;
}

/* ---- CARDS ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 16px 10px;
  box-shadow: var(--shadow-sm);
}

/* ---- BATCH CARDS ---- */
.batch-card {
  background: var(--green-800);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin: 0 16px 12px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.batch-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(30px, -30px);
}
.batch-card-breed {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--white);
  margin-bottom: 2px;
}
.batch-card-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 14px;
}
.batch-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.batch-stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-300);
  margin-bottom: 2px;
}
.batch-stat-value {
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
}
.batch-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.batch-phase-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 20px;
}
.batch-phase-badge.brooder { background: rgba(217,119,6,0.3); color: #FCD34D; }
.batch-phase-badge.pasture { background: rgba(74,159,71,0.3); color: #86EFAC; }
.batch-phase-badge.fasting { background: rgba(220,38,38,0.25); color: #FCA5A5; }
.batch-phase-badge.processed { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); }

/* ---- CHORES ---- */
.chore-section { padding: 0 16px; margin-bottom: 4px; }
.chore-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 6px;
}
.chore-section-icon { font-size: 16px; }
.chore-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.chore-section-meta { font-size: 12px; color: var(--text-muted); }

.chore-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  box-shadow: var(--shadow-sm);
}
.chore-item:active { background: var(--gray-50); }
.chore-item.done {
  background: var(--green-50);
  border-color: var(--green-200);
}
.chore-item.done .chore-name {
  text-decoration: line-through;
  color: var(--text-muted);
}

.chore-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-top: 1px;
  transition: all 0.15s;
}
.chore-item.done .chore-check {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.chore-body { flex: 1; }
.chore-name { font-size: 14px; font-weight: 500; color: var(--text-primary); margin-bottom: 2px; }
.chore-detail { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.chore-feed-amount { font-size: 13px; font-weight: 600; color: var(--amber); margin-top: 3px; }
.chore-photo-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  padding: 2px;
  flex-shrink: 0;
}
.chore-photo-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.chore-btn-weighin {
  margin-top: 8px;
  background: var(--accent-light);
  color: var(--accent-dark);
  border: 1px solid var(--green-200);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* ---- ALL DONE BANNER ---- */
.all-done-banner {
  margin: 0 16px 14px;
  background: var(--green-50);
  border: 1px solid var(--green-200);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.all-done-icon { font-size: 24px; margin-bottom: 6px; }
.all-done-text { font-size: 15px; font-weight: 600; color: var(--accent-dark); }
.all-done-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 36px; margin-bottom: 12px; }
.empty-state-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.empty-state-text { font-size: 14px; line-height: 1.6; }

/* ---- BUTTONS ---- */
.btn-primary {
  width: 100%;
  background: var(--green-600);
  color: var(--white);
  border: none;
  padding: 13px 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s;
  margin-top: 8px;
}
.btn-primary:hover { background: var(--green-500); }
.btn-primary:active { background: var(--green-700); }

.btn-cancel {
  width: 100%;
  background: none;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
}
.btn-cancel:hover { background: var(--gray-50); }

.btn-icon {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.btn-icon:hover { background: var(--gray-50); border-color: var(--border-strong); }

/* ---- FILTER BUTTONS ---- */
.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.15s;
}
.filter-btn.active {
  background: var(--green-600);
  border-color: var(--green-600);
  color: var(--white);
}

/* ---- MODALS ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }

.modal-sheet {
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 430px;
  padding: 12px 20px 32px;
  max-height: 92vh;
  overflow-y: auto;
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.modal-title {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--text-primary);
  margin-bottom: 20px;
}

/* ---- FORMS ---- */
.form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
}
.form-input:focus { border-color: var(--accent); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }
.form-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 18px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ---- STATS / SUMMARY ROWS ---- */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.stat-row:last-child { border-bottom: none; }
.stat-row-label { color: var(--text-secondary); }
.stat-row-value { font-weight: 600; color: var(--text-primary); }
.stat-row-value.positive { color: var(--accent); }
.stat-row-value.warning { color: var(--amber); }
.stat-row-value.danger { color: var(--red); }

/* ---- PAYMENT BUTTONS ---- */
.payment-btn {
  flex: 1;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
  text-align: center;
}
.payment-btn.paid {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* ---- RESERVATION CARDS ---- */
.res-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.res-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.res-card-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }

/* ---- SETTINGS ---- */
.settings-section { margin-bottom: 24px; }
.settings-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 16px;
  margin-bottom: 6px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.settings-row:last-child { border-bottom: 1px solid var(--border); }
.settings-row:hover { background: var(--gray-50); }
.settings-row-label { font-size: 15px; color: var(--text-primary); }
.settings-row-value { font-size: 14px; color: var(--text-muted); }

/* ---- TAGS / BADGES ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.badge-green { background: var(--green-100); color: var(--green-700); }
.badge-amber { background: var(--amber-light); color: var(--amber); }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-blue { background: var(--blue-light); color: var(--blue); }

/* ---- CALENDAR ---- */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 0 16px;
}
.cal-day-header {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 0;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
}
.cal-day.today {
  background: var(--green-600);
  color: var(--white);
  font-weight: 700;
}
.cal-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.cal-day.today::after { background: var(--white); }
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}
.cal-nav-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-month {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--text-primary);
}

/* ---- LOADING ---- */
.loading {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---- ERROR ---- */
.error {
  text-align: center;
  padding: 32px;
  color: var(--red);
  font-size: 14px;
}

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  max-width: 320px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; }

/* ---- DASHBOARD CARDS ---- */
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 16px 10px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
}
.dash-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.dash-card-label { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.dash-card-value { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.dash-card-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

/* ---- FEED CARD ---- */
.feed-card {
  background: var(--green-800);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.feed-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-300);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.feed-amount {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--white);
  line-height: 1;
}
.feed-sub { font-size: 12px; color: var(--green-300); margin-top: 2px; }
.feed-update-btn {
  background: rgba(255,255,255,0.12);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--white);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.feed-update-btn:hover { background: rgba(255,255,255,0.2); }

/* ---- UPCOMING BATCH PILL ---- */
.upcoming-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}
.upcoming-pill-info {}
.upcoming-pill-breed {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.upcoming-pill-date { font-size: 12px; color: var(--text-muted); }
.upcoming-pill-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--amber);
  background: var(--amber-light);
  padding: 4px 10px;
  border-radius: 20px;
}
.upcoming-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  padding: 4px;
}

/* ---- FINANCIAL ---- */
.fin-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 10px;
}
.fin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.fin-card-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.fin-card-value { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.fin-card-value.green { color: var(--accent); }
.fin-card-value.red { color: var(--red); }

/* ---- RES PAGE (reservation.html) ---- */
.res-header { background: var(--green-800); padding: 28px 24px 24px; text-align: center; }
.res-header-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green-300); margin-bottom: 6px; }
.res-header-name { font-family: 'DM Serif Display', serif; font-size: 26px; color: var(--white); margin-bottom: 4px; }
.res-header-sub { font-size: 13px; color: rgba(255,255,255,0.55); }
.res-tabs { display: flex; background: var(--gray-100); border-bottom: 1px solid var(--border); }
.res-tab { flex: 1; padding: 12px 8px; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; border: none; background: none; color: var(--text-muted); font-family: inherit; border-bottom: 2px solid transparent; transition: all 0.15s; }
.res-tab.active { color: var(--accent); border-bottom-color: var(--accent); background: var(--white); }
.res-content { padding: 20px 20px 40px; max-width: 560px; margin: 0 auto; }

/* ---- HOME DASHBOARD ---- */
.home-greeting {
  padding: 20px 16px 4px;
}
.home-greeting-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.home-farm-name {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--text-primary);
}
.home-date {
  font-size: 13px;
  color: var(--text-muted);
  padding: 0 16px 16px;
}

/* Chores summary card */
.home-chores-card {
  margin: 0 16px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s;
}
.home-chores-card:hover { background: var(--gray-50); }
.home-chores-left { display: flex; align-items: center; gap: 12px; }
.home-chores-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.home-chores-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1px;
}
.home-chores-sub { font-size: 12px; color: var(--text-muted); }
.home-chores-arrow { color: var(--text-muted); font-size: 16px; }

/* Enterprise section label */
.enterprise-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 16px 10px;
}

/* Enterprise cards */
.enterprise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 10px;
}

.enterprise-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.enterprise-card:hover { border-color: var(--green-300); box-shadow: var(--shadow); }
.enterprise-card.coming-soon { opacity: 0.5; cursor: default; }
.enterprise-card.coming-soon:hover { border-color: var(--border); box-shadow: var(--shadow-sm); }

.enterprise-card-icon { font-size: 24px; margin-bottom: 2px; }
.enterprise-card-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.enterprise-card-status { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.enterprise-card-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}
.enterprise-card-badge.green { color: var(--accent); }

/* Financials card - full width */
.enterprise-card-full {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 14px;
}
.enterprise-card-full .enterprise-card-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

/* ---- CALENDAR FIX ---- */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 0 16px;
}
.cal-day-header {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 0;
}
.cal-event-label {
  font-size: 9px;
  text-align: center;
  color: var(--accent);
  line-height: 1;
  margin-top: 1px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---- FINANCIALS PAGE ---- */
.fin-tabs {
  display: flex;
  gap: 8px;
  padding: 0 16px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.fin-tab {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 7px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.15s;
}
.fin-tab.active {
  background: var(--green-700);
  border-color: var(--green-700);
  color: var(--white);
}
.fin-period-select {
  margin: 0 16px 16px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface);
  width: calc(100% - 32px);
  outline: none;
  appearance: none;
}
.fin-profit-card {
  margin: 0 16px 16px;
  background: var(--green-800);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.fin-profit-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-300);
  margin-bottom: 8px;
}
.fin-profit-amount {
  font-family: 'DM Serif Display', serif;
  font-size: 42px;
  color: var(--white);
  line-height: 1;
}
.fin-profit-amount.negative { color: #FCA5A5; }
.fin-income-expense {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 12px;
}
.fin-ie-item { text-align: center; }
.fin-ie-label { font-size: 10px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.1em; }
.fin-ie-value { font-size: 16px; font-weight: 600; color: var(--white); }

.fin-category {
  margin: 0 16px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.fin-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  background: var(--gray-50);
}
.fin-category-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.fin-category-total {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.fin-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.fin-entry-desc { color: var(--text-secondary); flex: 1; }
.fin-entry-date { font-size: 11px; color: var(--text-muted); margin-right: 12px; }
.fin-entry-amount { font-weight: 600; color: var(--text-primary); }
.fin-entry-amount.expense { color: var(--red); }
.fin-entry-amount.income { color: var(--accent); }

/* ---- ADD ENTRY BTN ---- */
.add-entry-btn {
  margin: 0 16px 10px;
  width: calc(100% - 32px);
  background: none;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.add-entry-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---- CALENDAR PAGE FIX ---- */
.cal-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 8px;
}
.cal-month-label {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--text-primary);
}
.cal-weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 16px;
  margin-bottom: 4px;
}
.cal-weekday-row div {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 0;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 0 16px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 4px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  min-height: 40px;
}
.cal-day.today {
  background: var(--green-600);
  color: var(--white);
  font-weight: 700;
  border-radius: var(--radius-sm);
}
.cal-day.selected {
  background: var(--accent-light);
  color: var(--accent-dark);
  font-weight: 600;
}
.cal-day.other-month { color: var(--text-muted); opacity: 0.4; }
.cal-day-event {
  font-size: 8px;
  background: var(--accent);
  color: white;
  border-radius: 2px;
  padding: 1px 3px;
  margin-top: 1px;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 90%;
  text-align: center;
}
.cal-day.today .cal-day-event { background: rgba(255,255,255,0.3); }
.cal-day-more { font-size: 8px; color: var(--text-muted); margin-top: 1px; }
