@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:       #FAF7F2;
  --cream-dark:  #F0EBE1;
  --rose:        #C4596A;
  --rose-dark:   #A8404F;
  --rose-light:  #F9E4E7;
  --amber:       #D97706;
  --amber-light: #FEF3C7;
  --green:       #15803D;
  --green-light: #DCFCE7;
  --red:         #DC2626;
  --red-light:   #FEE2E2;
  --slate:       #1E293B;
  --slate-mid:   #475569;
  --slate-light: #CBD5E1;
  --white:       #FFFFFF;
  --sidebar-w:   260px;
  --radius:      8px;
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --font:        'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--slate);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ===== LOGIN ===== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  padding: 20px;
}

.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--cream-dark);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo .logo-icon { font-size: 48px; display: block; margin-bottom: 8px; }
.login-logo h1 { font-size: 24px; font-weight: 700; color: var(--slate); }
.login-logo p { color: var(--slate-mid); font-size: 13px; margin-top: 4px; }

.login-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 6px;
}
.login-form input[type="password"],
.login-form input[type="email"],
.login-form input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--slate-light);
  border-radius: var(--radius);
  font-size: 15px;
  outline: none;
  transition: border-color .15s;
  margin-bottom: 12px;
}
.login-form input[type="password"]:focus,
.login-form input[type="email"]:focus,
.login-form input[type="text"]:focus { border-color: var(--rose); }

.login-link { color: var(--rose); text-decoration: none; font-weight: 500; }
.login-link:hover { text-decoration: underline; }
.label-hint { font-weight: 400; color: var(--slate-mid); font-size: 12px; }

.login-error {
  background: var(--red-light);
  color: var(--red);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}

.login-footer {
  text-align: center;
  font-size: 12px;
  color: var(--slate-mid);
  margin-top: 20px;
}

/* ===== PLAN & UPGRADE ===== */
.plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0 10px;
  gap: 8px;
}
.plan-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--slate-mid);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.btn-xs {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  border: 1.5px solid var(--rose);
  background: transparent;
  color: var(--rose);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.btn-xs:hover { background: var(--rose); color: var(--white); }
.btn-xs.btn-primary { background: var(--rose); color: var(--white); }
.btn-xs.btn-primary:hover { background: var(--rose-dark); border-color: var(--rose-dark); }

.upgrade-banner {
  background: var(--amber-light);
  border-bottom: 1px solid #FDE68A;
  color: #92400E;
  font-size: 13px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Post-upgrade toast */
.upgrade-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #15803D;
  color: white;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  z-index: 999;
  white-space: nowrap;
  animation: toast-in .25s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* Allergen recipe counter */
.allergen-counter {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.allergen-counter.limit-ok   { background: var(--cream); color: var(--slate-mid); }
.allergen-counter.limit-warn { background: #FEF3C7; color: #92400E; }
.allergen-counter.limit-hit  { background: var(--rose-light); color: var(--rose-dark); }

/* History approaching warning */
.section-hint-warn { color: #92400E !important; }
.section-hint-warn a { color: var(--rose-dark); font-weight: 600; text-decoration: underline; cursor: pointer; }

/* Pro feature teaser (review reminders) */
.pro-teaser {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--slate-mid);
  background: var(--cream);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-top: 8px;
}

/* Welcome banner */
.welcome-banner {
  background: var(--green-light);
  border-bottom: 1px solid #BBF7D0;
  padding: 12px 20px;
  font-size: 14px;
  color: var(--slate);
}
.welcome-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.welcome-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Setup checklist */
.setup-checklist { margin-bottom: 0; }
.setup-checklist .card-header { margin-bottom: 0; }
.setup-pct { font-size: 13px; font-weight: 700; color: var(--rose); }
.setup-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px; margin-top: 12px;
}
.setup-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--slate);
  text-decoration: none; padding: 6px 8px;
  border-radius: var(--radius);
  transition: background .12s;
}
.setup-item:hover { background: var(--cream); }
.setup-dot { font-size: 14px; color: var(--rose); width: 16px; text-align: center; }

/* ===== LAYOUT ===== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--cream-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--cream-dark);
}
.sidebar-header .logo-icon { font-size: 28px; }
.sidebar-title { font-weight: 700; font-size: 15px; color: var(--slate); }
.sidebar-subtitle { font-size: 11px; color: var(--slate-mid); }

.nav-list { list-style: none; padding: 10px 8px; flex: 1; }
.nav-list li { margin-bottom: 2px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--slate-mid);
  font-size: 14px;
  font-weight: 500;
  transition: background .12s, color .12s;
}
.nav-link:hover { background: var(--cream); color: var(--slate); }
.nav-link.active { background: var(--rose-light); color: var(--rose-dark); font-weight: 600; }
.nav-icon { font-size: 16px; }

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--cream-dark);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  background: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--slate-mid);
  font-size: 13px;
  font-family: var(--font);
  transition: background .12s, color .12s;
}
.sidebar-toggle:hover { background: var(--cream); color: var(--slate); }
.sidebar-toggle svg { flex-shrink: 0; transition: transform .2s ease; }

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 24px;
  max-width: calc(1200px + var(--sidebar-w));
  transition: margin-left .2s ease;
}

/* ===== COLLAPSIBLE SIDEBAR (desktop only) ===== */
@media (min-width: 769px) {
  :root { --sidebar-collapsed-w: 56px; }

  .sidebar { transition: width .2s ease; overflow: hidden; }

  .nav-collapsed .sidebar { width: var(--sidebar-collapsed-w); }
  .nav-collapsed .main-content { margin-left: var(--sidebar-collapsed-w); }

  .nav-collapsed .sidebar-header { justify-content: center; padding: 16px 8px; }
  .nav-collapsed .sidebar-wordmark { display: none; }

  .nav-collapsed .nav-list { padding: 10px 6px; }
  .nav-collapsed .nav-label { display: none; }
  .nav-collapsed .nav-link { justify-content: center; padding: 10px 0; }
  .nav-collapsed .nav-icon { font-size: 20px; }

  .nav-collapsed .sidebar-footer { padding: 10px 6px; align-items: center; }
  .nav-collapsed .plan-row { display: none; }
  .nav-collapsed .sidebar-footer .btn-full { width: 36px; min-width: 0; padding: 0; justify-content: center; border-radius: 8px; height: 36px; font-size: 16px; }
  .nav-collapsed .sidebar-toggle { justify-content: center; padding: 7px 0; }
  .nav-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
}

.mobile-header { display: none; }

/* ===== PAGES ===== */
.page.hidden { display: none; }
.page.active { display: block; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h2 { font-size: 22px; font-weight: 700; color: var(--slate); }

.date-display { font-size: 13px; color: var(--slate-mid); }

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.card-header h3 { font-size: 15px; font-weight: 600; color: var(--slate); }

.info-card {
  background: var(--cream);
  border-color: var(--cream-dark);
  font-size: 13px;
  color: var(--slate-mid);
}

/* ===== STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.stat-label { font-size: 12px; color: var(--slate-mid); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--slate); margin-top: 4px; }

.alert-banner {
  background: var(--amber-light);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 16px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 600;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

/* ===== COMPLIANCE ===== */
.compliance-list { display: flex; flex-direction: column; gap: 8px; }
.compliance-item { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.comp-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-red   { background: var(--red); }
.dot-grey  { background: var(--slate-light); }

.today-status { font-size: 14px; }
.status-item { padding: 8px 0; border-bottom: 1px solid var(--cream); color: var(--slate-mid); }
.status-item:last-child { border-bottom: none; }
.status-item.ok { color: var(--green); }
.status-item.warn { color: var(--amber); }
.status-item.unchecked { color: var(--slate-light); font-style: italic; }

.quick-actions { display: flex; flex-direction: column; gap: 8px; }
.qa-btn { justify-content: flex-start; text-align: left; }

.recent-list { font-size: 13px; }
.recent-temp-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--cream);
}
.recent-temp-item:last-child { border-bottom: none; }
.temp-badge {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}
.temp-ok   { background: var(--green-light); color: var(--green); }
.temp-warn { background: var(--amber-light); color: var(--amber); }
.temp-bad  { background: var(--red-light);   color: var(--red); }

/* ===== FORMS ===== */
.form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--slate); }
.form-hint { font-size: 12px; color: var(--slate-mid); margin-bottom: 12px; margin-top: -8px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="password"],
select,
textarea {
  padding: 9px 12px;
  border: 1.5px solid var(--slate-light);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  color: var(--slate);
  background: var(--white);
  outline: none;
  transition: border-color .15s;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--rose); }
textarea { resize: vertical; }

.section-divider {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--rose-dark);
  padding: 12px 0 8px;
  border-top: 1px solid var(--cream-dark);
  margin-top: 8px;
}

.checklist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background .1s;
}
.check-item:hover { background: var(--cream); }
.check-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-width: 17px;
  margin-top: 2px;
  border: 1.5px solid var(--slate-light);
  border-radius: 4px;
  accent-color: var(--rose);
  cursor: pointer;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--cream-dark);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--rose); color: var(--white); border-color: var(--rose); }
.btn-primary:hover { background: var(--rose-dark); border-color: var(--rose-dark); }
.btn-outline { background: var(--white); color: var(--rose-dark); border-color: var(--rose); }
.btn-outline:hover { background: var(--rose-light); }
.btn-ghost { background: transparent; color: var(--slate-mid); border-color: transparent; }
.btn-ghost:hover { background: var(--cream); color: var(--slate); }
.btn-danger { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-danger:hover { background: #B91C1C; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-full { width: 100%; }

/* ===== MONTH NAVIGATOR & DAY GRID ===== */
.month-nav-card { padding: 16px 20px; }

.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.month-label { font-weight: 700; font-size: 16px; color: var(--slate); }

.day-grid-inner {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
@media (max-width: 480px) {
  .day-grid-inner { grid-template-columns: repeat(7, 1fr); gap: 3px; }
}

.day-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 2px;
  border-radius: 6px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .1s, border-color .1s;
  min-width: 0;
}
.day-cell:hover { background: var(--cream); border-color: var(--cream-dark); }

.day-num  { font-size: 13px; font-weight: 600; color: var(--slate); line-height: 1.2; }
.day-dot  { font-size: 11px; line-height: 1.2; margin-top: 1px; }

.day-logged { background: var(--rose-light); border-color: var(--rose); }
.day-logged .day-num { color: var(--rose-dark); }
.day-logged .day-dot { color: var(--rose-dark); }
.day-logged:hover { background: #efc5cc; }

.day-today { border-color: var(--slate); }
.day-today .day-num { text-decoration: underline; }

.day-future { opacity: .45; }
.day-past .day-dot  { color: var(--slate-light); }

/* ===== LIST FILTER BAR ===== */
.list-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--cream);
  flex-wrap: wrap;
}
.list-filter-bar label { font-size: 13px; font-weight: 600; color: var(--slate-mid); white-space: nowrap; }
.list-filter-bar select { width: auto; padding: 6px 10px; font-size: 13px; }
.filter-count { font-size: 12px; color: var(--slate-light); margin-left: auto; }

/* ===== RECORD LISTS ===== */
.record-list { display: flex; flex-direction: column; gap: 0; }

.record-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--cream);
}
.record-item:last-child { border-bottom: none; }
.record-item:first-child { padding-top: 0; }

.record-main { flex: 1; min-width: 0; }
.record-title { font-weight: 600; font-size: 14px; color: var(--slate); }
.record-meta { font-size: 12px; color: var(--slate-mid); margin-top: 2px; }
.record-detail { font-size: 13px; color: var(--slate-mid); margin-top: 4px; }

.record-actions { display: flex; gap: 6px; flex-shrink: 0; }

.empty-state { color: var(--slate-light); font-style: italic; font-size: 14px; padding: 8px 0; }

/* ===== TEMPERATURE ===== */
.temp-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 12px;
  color: var(--slate-mid);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cream);
  align-items: center;
}
.guide-item { display: flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-red   { background: var(--red); }

.temp-warning {
  background: var(--amber-light);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--amber);
  margin-bottom: 12px;
}

/* ===== ALLERGENS ===== */
.allergen-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge {
  background: var(--cream-dark);
  color: var(--slate-mid);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
}

.allergen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}
.allergen-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1.5px solid var(--cream-dark);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: background .1s, border-color .1s;
}
.allergen-check:hover { background: var(--cream); }
.allergen-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-width: 15px;
  accent-color: var(--rose);
}
.allergen-check input:checked ~ span { color: var(--rose-dark); font-weight: 600; }
.allergen-check:has(input:checked) { background: var(--rose-light); border-color: var(--rose); }

.allergen-cards { display: flex; flex-direction: column; gap: 12px; }
.allergen-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
}
.allergen-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.allergen-card-name { font-weight: 700; font-size: 16px; color: var(--slate); }
.allergen-card-date { font-size: 12px; color: var(--slate-mid); }
.allergen-tag {
  background: var(--red-light);
  color: var(--red);
  border-radius: 10px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}
.allergen-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.allergen-card-meta { font-size: 12px; color: var(--slate-mid); margin-top: 6px; }
.cross-note { font-size: 12px; color: var(--amber); margin-top: 4px; }

/* ===== TRAINING GRID ===== */
.training-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.training-topic {
  background: var(--cream);
  border-radius: 6px;
  padding: 10px 14px;
}
.topic-name { font-weight: 600; font-size: 13px; color: var(--slate); margin-bottom: 6px; }
.topic-fields { display: grid; grid-template-columns: 1fr 80px 1fr; gap: 8px; }
@media (max-width: 600px) { .topic-fields { grid-template-columns: 1fr 1fr; } }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal {
  background: var(--white);
  border-radius: 12px;
  padding: 28px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-md);
}
.modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.modal p { color: var(--slate-mid); font-size: 14px; margin-bottom: 16px; }
.export-modal-wide { max-width: 560px; }
.export-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--slate-mid);
  margin: 14px 0 6px;
}
.export-section-label:first-of-type { margin-top: 0; }
.export-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 480px) { .export-grid { grid-template-columns: 1fr; } }
.export-plan-note {
  font-size: 12px;
  color: var(--slate-mid);
  padding: 8px 10px;
  background: var(--cream);
  border-radius: 6px;
}
.export-plan-note a { color: var(--rose); text-decoration: underline; cursor: pointer; }

/* ===== UTILS ===== */
.hidden { display: none !important; }
.mt-2 { margin-top: 12px; }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .app { flex-direction: column; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .sidebar.open { transform: translateX(0); }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 99;
  }
  .sidebar.open ~ .sidebar-overlay { display: block; }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    border-bottom: 1px solid var(--cream-dark);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 50;
  }
  .mobile-title { font-weight: 700; font-size: 15px; color: var(--slate); }
  .hamburger {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--slate);
    padding: 4px;
  }

  .main-content { margin-left: 0; padding: 16px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ===== HELP PAGE ===== */
.section-hint {
  font-size: 13px;
  color: var(--slate-mid);
  margin: -8px 0 20px;
  line-height: 1.5;
}

.help-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.help-step { background: var(--cream); border-radius: var(--radius); padding: 16px; }
.help-step-num { font-size: 11px; font-weight: 800; color: var(--rose); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.help-step h4 { font-size: 14px; font-weight: 700; color: var(--slate); margin-bottom: 4px; }
.help-step p { font-size: 13px; color: var(--slate-mid); line-height: 1.5; margin: 0; }

.guide-accordion { display: flex; flex-direction: column; gap: 5px; margin-bottom: 28px; }
.guide-item { border: 1px solid var(--cream-dark); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.guide-item summary {
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  user-select: none;
}
.guide-item summary::-webkit-details-marker { display: none; }
.guide-item summary::after { content: '+'; margin-left: auto; font-size: 18px; color: var(--slate-mid); font-weight: 400; }
.guide-item[open] summary::after { content: '-'; }
.guide-item[open] summary { border-bottom: 1px solid var(--cream-dark); }
.guide-body { padding: 12px 16px; }
.guide-body ul { padding-left: 18px; margin: 0; }
.guide-body li, .guide-body p { font-size: 13px; color: var(--slate-mid); line-height: 1.65; margin-bottom: 4px; }
.guide-body li:last-child, .guide-body p:last-child { margin-bottom: 0; }
.guide-body strong { color: var(--slate); }

.help-resources { margin-top: 4px; }
.help-resources p { font-size: 13px; color: var(--slate-mid); line-height: 1.6; margin-bottom: 6px; }
.help-resources p:last-child { margin-bottom: 0; }
.help-resources a { color: var(--rose); }

@media (max-width: 768px) {
  .help-steps { grid-template-columns: 1fr; }
}

/* ===== BUSINESS SETUP CHECKLIST ===== */
.biz-progress-wrap {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.biz-progress-bar {
  flex: 1; height: 8px; background: var(--cream-dark);
  border-radius: 999px; overflow: hidden;
}
.biz-checklist { display: flex; flex-direction: column; gap: 12px; }
.biz-card {
  background: var(--white); border: 1px solid var(--cream-dark);
  border-radius: 12px; padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 12px; row-gap: 4px;
  align-items: start;
}
.biz-check {
  grid-row: 1 / 3; align-self: center;
  width: 18px; height: 18px; cursor: pointer; accent-color: var(--green);
}
.biz-card label { cursor: pointer; }
.biz-card-title { display: block; font-size: 14px; font-weight: 700; color: var(--slate); }
.biz-card-desc { display: block; font-size: 13px; color: var(--slate-mid); margin-top: 2px; line-height: 1.5; }
.biz-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 10px; white-space: nowrap; grid-row: 1; align-self: start;
}
.biz-link {
  grid-column: 2 / 4; font-size: 13px; font-weight: 600; color: var(--rose);
  text-decoration: none; margin-top: 6px;
}
.biz-link:hover { text-decoration: underline; }
.biz-card.biz-done { opacity: .6; }
.biz-card.biz-done .biz-card-title { text-decoration: line-through; color: var(--slate-mid); }
.biz-progress-text { font-size: 13px; font-weight: 700; color: var(--slate-mid); white-space: nowrap; }
.biz-all-done .biz-progress-text { color: var(--green); }

/* ===== PRINT ===== */
@media print {
  .sidebar, .mobile-header, .btn, .form-actions, .record-actions, .page-header button,
  #login-screen { display: none !important; }
  .main-content { margin-left: 0; padding: 0; }
  .app { display: block; }
  .page.hidden { display: none !important; }
  .page.active { display: block; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  body { font-size: 12px; }
}

/* ===== READINESS SCORE ===== */
.readiness-card { margin-bottom: 16px; }
.readiness-badge { padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 700; }
.rb-great { background: var(--green-light); color: var(--green); }
.rb-good  { background: #DCFCE7; color: #166534; }
.rb-fair  { background: var(--amber-light); color: var(--amber); }
.rb-poor  { background: var(--red-light); color: var(--red); }
.readiness-bar-wrap { height: 8px; background: var(--cream-dark); border-radius: 4px; margin-bottom: 12px; overflow: hidden; }
.readiness-bar-fill { height: 100%; border-radius: 4px; background: var(--green); transition: width .4s ease; }
.readiness-items { display: flex; flex-direction: column; gap: 4px; }
.ri-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; }
.ri-dot { width: 16px; text-align: center; flex-shrink: 0; }
.ri-ok .ri-dot { color: var(--green); font-weight: 700; }
.ri-miss .ri-dot { color: var(--slate-light); }
.ri-label { flex: 1; color: var(--slate-mid); }
.ri-ok .ri-label { color: var(--slate); }
.ri-pts { font-size: 11px; color: var(--slate-light); font-weight: 600; }
.ri-ok .ri-pts { color: var(--green); }

/* ===== PRICING MODAL ===== */
.pricing-modal { max-width: 420px; }
.pricing-toggle { display: flex; gap: 0; border: 1.5px solid var(--rose); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.ptoggle { flex: 1; padding: 8px 12px; background: transparent; border: none; cursor: pointer; font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--rose); transition: background .12s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ptoggle.active { background: var(--rose); color: white; }
.save-badge { background: var(--green); color: white; font-size: 10px; padding: 1px 6px; border-radius: 10px; }
.price-display { text-align: center; margin-bottom: 16px; }
.price-big { font-size: 32px; font-weight: 800; color: var(--slate); }
.price-big span { font-size: 16px; font-weight: 400; color: var(--slate-mid); }
.price-sub { font-size: 12px; color: var(--slate-mid); margin-top: 2px; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 16px; }
.pricing-features li { font-size: 13px; color: var(--slate-mid); padding: 4px 0; padding-left: 20px; position: relative; }
.pricing-features li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }

/* ===== CLEANING TEMPLATES ===== */
.tpl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--cream); flex-wrap: wrap; }
.tpl-row:last-child { border-bottom: none; }
.tpl-info { flex: 1; min-width: 0; }
.tpl-name { font-weight: 600; font-size: 13px; color: var(--slate); display: block; }
.tpl-meta { font-size: 11px; color: var(--slate-mid); }
.tpl-due-badge { background: var(--amber-light); color: var(--amber); font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.tpl-due .tpl-name { color: var(--amber); }

/* ===== SHARE LINK ===== */
.share-link-box { background: var(--cream); border-radius: var(--radius); padding: 10px 12px; font-size: 12px; word-break: break-all; }
