:root {
  --ink: #1E3D2B;
  --muted: #6f8a73;
  --line: #e2ece2;
  --surface: #F2F7F2;
  --paper: #F2F7F2;
  --panel: #EAF2E5;
  --lime: #A8D08D;
  --lime-dark: #8DBE6F;
  --sidebar-bg: #1E3D2B;
  --sidebar-item: #2A4E38;
  --sidebar-text: #B7CEB9;
  --gold: #c4953f;
  --sea: #4C7F5A;
  --olive-dark: #2F5B3D;
  --tomato: #bf4935;
  --tomato-dark: #953828;
  --rose: #bc6c78;
  --shadow: 0 4px 24px rgba(30,61,43,0.08);
  --shadow-card: 0 2px 12px rgba(30,61,43,0.07);
}

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

body {
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
  font-family: Poppins, system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.65; }
h1, h2, h3 { font-family: Poppins, sans-serif; margin: 0; }
p { margin: 0; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }

/* ── APP SHELL ───────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

/* ── SIDEBAR ─────────────────────────────────── */
.sidebar {
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  gap: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 20px 12px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 20px;
  border-bottom: 1px solid #2a2a2a;
  margin-bottom: 16px;
}

.brand-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #555;
  padding: 0 8px;
  margin-bottom: 6px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 20px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  width: 100%;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
}

.nav-item:hover {
  background: #2a2a2a;
  color: #fff;
}

.nav-item.active {
  background: var(--lime);
  color: var(--ink);
}

.nav-item.active svg { stroke: var(--ink); }
.nav-item.active span { color: var(--ink) !important; }

.nav-badge {
  margin-left: auto;
  background: #333;
  color: #888;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

.nav-item.active .nav-badge {
  background: rgba(0,0,0,0.2);
  color: var(--ink);
}

.sidebar-type-filters {
  margin-bottom: 20px;
}

.type-pills-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 4px;
}

.type-pill-nav {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #333;
  background: transparent;
  color: #888;
  transition: all 0.15s;
}

.type-pill-nav:hover {
  background: #2a2a2a;
  color: #ddd;
  border-color: #444;
}

.type-pill-nav.active {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
  font-weight: 700;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #2a2a2a;
}

.lang-toggle-sidebar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #2a2a2a;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  width: 100%;
}

.lang-opt {
  font-size: 12px;
  font-weight: 700;
  color: #555;
  transition: color 0.15s;
}

.lang-opt.active { color: var(--lime); }
.lang-sep { color: #444; font-size: 12px; }

/* ── WORKSPACE ───────────────────────────────── */
.workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  min-width: 0;
  background: var(--surface);
}

/* ── TOPBAR ──────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-wrap {
  position: relative;
  flex: 1;
}

.search-wrap svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  stroke: #999;
}

.search-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  font-size: 14px;
}

.search-wrap input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(176, 240, 0, 0.15);
}

.new-recipe-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 16px;
  border: none;
  background: var(--lime);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}

.new-recipe-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--ink);
}

.new-recipe-btn:hover {
  background: var(--lime-dark);
  transform: translateY(-1px);
}

/* ── STATS ───────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--paper);
  border-radius: 14px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s, box-shadow 0.15s;
  display: block;
  width: 100%;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30,61,43,0.12);
}

.stat-card.accent {
  background: var(--lime);
  border-color: var(--lime);
}

.stat-card span {
  display: block;
  font-size: 28px;
  font-weight: 800;
  font-family: Poppins, sans-serif;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.stat-card.accent small { color: rgba(26,26,26,0.6); }

/* ── VIEW PANEL ──────────────────────────────── */
.view-panel {
  background: var(--paper);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tomato);
  margin-bottom: 4px;
}

.section-heading h2 {
  font-size: 22px;
}

.section-heading p:last-child {
  color: var(--muted);
  font-size: 13px;
}

/* ── RECIPE GRID ─────────────────────────────── */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* ── RECIPE CARD ─────────────────────────────── */
.recipe-card {
  background: var(--paper);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.recipe-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(30,61,43,0.12);
}

.recipe-photo {
  position: relative;
  height: 130px;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  background: #EAF2E5;
}

.recipe-photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Remove food circle — new style doesn't use it */
.food-circle { display: none; }
.food-circle-img { display: none; }

.type-pill {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  border: none;
}

.favorite-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  transition: all 0.15s;
}

.favorite-button svg { width: 13px; height: 13px; }
.favorite-button:hover { transform: scale(1.1); }
.favorite-button.active { color: #c0573f; background: #fdf1ed; border-color: #c0573f; }
.favorite-button.active svg { fill: currentColor; }

.card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 12px;
}

.card-header { display: flex; align-items: center; gap: 6px; }

.category-pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.category-pill.breakfast { background: var(--gold); }
.category-pill.lunch { background: var(--sea); }
.category-pill.dinner { background: var(--olive-dark); }
.category-pill.dessert { background: #8a6fa8; }
.category-pill.snack { background: #c4793f; }

.recipe-card h3 {
  font-family: Poppins, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.meta-row { display: flex; flex-wrap: wrap; gap: 6px; }

.meta-row span {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.ingredient-preview {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 3px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.ingredient-preview li {
  font-family: Poppins, sans-serif;
  font-size: 13px;
  color: var(--ink);
}

.ingredient-preview li.scaled {
  color: var(--sea);
  font-weight: 600;
}

.steps-preview {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin-bottom: auto;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.ghost-button {
  flex: 1;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: none;
  color: var(--sea);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.ghost-button:hover { background: var(--surface); }

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  transition: all 0.15s;
}

.icon-button svg { width: 14px; height: 14px; }
.icon-button:hover { background: var(--surface); color: var(--ink); }

/* ── EMPTY STATE ─────────────────────────────── */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
  font-size: 14px;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  opacity: 0.7;
}

/* ── SHOPPING ────────────────────────────────── */
.shopping-dashboard-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 16px;
}

.shopping-dashboard-form input {
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  font-size: 14px;
}

.shopping-dashboard-form input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(176, 240, 0, 0.15);
}

.primary-button {
  height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: 16px;
  background: var(--lime);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s;
}

.primary-button:hover { background: var(--lime-dark); }

.shopping-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.shopping-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.shopping-list input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--lime);
}

.shopping-list span { font-size: 14px; overflow-wrap: anywhere; }
.shopping-list span.done { color: var(--muted); text-decoration: line-through; }
.shopping-list-large { max-height: none; }

.shopping-delete {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(191, 73, 53, 0.1);
  color: var(--tomato);
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── MODAL ───────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-overlay[hidden] { display: none !important; }

.modal {
  background: var(--paper);
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}

.modal-body {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: none;
}

.modal-body::-webkit-scrollbar { display: none; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  border-radius: 20px 20px 0 0;
  z-index: 1;
  flex-shrink: 0;
}

.modal-header h2 { font-size: 20px; }
.recipe-detail-modal .modal-header h2 {
  font-size: 20px;
}

.modal-close {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  transition: all 0.15s;
}

.modal-close svg { width: 16px; height: 16px; }
.modal-close:hover { background: var(--line); color: var(--ink); }

.modal-body { padding: 20px 24px 24px; }

/* ── RECIPE FORM ─────────────────────────────── */
.recipe-form { display: grid; gap: 16px; }

.photo-field {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: stretch;
}

.photo-preview {
  display: grid;
  place-items: center;
  min-height: 120px;
  overflow: hidden;
  border: 2px dashed var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.photo-preview img { width: 100%; height: 100%; object-fit: cover; }

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 8px;
}

.file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: none;
  background: var(--lime);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.file-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

.secondary-button {
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.secondary-button:hover { background: var(--surface); }

.form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 80px 100px;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--olive-dark);
}

label input, label select, label textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  font-size: 13px;
}

label textarea {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
}

label input:focus, label select:focus, label textarea:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(176, 240, 0, 0.15);
  background: var(--paper);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.recipe-form .primary-button {
  height: 44px;
  padding: 0 24px;
  font-size: 14px;
}

/* ── UTILITIES ───────────────────────────────── */
[hidden] { display: none !important; }

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 1024px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    top: 0;
    height: auto;
    max-height: none;
    z-index: 50;
    flex-direction: column;
    flex-wrap: nowrap;
    padding: 16px;
  }
  .sidebar-nav, .sidebar-type-filters { display: none; }
  .sidebar.expanded .sidebar-nav,
  .sidebar.expanded .sidebar-type-filters { display: flex; flex-direction: column; }
  .sidebar.expanded .type-pills-nav { display: flex; }
  .mobile-sidebar-toggle { display: flex; }
  .brand-block { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
  .sidebar-footer { margin-top: 12px; padding-top: 12px; }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .recipe-grid { grid-template-columns: 1fr; }
  .photo-field { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .modal { max-width: 92vw; margin: 0 16px; }
  .modal-body { padding: 16px 18px 20px; }
}

@media (max-width: 480px) {
  .workspace { padding: 12px; gap: 12px; }
  .stats-row { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; }
  .new-recipe-btn { width: 100%; justify-content: center; }
  .form-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 18px; }
  .settings-tabs { flex-wrap: wrap; }
  .settings-tab { flex: 1 1 30%; }
  .modal { max-width: 100%; margin: 0 8px; max-height: 88vh; }
  .timer-modal { max-width: 100%; }
  .legal-modal { max-width: 100%; }
}

.mobile-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: #2a4e38;
  color: #fff;
  margin-left: auto;
}

.mobile-sidebar-toggle svg { width: 18px; height: 18px; }

/* ── TIMER FAB ───────────────────────────────── */
.timer-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  display: grid;
  place-items: center;
  z-index: 90;
  transition: transform 0.15s, box-shadow 0.15s;
}

.timer-fab svg { width: 26px; height: 26px; stroke: var(--ink); }

.timer-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}

.timer-fab.running {
  animation: timer-fab-pulse 2s ease-in-out infinite;
}

@keyframes timer-fab-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
  50% { box-shadow: 0 8px 24px rgba(176, 240, 0, 0.55); }
}

.timer-fab.alarm {
  animation: timer-fab-alarm 0.6s ease-in-out infinite;
}

@keyframes timer-fab-alarm {
  0%, 100% { transform: scale(1); background: var(--lime); }
  50% { transform: scale(1.12); background: var(--tomato); }
}

/* ── TIMER MODAL ─────────────────────────────── */
.timer-modal {
  max-width: 380px;
}

.timer-modal.alarm-active {
  animation: timer-modal-shake 0.4s ease-in-out infinite;
}

@keyframes timer-modal-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.timer-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.timer-display {
  font-family: Poppins, sans-serif;
  font-size: 56px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.02em;
  padding: 12px 0;
}

.timer-display.alarm-active { color: var(--tomato); }

.timer-set-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
}

.timer-set-label {
  flex: 1;
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--olive-dark);
  text-align: left;
}

.timer-set-label input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
  outline: none;
}

.timer-set-label input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(176, 240, 0, 0.15);
}

.timer-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.chip-preset {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.15s;
}

.chip-preset:hover { background: var(--lime); border-color: var(--lime); }

.timer-controls {
  display: flex;
  gap: 8px;
  width: 100%;
}

.timer-controls button { flex: 1; }

.timer-status {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  min-height: 18px;
}

.timer-status.alarm-active { color: var(--tomato); }

@media (max-width: 480px) {
  .timer-fab { bottom: 16px; right: 16px; width: 52px; height: 52px; }
  .timer-fab svg { width: 22px; height: 22px; }
}

/* ── SPLASH SCREEN ───────────────────────────── */
.splash-screen {
  position: fixed;
  inset: 0;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: opacity 0.5s ease;
}

.splash-screen.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.splash-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: splash-pop-in 0.5s ease;
}

.plately-icon {
  display: block;
}

.plately-icon-splash {
  width: 110px;
  height: 110px;
  margin-bottom: 8px;
  animation: splash-pulse 1.6s ease-in-out infinite;
}

.plately-icon-login {
  width: 64px;
  height: 64px;
  margin-bottom: 4px;
}

.plately-icon-sidebar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.splash-text {
  font-family: Poppins, sans-serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.splash-tagline {
  font-family: Poppins, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--sea);
  letter-spacing: 0.14em;
}

@keyframes splash-pop-in {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes splash-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ── AUTH SCREEN ─────────────────────────────── */
.auth-screen {
  position: fixed;
  inset: 0;
  background: var(--surface);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 200;
  padding: 24px 20px;
  overflow-y: auto;
}

.auth-card {
  background: var(--paper);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin-bottom: 24px;
}

.auth-brand h1 {
  font-size: 22px;
}

.auth-brand p {
  color: var(--muted);
  font-size: 13px;
}

.auth-tabs {
  display: flex;
  background: var(--surface);
  border-radius: 16px;
  padding: 4px;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  height: 38px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s;
}

.auth-tab.active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--olive-dark);
}

.auth-form input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
  outline: none;
}

.auth-form input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(176, 240, 0, 0.15);
  background: var(--paper);
}

.auth-error {
  font-size: 12px;
  color: var(--tomato);
  background: rgba(191, 73, 53, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0;
}

.auth-submit {
  margin-top: 4px;
  height: 46px;
  width: 100%;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-divider span { padding: 0 10px; }

.google-button {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s;
}

.google-button:hover { background: var(--surface); }
.google-icon { width: 18px; height: 18px; }

/* ── USER INFO (sidebar) ─────────────────────── */
.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: #2a2a2a;
  margin-bottom: 8px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.user-email {
  flex: 1;
  font-size: 11px;
  color: #ccc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-button {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.logout-button svg { width: 14px; height: 14px; }
.logout-button:hover { background: #333; color: #fff; }

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
}

/* ── PASSWORD STRENGTH ───────────────────────── */
.password-strength {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: -4px;
}

.strength-bars {
  display: flex;
  gap: 4px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  transition: background 0.2s;
}

.strength-bar.active-weak { background: var(--tomato); }
.strength-bar.active-medium { background: var(--gold); }
.strength-bar.active-strong { background: var(--lime); }

.strength-rules {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.strength-rules li {
  display: flex;
  align-items: center;
  gap: 5px;
}

.strength-rules li::before {
  content: "○";
  font-size: 10px;
  color: var(--muted);
}

.strength-rules li.met {
  color: var(--olive-dark);
  font-weight: 600;
}

.strength-rules li.met::before {
  content: "●";
  color: var(--lime-dark);
}

/* ── TERMS CHECKBOX ──────────────────────────── */
.terms-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px !important;
  font-weight: 400 !important;
  color: var(--muted) !important;
}

.terms-check input {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: var(--lime-dark);
  flex-shrink: 0;
}

.terms-check a {
  color: var(--olive-dark);
  font-weight: 700;
  text-decoration: underline;
}

.terms-check a:hover { color: var(--ink); }

/* ── AUTH SUCCESS MESSAGE ────────────────────── */
.auth-success {
  font-size: 12px;
  color: var(--olive-dark);
  background: rgba(176, 240, 0, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0;
}

/* ── SETTINGS BUTTON (sidebar) ───────────────── */
.settings-button {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.settings-button svg { width: 14px; height: 14px; }
.settings-button:hover { background: #333; color: var(--lime); }

/* ── LEGAL MODAL (Terms/Privacy) ─────────────── */
.legal-modal { max-width: 600px; }

.legal-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

.legal-disclaimer {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-style: italic;
}

.legal-body h3 {
  font-size: 15px;
  margin-top: 18px;
  margin-bottom: 6px;
  color: var(--olive-dark);
}

.legal-body h3:first-of-type { margin-top: 0; }

.legal-body p { margin-bottom: 4px; color: var(--muted); }

/* ── SETTINGS MODAL ───────────────────────────── */
.settings-tabs {
  display: flex;
  background: var(--surface);
  border-radius: 16px;
  padding: 4px;
  margin-bottom: 20px;
}

.settings-tab {
  flex: 1;
  height: 38px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s;
}

.settings-tab.active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-note {
  font-size: 13px;
  color: var(--muted);
}

.settings-note span { font-weight: 700; color: var(--ink); }

@media (max-width: 480px) {
  .strength-rules { grid-template-columns: 1fr; }
}

/* ── TOAST NOTIFICATIONS ──────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 500;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(30,61,43,0.25);
  animation: toast-in 0.25s ease, toast-out 0.25s ease 2.3s forwards;
  white-space: nowrap;
}

.toast svg {
  width: 16px;
  height: 16px;
  stroke: var(--lime);
  flex-shrink: 0;
}

.toast.toast-error svg { stroke: #e8a07a; }

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

@keyframes toast-out {
  to { opacity: 0; transform: translateY(10px); }
}

@media (max-width: 480px) {
  .toast-container { left: 16px; right: 16px; transform: none; align-items: center; }
  .toast { white-space: normal; text-align: center; }
}

/* ── PRIVACY TAB / DANGER ZONE ────────────────── */
.privacy-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.danger-zone {
  margin-top: 8px;
  padding: 16px;
  border: 1px solid rgba(191, 73, 53, 0.25);
  border-radius: 16px;
  background: rgba(191, 73, 53, 0.04);
}

.danger-zone h3 {
  font-size: 14px;
  color: var(--tomato-dark);
  margin-bottom: 6px;
}

.danger-zone p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.danger-button {
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--tomato);
  border-radius: 10px;
  background: transparent;
  color: var(--tomato-dark);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s;
}

.danger-button:hover {
  background: var(--tomato);
  color: #fff;
}

#deleteAccountForm {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

/* ── LOADING STATE ────────────────────────────── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 48px 24px;
  color: var(--muted);
  font-size: 14px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--line);
  border-top-color: var(--sea);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── BACKUP / EXPORT-IMPORT ───────────────────── */
.backup-section {
  margin-top: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.backup-section h3 {
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 6px;
}

.backup-section p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.backup-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.backup-buttons .secondary-button,
.import-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.backup-buttons svg {
  width: 16px;
  height: 16px;
}

.import-label {
  cursor: pointer;
}

.import-label input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

/* ── SIDEBAR GREETING ─────────────────────────── */
.sidebar-greeting {
  font-size: 13px;
  font-weight: 600;
  color: #A8D08D;
  padding: 0 8px 16px;
  margin: -8px 0 0;
  border-bottom: 1px solid #2a4e38;
}

/* ── USER AVATAR WITH PHOTO ───────────────────── */
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

/* ── PROFILE PHOTO FIELD ──────────────────────── */
.profile-photo-field {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

.profile-photo-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  border: 3px solid var(--line);
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.profile-photo-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-photo-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  font-size: 12px;
}

.profile-photo-label svg { width: 14px; height: 14px; }

/* ── DIETARY PREFERENCES ──────────────────────── */
.dietary-field { display: flex; flex-direction: column; gap: 10px; }

.dietary-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--olive-dark);
  margin: 0;
}

.dietary-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dietary-option {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 400 !important;
  color: var(--ink) !important;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.dietary-option:hover { background: var(--surface); border-color: var(--lime); }
.dietary-option input { width: 15px; height: 15px; accent-color: var(--lime-dark); flex-shrink: 0; }
.dietary-option input:checked + span { font-weight: 600; color: var(--olive-dark); }

/* ── INPUT WITH TOGGLE (show/hide password) ───── */
.password-field-wrap { display: flex; flex-direction: column; gap: 6px; }
.password-field-wrap label { gap: 0; }

.input-with-toggle {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-toggle input {
  width: 100%;
  padding-right: 44px !important;
}

.toggle-password {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  padding: 4px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s;
}

.toggle-password:hover { color: var(--ink); }
.toggle-password svg { width: 18px; height: 18px; }

@media (max-width: 480px) {
  .dietary-options { grid-template-columns: 1fr; }
  .profile-photo-field { flex-direction: column; align-items: flex-start; }
}

/* ── AUTH LANGUAGE TOGGLE ─────────────────────── */
.auth-lang-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-bottom: 12px;
}

.auth-lang-btn {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding: 2px 4px;
  cursor: pointer;
  transition: color 0.15s;
  letter-spacing: 0.05em;
}

.auth-lang-btn.active { color: var(--olive-dark); }
.auth-lang-btn:hover { color: var(--ink); }
.auth-lang-sep { font-size: 12px; color: var(--line); }

/* ── SHOPPING CATEGORY HEADERS ────────────────── */
.shopping-category-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 4px 4px;
  border: none !important;
  background: none !important;
  display: block;
  grid-template-columns: unset !important;
}

.shopping-category-header:first-child {
  padding-top: 4px;
}

/* ── SERVINGS CONTROL ─────────────────────────── */
.servings-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.servings-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  line-height: 1;
}

.servings-btn:hover {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

.servings-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.servings-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.servings-count {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  min-width: 20px;
  text-align: center;
}

.servings-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.ingredient-preview li.scaled {
  color: var(--sea);
  font-weight: 600;
}

/* ── COOK OVERLAY (semi-transparent) ─────────── */
.cook-overlay {
  background: rgba(30, 61, 43, 0.55) !important;
  backdrop-filter: blur(6px);
}

/* ── RECIPE DETAIL MODAL ──────────────────────── */
.recipe-detail-modal {
  max-width: 540px;
  max-height: 88vh;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.recipe-detail-modal .detail-modal-header {
  border-radius: 20px 20px 0 0;
}

.recipe-detail-modal .modal-body {
  padding: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.recipe-detail-modal .modal-body::-webkit-scrollbar { display: none; }

.recipe-detail-modal .detail-photo-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--panel);
  flex-shrink: 0;
}

.recipe-detail-modal .detail-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-body {
  padding: 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px 8px;
  align-items: center;
}

.detail-section {
  margin-bottom: 16px;
  padding: 0 20px;
}

.cook-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 40px);
  margin: 4px 20px 20px;
  height: 48px;
  font-size: 15px;
  border-radius: 12px;
}

.cook-btn svg { width: 18px; height: 18px; }

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}

.meta-row-item {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.detail-section { margin-bottom: 16px; }

.detail-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--olive-dark);
  margin-bottom: 8px;
}

.detail-ingredients {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.detail-ingredients li {
  font-size: 14px;
  color: var(--ink);
  padding: 6px 10px;
  background: var(--surface);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-ingredients li::before {
  content: "•";
  color: var(--lime-dark);
  font-weight: 900;
}

.detail-steps {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ── COOKING MODE MODAL ───────────────────────── */
.cooking-modal {
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.cooking-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.cooking-title-wrap { display: flex; flex-direction: column; gap: 4px; }
.cooking-title-wrap h2 { font-size: 18px; margin: 0; }
.cooking-progress {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin: 0;
}

.cooking-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px 28px;
  min-height: 220px;
  text-align: center;
}

.cooking-step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cooking-step-text {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 400px;
  margin: 0;
}

.cooking-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--line);
}

.cooking-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.cooking-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.2s, transform 0.2s;
}

.cooking-dot.active {
  background: var(--sea);
  transform: scale(1.3);
}

.cooking-dot.done { background: var(--lime-dark); }

.cooking-nav {
  display: flex;
  gap: 10px;
}

.cook-nav-btn {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
}

.cook-nav-btn svg { width: 18px; height: 18px; }

.cooking-finish {
  background: var(--sea) !important;
  color: #fff !important;
}

/* ── AUTH BUTTON SPINNER ──────────────────────── */
.btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

.btn-spinner-dark {
  border-color: rgba(30, 61, 43, 0.3);
  border-top-color: var(--ink);
}

/* ── WEEKLY PLANNER ───────────────────────────── */
.planner-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.planner-week-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

#plannerWeekLabel {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  min-width: 130px;
  text-align: center;
}

.planner-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.planner-day {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.planner-day-header {
  text-align: center;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.planner-day-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.planner-day-num {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  display: block;
  line-height: 1.2;
}

.planner-day.today .planner-day-name { color: var(--sea); }
.planner-day.today .planner-day-num {
  background: var(--sea);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.planner-meals {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.planner-meal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  cursor: default;
}

.planner-meal-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.planner-meal-recipe {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-meal-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  line-height: 1;
}

.planner-meal-card:hover .planner-meal-remove { display: flex; }
.planner-meal-remove:hover { color: var(--tomato); background: rgba(191,73,53,0.1); }

.planner-add-btn {
  width: 100%;
  height: 32px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.planner-add-btn:hover {
  border-color: var(--sea);
  color: var(--sea);
  background: rgba(76,127,90,0.05);
}

.planner-modal { max-width: 420px; }

/* ── RECIPE CARD PLANNER SHORTCUT ─────────────── */
.plan-recipe-btn {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  min-width: 2.5rem;
  padding: 0;
  color: var(--olive-dark);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.plan-recipe-btn svg { width: 1.1rem; height: 1.1rem; }
.plan-recipe-btn:hover { background: var(--surface); border-color: var(--sea); color: var(--sea); }

@media (max-width: 768px) {
  .planner-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
  .planner-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── PLANNER NAV FIX ──────────────────────────── */
.planner-nav-text {
  display: block !important;
  color: #B7CEB9 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  height: auto !important;
  min-height: 1em !important;
  overflow: visible !important;
  white-space: nowrap;
  flex: 1;
  line-height: normal !important;
}

.planner-nav-item.active .planner-nav-text {
  color: var(--ink) !important;
}

/* ── SIDEBAR SCROLLBAR INVISÍVEL ─────────────── */
.sidebar { scrollbar-width: none; }
.sidebar::-webkit-scrollbar { display: none; }

/* ── CARD PHOTO ACTION BUTTONS ────────────────── */
.card-photo-actions {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  z-index: 3;
}

.card-photo-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.9);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  backdrop-filter: blur(4px);
}

.card-photo-btn svg { width: 13px; height: 13px; }
.card-photo-btn:hover { background: #fff; color: var(--ink); }
.card-photo-btn.delete-recipe:hover { color: var(--tomato); }
