/* ═══════════════════════════════════════════════
   Canadian Farm Copilot — Global Design System
   ═══════════════════════════════════════════════ */

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

:root {
  --forest:      #1B3528;
  --forest-lite: #2d5a3d;
  --forest-mid:  #244839;
  --sage:        #4a7a5a;
  --sage-lt:     #7aab8a;
  --sage-pale:   #c6dece;
  --wheat:       #F4ECDA;
  --wheat-dk:    #E8DCCA;
  --cream:       #FAFAF3;
  --cream-dk:    #f2f0e8;
  --amber:       #B8720E;
  --amber-lt:    #D4920A;
  --amber-pale:  #FEF3E2;
  --text:        #1a2820;
  --muted:       #6b7c72;
  --faint:       #a0afa6;
  --border:      rgba(0,0,0,0.07);
  --border-md:   rgba(0,0,0,0.13);
  --border-dk:   rgba(0,0,0,0.18);
  --red:         #c0392b;
  --red-lt:      #e74c3c;
  --red-pale:    #fdf0ef;
  --orange:      #e67e22;
  --orange-pale: #fef4e8;
  --green:       #27ae60;
  --green-pale:  #eaf6ef;
  --blue:        #2980b9;
  --blue-pale:   #eaf2fb;
  --r-xs:        4px;
  --r-sm:        6px;
  --r:           10px;
  --r-lg:        14px;
  --r-xl:        20px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.06);
  --shadow:      0 4px 16px rgba(0,0,0,0.09);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.14);
  --shadow-xl:   0 16px 48px rgba(0,0,0,0.18);
  --sidebar-w:   220px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html,
body {
  min-height: 100%;
  height: 100%;
  font-family: 'Sora', sans-serif;
  background: #1B3528;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
}

img,
canvas,
svg {
  display: block;
  max-width: 100%;
}

.page-surface {
  background: var(--cream);
  min-height: 100vh;
}

.chart-wrap {
  position: relative;
  width: 100%;
}

.chart-wrap-lg {
  height: 320px;
}

.chart-wrap-sm {
  height: 260px;
}

.chart-wrap-xs {
  height: 220px;
}

.live-weather-loading {
  opacity: 0.7;
  pointer-events: none;
}

.live-weather-error {
  color: var(--red);
}

@media (max-width: 1024px) {
  .chart-wrap-lg,
  .chart-wrap-sm,
  .chart-wrap-xs {
    height: 240px;
  }
}

@media (max-width: 768px) {
  .chart-wrap-lg,
  .chart-wrap-sm,
  .chart-wrap-xs {
    height: 220px;
  }
}
}
}

/* ── Layout ── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--forest);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sidebar-logo-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--amber-lt);
  display: flex;
  align-items: center;
  gap: 7px;
}
.sidebar-logo-dot {
  width: 6px; height: 6px;
  background: var(--amber-lt);
  border-radius: 50%;
  animation: pulse 2.4s ease-in-out infinite;
}
.sidebar-logo-sub {
  font-size: 11.5px;
  color: rgba(244,236,218,0.38);
  margin-top: 5px;
  line-height: 1.4;
}

.sidebar-section {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sidebar-section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(244,236,218,0.22);
  padding: 8px 18px 5px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  font-size: 13px;
  color: rgba(244,236,218,0.62);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.13s;
  cursor: pointer;
}
.sidebar-link:hover {
  color: var(--wheat);
  background: rgba(255,255,255,0.05);
}
.sidebar-link.active {
  color: var(--wheat);
  background: rgba(255,255,255,0.08);
  border-left-color: var(--amber-lt);
}
.sidebar-link-icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.sidebar-badge {
  margin-left: auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 10px;
  letter-spacing: 0.3px;
}
.sidebar-badge.red   { background: rgba(192,57,43,0.35); color: #f08070; }
.sidebar-badge.amber { background: rgba(184,114,14,0.3);  color: var(--amber-lt); }
.sidebar-badge.sage  { background: rgba(74,122,90,0.3);   color: var(--sage-lt); }

.sidebar-foot {
  margin-top: auto;
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  color: rgba(244,236,218,0.18);
  letter-spacing: 0.5px;
  line-height: 1.6;
}

/* ── Main content ── */
.main-content {
  margin-left: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-header {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 18px 30px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.page-title {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--forest);
  letter-spacing: -0.4px;
  line-height: 1.1;
}
.page-subtitle {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.2px;
}

.page-body {
  padding: 24px 30px;
  flex: 1;
}

.demo-banner {
  background: linear-gradient(90deg, #7c5a00, #b87e14);
  color: #FFF8E7;
  padding: 10px 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.demo-exit-btn {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  font-family: 'Sora', sans-serif;
}

/* ── Cards ── */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 15px;
  color: var(--forest);
  letter-spacing: -0.2px;
}
.card-body { padding: 16px 20px; }
.card-footer {
  padding: 11px 20px;
  border-top: 1px solid var(--border);
  background: var(--cream);
  font-size: 12px;
  color: var(--faint);
}

/* ── Stat cards ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.stat-value {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--forest);
  letter-spacing: -0.8px;
  line-height: 1;
  margin-bottom: 5px;
}
.stat-change {
  font-size: 11.5px;
  color: var(--green);
  font-family: 'IBM Plex Mono', monospace;
}
.stat-change.neg     { color: var(--red); }
.stat-change.neutral { color: var(--muted); }

/* ── Alerts ── */
.alert {
  border-radius: var(--r);
  padding: 12px 15px;
  margin-bottom: 10px;
  border-left: 3px solid;
}
.alert:last-child { margin-bottom: 0; }
.alert-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.alert-desc  { font-size: 12.5px; line-height: 1.55; opacity: 0.85; }
.alert-urgent { background: #fff5f5; border-color: var(--red);    color: #8b1a1a; }
.alert-warn   { background: var(--amber-pale); border-color: var(--amber); color: #6b3c0a; }
.alert-info   { background: var(--blue-pale); border-color: var(--blue);   color: #1a3a5c; }
.alert-green  { background: var(--green-pale); border-color: var(--green);  color: #1a5a30; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.badge-red    { background: rgba(192,57,43,0.1);  color: var(--red); }
.badge-amber  { background: rgba(184,114,14,0.12); color: var(--amber); }
.badge-sage   { background: rgba(74,122,90,0.12);  color: var(--sage); }
.badge-blue   { background: rgba(41,128,185,0.1);  color: var(--blue); }
.badge-green  { background: rgba(39,174,96,0.12);  color: var(--green); }
.badge-orange { background: rgba(230,126,34,0.12); color: var(--orange); }
.badge-grey   { background: rgba(0,0,0,0.06);       color: var(--muted); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.14s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary   { background: var(--forest); color: var(--wheat); }
.btn-primary:hover { background: var(--forest-lite); }
.btn-secondary { background: var(--wheat-dk); color: var(--forest); border: 1px solid var(--border-md); }
.btn-secondary:hover { background: var(--wheat); }
.btn-amber     { background: var(--amber); color: white; }
.btn-amber:hover { background: var(--amber-lt); }
.btn-ghost     { background: transparent; color: var(--muted); border: 1px solid var(--border-md); }
.btn-ghost:hover { background: var(--cream-dk); color: var(--text); }
.btn-danger    { background: var(--red); color: white; }
.btn-sm  { padding: 6px 13px; font-size: 12px; }
.btn-lg  { padding: 12px 24px; font-size: 14px; }
.btn:disabled { opacity: 0.45; cursor: default; }

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.mb-24  { margin-bottom: 24px; }
.mb-16  { margin-bottom: 16px; }
.mb-8   { margin-bottom: 8px; }

/* ── Progress / Onboarding ── */
.ob-progress {
  display: flex; gap: 8px; margin-bottom: 24px;
}
.ob-pip {
  height: 4px; flex: 1;
  background: var(--border-md);
  border-radius: 2px;
  transition: background 0.2s;
}
.ob-pip.active { background: var(--forest); }
.ob-pip.done   { background: var(--sage); }

.ob-option {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-md);
  border-radius: var(--r-sm);
  background: white;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: all 0.13s;
  margin-bottom: 7px;
  color: var(--text);
}
.ob-option:hover   { border-color: var(--sage); background: var(--cream); }
.ob-option.selected { border-color: var(--forest); background: rgba(27,53,40,0.06); color: var(--forest); font-weight: 600; }

.ob-grid   { display: flex; flex-direction: column; }
.ob-grid-1 { display: flex; flex-direction: column; }

.ob-back {
  background: none; border: none;
  color: var(--muted); font-size: 13px;
  cursor: pointer; font-family: 'Sora', sans-serif;
}
.ob-back:hover { color: var(--text); }

/* ── Form elements ── */
.form-group  { margin-bottom: 16px; }
.form-label  { display: block; font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 6px; letter-spacing: 0.2px; }
.form-select, .form-input {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border-md);
  border-radius: var(--r-sm);
  font-family: 'Sora', sans-serif;
  font-size: 13.5px;
  color: var(--text);
  background: white;
  appearance: none;
  transition: border-color 0.13s;
}
.form-select:focus, .form-input:focus {
  outline: none;
  border-color: var(--forest);
}

/* ── Dashboard weather widget ── */
.dash-weather {
  background: linear-gradient(145deg, var(--forest) 0%, var(--forest-lite) 100%);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  transition: transform 0.14s;
  box-shadow: var(--shadow);
}
.dash-weather:hover { transform: translateY(-2px); }
.dw-icon  { font-size: 40px; }
.dw-text  { flex: 1; }
.dw-title { font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(244,236,218,0.4); margin-bottom: 5px; }
.dw-temp  { font-family: 'DM Serif Display', serif; font-size: 28px; color: var(--wheat); letter-spacing: -0.5px; line-height: 1; }
.dw-cond  { font-size: 13px; color: rgba(244,236,218,0.75); margin-top: 4px; }
.dw-crops { font-size: 11.5px; color: rgba(244,236,218,0.5); margin-top: 5px; }

/* ── Funding program cards ── */
.program-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 14px;
  border-left: 4px solid var(--border-md);
  transition: box-shadow 0.14s;
}
.program-card:hover { box-shadow: var(--shadow); }
.program-card.match-high { border-left-color: var(--green); }
.program-card.match-med  { border-left-color: var(--amber); }
.program-card.match-low  { border-left-color: var(--faint); }
.program-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.program-name { font-family: 'DM Serif Display', serif; font-size: 16px; color: var(--forest); }
.program-desc { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 12px; }
.program-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; font-size: 12.5px; }
.program-meta-item { display: flex; align-items: center; gap: 4px; color: var(--text); }
.program-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.program-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.match-score { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 10px; white-space: nowrap; }
.match-score.high { background: rgba(39,174,96,0.12);  color: var(--green); }
.match-score.med  { background: rgba(184,114,14,0.12); color: var(--amber); }
.match-score.low  { background: rgba(0,0,0,0.06);       color: var(--muted); }
.save-btn { padding: 6px 12px; border: 1.5px solid var(--border-md); border-radius: var(--r-sm); background: white; font-size: 12px; cursor: pointer; font-family: 'Sora', sans-serif; transition: all 0.13s; }
.save-btn.saved { background: var(--amber-pale); border-color: var(--amber); color: var(--amber); }

/* ── Checklist ── */
.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.check-item:hover { background: var(--cream); }
.check-item:last-child { border-bottom: none; }
.check-box {
  width: 17px; height: 17px;
  border: 1.5px solid var(--border-md);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: white;
  flex-shrink: 0;
  transition: all 0.12s;
}
.check-box.checked { background: var(--sage); border-color: var(--sage); }
.check-text { font-size: 12.5px; color: var(--text); line-height: 1.4; }
.check-text.done { text-decoration: line-through; color: var(--faint); }

/* ── Action rows ── */
.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.action-row:last-child { border-bottom: none; }
.priority-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  padding: 3px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  font-weight: 500;
}
.pri-high   { background: rgba(192,57,43,0.1);  color: var(--red); }
.pri-medium { background: rgba(184,114,14,0.12); color: var(--amber); }
.pri-low    { background: rgba(0,0,0,0.06);       color: var(--muted); }
.action-go  {
  margin-left: auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--sage);
  text-decoration: none;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.action-go:hover { color: var(--forest); }

/* ── Mini program list ── */
.program-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.program-mini:last-child { border-bottom: none; }
.program-mini-name { font-size: 13px; color: var(--text); margin-bottom: 3px; }
.program-mini-meta { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--faint); }
.micro-link { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: var(--sage); text-decoration: none; letter-spacing: 0.3px; }
.micro-link:hover { color: var(--forest); }

/* ── Filters ── */
.funding-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-search {
  flex: 1;
  min-width: 200px;
  padding: 9px 13px;
  border: 1.5px solid var(--border-md);
  border-radius: var(--r-sm);
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  background: white;
}
.filter-search:focus { outline: none; border-color: var(--forest); }
.filter-select {
  padding: 9px 13px;
  border: 1.5px solid var(--border-md);
  border-radius: var(--r-sm);
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  background: white;
  color: var(--text);
  cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--forest); }

/* ── Chat / Copilot ── */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.chat-welcome {
  text-align: center;
  max-width: 540px;
  margin: auto;
  padding: 40px 20px;
}
.chat-welcome-icon { font-size: 40px; margin-bottom: 14px; }
.chat-welcome h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  color: var(--forest);
  margin-bottom: 10px;
}
.chat-welcome p { font-size: 14px; color: var(--muted); line-height: 1.65; margin-bottom: 20px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.suggestion-chip {
  padding: 7px 14px;
  border: 1.5px solid var(--border-md);
  border-radius: 18px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--text);
  background: white;
  transition: all 0.13s;
}
.suggestion-chip:hover { background: var(--forest); color: var(--wheat); border-color: var(--forest); }

.msg-row { display: flex; gap: 11px; margin-bottom: 16px; }
.msg-row.user { flex-direction: row-reverse; }
.msg-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 2px;
}
.msg-avatar.ai   { background: var(--forest); color: var(--wheat); font-family: 'IBM Plex Mono', monospace; font-size: 9px; }
.msg-avatar.user { background: var(--wheat-dk); font-size: 14px; }
.msg-bubble {
  max-width: 72%;
  padding: 11px 15px;
  border-radius: var(--r-lg);
  font-size: 13.5px;
  line-height: 1.6;
}
.msg-bubble.ai   { background: white; border: 1px solid var(--border); color: var(--text); border-radius: 4px var(--r-lg) var(--r-lg) var(--r-lg); }
.msg-bubble.user { background: var(--forest); color: var(--wheat); border-radius: var(--r-lg) 4px var(--r-lg) var(--r-lg); }

.chat-input-bar { padding: 16px 20px; border-top: 1px solid var(--border); background: white; }
.chat-input-row { display: flex; gap: 10px; align-items: flex-end; }
.chat-textarea {
  flex: 1;
  border: 1.5px solid var(--border-md);
  border-radius: var(--r);
  padding: 10px 14px;
  font-family: 'Sora', sans-serif;
  font-size: 13.5px;
  resize: none;
  min-height: 42px;
  max-height: 120px;
  line-height: 1.5;
}
.chat-textarea:focus { outline: none; border-color: var(--forest); }
.chat-send {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--forest);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.14s;
}
.chat-send:hover  { background: var(--forest-lite); }
.chat-send:disabled { opacity: 0.4; cursor: default; }
.chat-input-hint { font-size: 11px; color: var(--faint); margin-top: 7px; font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.3px; }

.typing-dots { display: flex; gap: 4px; align-items: center; padding: 4px 0; }
.dot {
  width: 7px; height: 7px;
  background: var(--faint);
  border-radius: 50%;
  animation: bounce 1.2s ease-in-out infinite;
}
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,80%,100% { transform: scale(0.7); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } }

/* ── Profile completion ── */
.profile-complete-card {
  background: linear-gradient(135deg, #f0f6f2, #e8f3ec);
  border: 1.5px solid rgba(74,122,90,0.2);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  margin-bottom: 18px;
}
.pc-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.pc-title { font-weight: 600; font-size: 13.5px; color: var(--forest); }
.pc-score { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--sage); font-weight: 600; }
.pc-bar-wrap { height: 5px; background: rgba(74,122,90,0.15); border-radius: 3px; margin-bottom: 12px; }
.pc-bar-fill { height: 100%; background: var(--sage); border-radius: 3px; transition: width 0.6s ease; }
.pc-items { display: flex; gap: 14px; flex-wrap: wrap; }
.pc-item { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.pc-item.done { color: var(--sage); }
.pc-check { font-size: 11px; font-weight: 700; }

/* ── Notifications ── */
.notif-bell {
  position: relative;
  cursor: pointer;
  font-size: 20px;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.12s;
}
.notif-bell:hover { background: var(--cream-dk); }
.notif-dot {
  position: absolute;
  top: 2px; right: 2px;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid white;
}
.notif-dropdown {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  width: 300px;
  background: white;
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
}
.notif-dropdown.open { display: block; }
.notif-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 13px;
}
.notif-item {
  display: block;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.1s;
}
.notif-item:hover { background: var(--cream); }
.notif-item-title { font-size: 13px; color: var(--text); margin-bottom: 2px; }
.notif-item-sub   { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--faint); }

/* ── Feedback ── */
.feedback-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--forest);
  color: var(--wheat);
  border: none;
  padding: 10px 18px;
  border-radius: 22px;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  transition: transform 0.14s;
}
.feedback-fab:hover { transform: translateY(-2px); }
.feedback-modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 400;
  backdrop-filter: blur(3px);
}
.feedback-modal {
  background: white;
  border-radius: var(--r-xl);
  padding: 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-xl);
}
.feedback-modal h3 { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--forest); margin-bottom: 8px; }
.feedback-modal p  { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.feedback-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--muted); }
.feedback-stars { display: flex; gap: 8px; margin-bottom: 16px; font-size: 24px; cursor: pointer; }
.feedback-star  { transition: transform 0.12s; }
.feedback-star:hover, .feedback-star.active { transform: scale(1.2); }
.feedback-ta {
  width: 100%;
  height: 90px;
  padding: 10px 13px;
  border: 1.5px solid var(--border-md);
  border-radius: var(--r);
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  resize: none;
  margin-bottom: 14px;
}
.feedback-submit {
  width: 100%;
  padding: 11px;
  background: var(--forest);
  color: var(--wheat);
  border: none;
  border-radius: var(--r-sm);
  font-family: 'Sora', sans-serif;
  font-size: 13.5px;
  cursor: pointer;
  font-weight: 500;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.anim-fade-up { animation: fadeUp 0.35s ease both; }
.anim-delay-1 { animation-delay: 0.07s; }
.anim-delay-2 { animation-delay: 0.14s; }
.anim-delay-3 { animation-delay: 0.21s; }
.anim-delay-4 { animation-delay: 0.28s; }

/* ── Planner / Calendar ── */
.plan-col-header { font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); padding: 10px 14px 8px; border-bottom: 1px solid var(--border); }
.task-item { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; cursor: pointer; transition: background 0.1s; }
.task-item:hover { background: var(--cream); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .page-body { padding: 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
