/* Le Val — Design métallique 2026
   Refonte visuelle : surfaces gunmetal brossé, biseaux chromés,
   reflets d'acier, accent platine froid. Compatible avec les classes existantes. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* Surfaces — dégradés d'acier appliqués via --metal-* */
  --bg: #0b0d10;
  --surface: #171b20;
  --surface-2: #1d2228;
  --panel: rgba(29, 34, 40, 0.72);
  --line: rgba(198, 214, 232, 0.14);
  --soft: rgba(210, 224, 240, 0.06);
  /* Reflets et biseaux métalliques */
  --bevel-top: rgba(255, 255, 255, 0.14);
  --bevel-bottom: rgba(0, 0, 0, 0.4);
  --metal: linear-gradient(160deg, #232a31 0%, #191d23 48%, #13161b 100%);
  --metal-2: linear-gradient(160deg, #2a323a 0%, #1e242b 52%, #171b21 100%);
  --chrome: linear-gradient(150deg, #e8eef4 0%, #aebccb 26%, #7d8b9c 52%, #b7c4d2 74%, #dfe7ef 100%);
  --steel: linear-gradient(145deg, #d3dbe4 0%, #97a6b6 40%, #6f7f90 60%, #b6c2ce 100%);
  /* Texte */
  --text: #eef2f6;
  --muted: #9aa7b4;
  /* Accents (noms de tokens conservés pour compat) — platine/acier froid */
  --cyan: #c7d3e0;
  --green: #dbe4ee;
  --violet: #b6c2d4;
  --warning: #d8b46a;
  --danger: #e08a8a;
  --accent-soft: rgba(190, 205, 222, 0.12);
  /* Élévation */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.32), 0 10px 30px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  /* Rayons */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
body {
  background:
    radial-gradient(1200px 600px at 78% -8%, rgba(190, 205, 222, 0.09), transparent 60%),
    radial-gradient(900px 500px at 4% 8%, rgba(120, 140, 165, 0.07), transparent 55%),
    linear-gradient(180deg, #101318, #0b0d10);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
::selection { background: var(--accent-soft); color: var(--text); }

/* Fonds ambiants — blobs doux façon mesh gradient */
.space-background { position: fixed; z-index: -1; inset: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(85px); opacity: 0.32; }
.orb-a { top: -8%; right: -4%; width: 460px; height: 460px; background: radial-gradient(circle, rgba(206, 220, 236, 0.42), transparent 68%); animation: drift 26s ease-in-out infinite; }
.orb-b { bottom: -12%; left: -6%; width: 420px; height: 420px; background: radial-gradient(circle, rgba(120, 140, 165, 0.4), transparent 68%); animation: drift 32s ease-in-out infinite reverse; }
.orb-c { top: 42%; left: 46%; width: 300px; height: 300px; background: radial-gradient(circle, rgba(170, 188, 208, 0.3), transparent 68%); animation: drift 38s ease-in-out infinite; }

/* Layout */
.app-shell { display: flex; min-height: 100vh; }
.main-content { width: min(1440px, 100%); padding: 32px clamp(20px, 4vw, 56px) 72px; margin: 0 auto; }

/* Sidebar */
.sidebar {
  position: sticky; top: 0; align-self: flex-start;
  width: 264px; flex: 0 0 264px; height: 100vh;
  padding: 26px 16px; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #20262d 0%, #171b21 55%, #0f1216 100%);
  border-right: 1px solid var(--line);
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.5), inset 1px 0 0 var(--bevel-top);
  backdrop-filter: blur(18px);
}
.brand { display: flex; gap: 12px; align-items: center; margin: 4px 10px 44px; }
.brand strong { display: block; font-size: 1.12rem; font-weight: 700; color: #fff; font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.01em; }
.brand small { color: var(--muted); font-size: 0.78rem; }
.brand-mark {
  display: grid; width: 40px; height: 40px; place-items: center;
  color: #1b2027; font-weight: 800; font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem;
  border-radius: 12px; background: var(--steel);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 4px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}
.nav { display: grid; gap: 4px; }
.nav-link {
  display: flex; gap: 13px; align-items: center; padding: 11px 13px;
  color: var(--muted); font-weight: 500; text-align: left;
  border: 0; border-radius: var(--r-sm); background: transparent;
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-link span { width: 22px; font-size: 1.12rem; text-align: center; opacity: 0.9; }
.nav-link:hover { color: var(--text); background: var(--soft); }
.nav-link.active { color: var(--text); font-weight: 600; background: linear-gradient(160deg, rgba(210, 224, 240, 0.16), rgba(210, 224, 240, 0.05)); box-shadow: inset 0 1px 0 var(--bevel-top), inset 0 0 0 1px var(--line); }
.nav-link.active span { color: #eef4fb; }
.sidebar-note { margin-top: auto; padding: 14px; color: var(--muted); font-size: 0.8rem; line-height: 1.7; border-top: 1px solid var(--line); }
.sidebar-note small { color: #6b7885; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #d1d5db; }
.sidebar-note[data-status="ok"] .live-dot { background: #cfe0ee; box-shadow: 0 0 0 4px rgba(207, 224, 238, 0.16); }
.sidebar-note[data-status="checking"] .live-dot { background: var(--warning); box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.16); }
.sidebar-note[data-status="error"] .live-dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.16); }

/* Topbar */
.topbar, .section-heading, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar { margin-bottom: 30px; }
.topbar h1, h2, h3 { margin: 0; }
.topbar h1 { font-size: 1.7rem; font-weight: 700; font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.02em; }
.topbar-actions { display: flex; gap: 12px; align-items: center; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.connection { color: var(--muted); font-size: 0.85rem; }
#connected-user { color: var(--muted); font-size: 0.85rem; }

/* Vues */
.view { display: none; }
.view.active { display: block; animation: fade 0.32s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Bandeau d'accueil */
.welcome {
  position: relative;
  display: flex; justify-content: space-between; align-items: center;
  min-height: 180px; padding: 32px 38px; margin-bottom: 24px; overflow: hidden;
  color: #eef4fb; border-radius: var(--r-xl);
  background: linear-gradient(125deg, #2b333c 0%, #1c2229 46%, #262d35 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 var(--bevel-top);
}
.welcome::before { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.07) 47%, rgba(255, 255, 255, 0.02) 55%, transparent 70%); pointer-events: none; }
.welcome h2 { margin: 0 0 10px; font-size: clamp(1.5rem, 3vw, 2.1rem); font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.02em; }
.welcome p:last-child { margin: 0; color: rgba(238, 244, 251, 0.7); }
.welcome-icon { margin-right: 6%; color: #c7d3e0; font-size: 4.5rem; opacity: 0.85; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4)); }

/* Métriques */
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.metric {
  position: relative; padding: 22px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--metal); box-shadow: var(--shadow-sm), inset 0 1px 0 var(--bevel-top);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.metric:hover { transform: translateY(-3px); border-color: rgba(210, 224, 240, 0.28); }
.metric::after { position: absolute; right: -22px; bottom: -28px; width: 84px; height: 84px; content: ''; border-radius: 50%; background: currentColor; opacity: 0.18; filter: blur(2px); }
.metric span, .metric small { display: block; color: var(--muted); font-size: 0.82rem; }
.metric strong { display: block; margin: 12px 0 5px; color: var(--text); font-size: 1.75rem; font-family: 'Space Grotesk', sans-serif; }
.metric-green { color: #cdd9e6; }
.metric-orange { color: #d8b46a; }
.metric-blue { color: #9fb2c6; }
.metric-purple { color: #b4bdd0; }

/* Panneaux */
.split-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; }
.panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--metal); box-shadow: var(--shadow-sm), inset 0 1px 0 var(--bevel-top); }
.panel h2 { font-size: 1.15rem; font-weight: 600; }
.quick-panel {
  position: relative; overflow: hidden;
  color: #eef4fb; border-color: var(--line);
  background: linear-gradient(150deg, #2c343d 0%, #1b2128 55%, #232a32 100%);
}
.quick-panel::before { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.08) 50%, transparent 68%); pointer-events: none; }
.quick-panel .eyebrow { color: #c7d3e0; }
.quick-panel p { color: rgba(238, 244, 251, 0.7); line-height: 1.6; }
.quick-panel h2 { margin: 8px 0 14px; font-size: 1.4rem; font-family: 'Space Grotesk', sans-serif; }

/* Boutons */
.primary-button, .secondary-button, .text-button, .icon-button { border: 0; border-radius: var(--r-sm); transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease, color 0.18s ease; }
.primary-button:active, .secondary-button:active, .icon-button:active { transform: translateY(1px); }
.primary-button {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px;
  color: #1b2027; font-weight: 700;
  background: var(--steel);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -2px 4px rgba(0, 0, 0, 0.28);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}
.primary-button:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -2px 5px rgba(0, 0, 0, 0.3); filter: brightness(1.05); }
.secondary-button {
  padding: 10px 15px; color: var(--text); font-weight: 600;
  border: 1px solid var(--line); background: var(--metal-2);
  box-shadow: inset 0 1px 0 var(--bevel-top);
}
.secondary-button:hover { border-color: rgba(210, 224, 240, 0.3); filter: brightness(1.12); }
.text-button { padding: 0; color: var(--cyan); background: transparent; font-size: 0.85rem; font-weight: 600; }
.text-button:hover { color: #fff; }
.icon-button {
  display: grid; place-items: center; width: 40px; height: 40px;
  color: var(--text); border: 1px solid var(--line); background: var(--metal-2); border-radius: var(--r-sm);
  box-shadow: inset 0 1px 0 var(--bevel-top);
}
.icon-button:hover { border-color: rgba(210, 224, 240, 0.3); filter: brightness(1.12); }

/* Tables */
.table-wrap { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { padding: 10px 10px; color: var(--muted); font-size: 0.68rem; font-weight: 700; text-align: left; text-transform: uppercase; letter-spacing: 0.1em; }
td { padding: 14px 10px; border-top: 1px solid var(--soft); color: var(--text); }
tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: var(--soft); }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); font-size: 0.75rem; }
.cost-badge { display: inline-block; padding: 5px 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; }
.cost-badge.warning { color: #e0c07d; background: rgba(216, 180, 106, 0.16); }
.cost-badge.danger { color: #e79b9b; background: rgba(224, 138, 138, 0.16); }
.table-action { padding: 7px 11px; color: var(--text); font-size: 0.78rem; font-weight: 700; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--metal-2); box-shadow: inset 0 1px 0 var(--bevel-top); }
.table-action:hover { border-color: rgba(210, 224, 240, 0.3); filter: brightness(1.15); }
.reference-toolbar { margin-bottom: 16px; }
.reference-toolbar input { width: min(360px, 100%); }
.reference-modal-card { width: min(680px, 100%); }
.reference-modal-card h2 { margin-bottom: 22px; }

/* Export modal */
.export-modal-card { width: min(820px, 100%); }
.export-help { color: var(--muted); }
.export-toolbar { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 10px; color: var(--muted); font-size: 0.82rem; }
.check-all { display: flex; gap: 8px; align-items: center; color: var(--cyan); font-weight: 700; }
.check-all input { width: auto; }
.export-recipes-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 48vh; padding: 8px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.export-recipe-option { display: grid; grid-template-columns: auto 42px 1fr; gap: 10px; align-items: center; padding: 8px; color: var(--text); cursor: pointer; border: 1px solid transparent; border-radius: var(--r-sm); background: var(--soft); transition: background 0.15s ease, border-color 0.15s ease; }
.export-recipe-option:hover { border-color: var(--line); background: rgba(255, 255, 255, 0.08); }
.export-recipe-option input { width: auto; }
.export-recipe-option span { width: 42px; height: 38px; display: grid; place-items: center; overflow: hidden; color: var(--green); border-radius: 6px; background: var(--surface-2); }
.export-recipe-option img { width: 100%; height: 100%; object-fit: cover; }
.export-recipe-option strong, .export-recipe-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.export-recipe-option small { grid-column: 3; color: var(--muted); font-size: 0.7rem; }

/* En-têtes de section + toolbar */
.section-heading { align-items: flex-end; margin-bottom: 26px; }
.section-heading h2 { margin-bottom: 8px; font-size: 1.7rem; font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.02em; }
.section-heading p:not(.eyebrow) { margin: 0; color: var(--muted); }
.toolbar { display: flex; gap: 10px; }
input, select, textarea {
  width: 100%; padding: 11px 13px; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-sm); outline: none;
  background: var(--surface-2); transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder, textarea::placeholder { color: #64707d; }
input:focus, select:focus, textarea:focus { border-color: rgba(199, 211, 224, 0.6); box-shadow: 0 0 0 3px var(--accent-soft); }
.toolbar input { width: 220px; }
.toolbar select { width: 190px; }
.status { margin: 0 0 16px; color: var(--muted); }
.error { color: var(--danger) !important; }

/* Cartes recettes */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--metal); box-shadow: var(--shadow-sm), inset 0 1px 0 var(--bevel-top); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.card:hover { transform: translateY(-4px); border-color: rgba(210, 224, 240, 0.28); box-shadow: var(--shadow), inset 0 1px 0 var(--bevel-top); }
.card-top, .card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pill { max-width: 80%; overflow: hidden; color: var(--cyan); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.food-cost { color: var(--green); font-size: 0.78rem; font-weight: 600; }
.card h3 { margin: 18px 0 24px; font-size: 1.12rem; font-weight: 600; }
.card-bottom strong { font-size: 1.25rem; font-family: 'Space Grotesk', sans-serif; }
.card-bottom span { color: var(--muted); font-size: 0.8rem; }
.allergens { margin: 16px 0 0; padding-top: 12px; color: var(--violet); font-size: 0.74rem; line-height: 1.45; border-top: 1px solid var(--soft); }
.empty { padding: 44px; color: var(--muted); text-align: center; grid-column: 1 / -1; }
.dish-image, .dish-placeholder { width: 100%; height: 150px; margin: -4px 0 18px; border-radius: var(--r-sm); object-fit: contain; background: var(--surface-2); border: 1px solid var(--soft); }
.dish-placeholder { display: grid; place-items: center; color: #aebccb; font-size: 2.6rem; background: linear-gradient(135deg, #262d35, #1a1f26); box-shadow: inset 0 1px 0 var(--bevel-top); }
.recipe-card { cursor: pointer; }
.recipe-card:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.card-hint { display: block; margin-top: 16px; color: var(--cyan); font-size: 0.72rem; font-weight: 700; }

/* Formulaire recette */
.recipe-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 20px; }
.form-panel { display: grid; align-content: start; gap: 18px; }
.form-panel label, .edit-form label { display: grid; gap: 7px; color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.ingredient-line { display: grid; grid-template-columns: 1fr 90px 75px 30px; gap: 8px; margin-bottom: 10px; }
.ingredient-line input, .ingredient-line select { min-width: 0; padding: 9px; font-size: 0.8rem; }
.remove-line { display: grid; place-items: center; color: var(--danger); border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(248, 113, 113, 0.1); }
.remove-line:hover { background: rgba(248, 113, 113, 0.2); }
.recipe-total { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; margin-top: 8px; color: var(--muted); border-top: 1px solid var(--line); }
.recipe-total strong { color: var(--green); font-size: 1.45rem; font-family: 'Space Grotesk', sans-serif; }
.form-message { min-height: 20px; font-size: 0.85rem; }
.form-message.success { color: #cfe0ee; }
.form-message.error { color: var(--danger); }
.image-preview { width: 100%; max-height: 180px; border-radius: var(--r-sm); object-fit: cover; }

/* Modales */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(6, 9, 12, 0.66); backdrop-filter: blur(6px); }
.modal-card { position: relative; width: min(760px, 100%); max-height: 92vh; padding: 28px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--metal-2); box-shadow: var(--shadow-lg), inset 0 1px 0 var(--bevel-top); animation: pop 0.24s ease both; }
@keyframes pop { from { opacity: 0; transform: scale(0.97) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 15px; right: 18px; width: 34px; height: 34px; color: var(--muted); font-size: 1.5rem; line-height: 1; border: 1px solid var(--line); border-radius: 50%; background: var(--soft); transition: background 0.15s ease, color 0.15s ease; }
.modal-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-right: 40px; margin-bottom: 24px; }
.modal-header h2 { font-size: 1.5rem; font-family: 'Space Grotesk', sans-serif; }
.modal-image { width: 110px; height: 78px; border-radius: var(--r-sm); object-fit: cover; }
.edit-form { display: grid; gap: 16px; }
.edit-two-columns { display: grid; grid-template-columns: 1fr 180px; gap: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }

/* Thème clair */
.light-mode {
  --bg: #dfe4ea;
  --surface: #eef1f5;
  --surface-2: #e3e8ee;
  --panel: rgba(238, 241, 245, 0.8);
  --line: rgba(40, 56, 74, 0.16);
  --soft: rgba(40, 56, 74, 0.05);
  --bevel-top: rgba(255, 255, 255, 0.9);
  --bevel-bottom: rgba(90, 105, 120, 0.35);
  --metal: linear-gradient(160deg, #f4f6f9 0%, #e4e9ef 52%, #d7dde4 100%);
  --metal-2: linear-gradient(160deg, #eef1f5 0%, #e0e5eb 52%, #d3d9e0 100%);
  --steel: linear-gradient(145deg, #f4f7fa 0%, #c3cdd8 42%, #9aa8b6 60%, #dbe2e9 100%);
  --text: #1c2732;
  --muted: #59697a;
  --cyan: #4a5a6c;
  --green: #3f5162;
  --violet: #5a6478;
  --accent-soft: rgba(90, 105, 122, 0.12);
  --shadow-sm: 0 1px 2px rgba(40, 56, 74, 0.12);
  --shadow: 0 1px 2px rgba(40, 56, 74, 0.12), 0 12px 32px rgba(40, 56, 74, 0.14);
  --shadow-lg: 0 24px 60px rgba(40, 56, 74, 0.24);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 78% -8%, rgba(150, 168, 188, 0.28), transparent 60%),
    radial-gradient(900px 500px at 4% 8%, rgba(120, 140, 165, 0.2), transparent 55%),
    linear-gradient(180deg, #e6eaef, #d5dae1);
}
.light-mode .sidebar { background: linear-gradient(180deg, #f0f3f6 0%, #dde2e8 100%); box-shadow: inset -1px 0 0 rgba(90, 105, 120, 0.25), inset 1px 0 0 rgba(255, 255, 255, 0.8); }
.light-mode .brand strong { color: #1c2732; }
.light-mode .brand-mark { color: #26313d; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }
.light-mode .orb { opacity: 0.4; }
.light-mode .welcome { color: #1c2732; background: linear-gradient(125deg, #eef2f6 0%, #cfd8e1 50%, #e4e9ef 100%); }
.light-mode .welcome p:last-child { color: rgba(28, 39, 50, 0.7); }
.light-mode .welcome-icon { color: #7d8b9c; }
.light-mode .quick-panel { color: #1c2732; background: linear-gradient(150deg, #eef2f6 0%, #d3dce4 55%, #e4e9ef 100%); }
.light-mode .quick-panel .eyebrow { color: #4a5a6c; }
.light-mode .quick-panel p { color: rgba(28, 39, 50, 0.72); }
.light-mode .primary-button { color: #1c2732; }
.light-mode .dish-placeholder { color: #7d8b9c; background: linear-gradient(135deg, #e3e8ee, #cfd6de); }
.light-mode input::placeholder, .light-mode textarea::placeholder { color: #8695a5; }

/* Animations */
@keyframes drift { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(28px, -34px, 0); } }

/* Responsive */
@media (max-width: 900px) {
  .sidebar { width: 76px; flex-basis: 76px; padding: 22px 10px; }
  .brand { margin: 0 auto 40px; }
  .brand > div { display: none; }
  .nav-link { justify-content: center; padding: 13px 4px; }
  .nav-link span { font-size: 1.2rem; }
  .nav-link:not(:has(span)) { font-size: 0; }
  .sidebar-note { display: none; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .split-grid, .recipe-layout { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .main-content { padding: 24px 15px 50px; }
  .topbar { align-items: flex-start; }
  .connection, #connected-user { display: none; }
  .welcome { padding: 26px; }
  .welcome-icon { display: none; }
  .metric-grid { gap: 10px; }
  .metric { padding: 16px; }
  .metric strong { font-size: 1.35rem; }
  .section-heading { display: grid; align-items: start; }
  .toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .toolbar input, .toolbar select { width: 100%; }
  .ingredient-line { grid-template-columns: 1fr 70px 55px 28px; gap: 5px; }
  .modal { padding: 8px; }
  .modal-card { padding: 22px 16px; max-height: 96vh; }
  .modal-header { align-items: flex-start; }
  .modal-image { width: 82px; height: 64px; }
  .edit-two-columns { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
