:root{
  --bg:#0A0A0A;
  --bg-elevated:#131311;
  --surface:#18170F;
  --surface-2:#1D1B12;
  --protein:#FF4C2B;
  --carbs:#FFC24C;
  --fat:#4CC9FF;
  --text:#F5F3EE;
  --text-muted:#8C897F;
  --text-faint:#5A584F;
  --line:#2A281F;
  --line-bright:#3A3627;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  background:var(--bg);
  color:var(--text);
  font-family:'Inter', sans-serif;
  line-height:1.5;
}
::selection{ background:var(--protein); color:#0A0A0A; }
a{ color:inherit; text-decoration:none; }
img,svg{ display:block; max-width:100%; }
.mono{ font-family:'JetBrains Mono', monospace; }
h1,h2,h3{
  font-family:'Bricolage Grotesque', sans-serif;
  font-weight:800;
  letter-spacing:-0.02em;
  line-height:1.08;
}
:focus-visible{ outline:2px solid var(--protein); outline-offset:3px; }

.wrap{ max-width:1180px; margin:0 auto; padding:0 32px; }

/* ---- Nav (public) ---- */
header.site-header{
  position:sticky; top:0; z-index:100;
  background:rgba(10,10,10,0.9);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 32px; max-width:1180px; margin:0 auto;
}
.logo{
  font-family:'Bricolage Grotesque', sans-serif;
  font-weight:800; font-size:20px;
  display:inline-flex; align-items:center;
}
.logo img{ display:block; }
.nav-links{ display:flex; gap:28px; align-items:center; }
.nav-links a{ font-size:14px; color:var(--text-muted); transition:color .2s; }
.nav-links a:hover, .nav-links a.active{ color:var(--text); }
@media(max-width:760px){ .nav-links{ gap:16px; } }

.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:11px 22px; background:var(--protein); color:#0A0A0A;
  font-weight:600; font-size:14px; border:none; border-radius:999px;
  cursor:pointer; transition:transform .2s, box-shadow .2s;
}
.btn:hover{ transform:translateY(-1px); box-shadow:0 8px 24px rgba(255,76,43,0.25); }
.btn-ghost{ background:none; border:1px solid var(--line-bright); color:var(--text); }
.btn-ghost:hover{ border-color:var(--protein); box-shadow:none; }
.btn-sm{ padding:7px 14px; font-size:13px; }
.btn-danger{ background:none; border:1px solid #5A2A22; color:#FF8266; }
.btn-danger:hover{ border-color:#FF4C2B; box-shadow:none; }
.btn:disabled{ opacity:.5; cursor:not-allowed; transform:none; box-shadow:none; }

/* ---- Page header ---- */
.page-hero{ padding:64px 0 40px; border-bottom:1px solid var(--line); }
.eyebrow{
  font-family:'JetBrains Mono', monospace; font-size:12px; color:var(--protein);
  text-transform:uppercase; letter-spacing:0.12em; margin-bottom:14px;
  display:flex; align-items:center; gap:10px;
}
.eyebrow::before{ content:''; width:7px; height:7px; border-radius:50%; background:var(--protein); box-shadow:0 0 0 4px rgba(255,76,43,0.18); }
.page-hero h1{ font-size:clamp(32px,4.4vw,48px); margin-bottom:12px; }
.page-hero p{ color:var(--text-muted); font-size:16px; max-width:560px; }

/* ---- Recipe grid + nutrition-label cards ---- */
.recipe-grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(270px,1fr));
  gap:24px; padding:48px 0;
}
.label-card{
  background:var(--surface); border:1px solid var(--line); border-radius:14px;
  overflow:hidden; display:flex; flex-direction:column; transition:border-color .2s, transform .2s;
}
.label-card:hover{ border-color:var(--line-bright); transform:translateY(-2px); }
.label-photo{
  height:160px; background:linear-gradient(135deg, var(--bg-elevated), #201d13);
  position:relative; display:flex; align-items:center; justify-content:center;
}
.label-photo img{ width:100%; height:100%; object-fit:cover; }
.label-photo .tag{
  position:absolute; top:12px; left:12px; font-family:'JetBrains Mono', monospace; font-size:11px;
  background:rgba(10,10,10,0.6); border:1px solid var(--line-bright); padding:4px 9px; border-radius:999px;
}
.label-body{ padding:20px 20px 22px; display:flex; flex-direction:column; gap:14px; flex:1; }
.label-title{ font-family:'Bricolage Grotesque', sans-serif; font-weight:700; font-size:18px; }
.label-desc{ color:var(--text-muted); font-size:13.5px; }
.nutrition-facts{ border-top:3px solid var(--text); border-bottom:3px solid var(--text); padding:10px 0; margin-top:auto; }
.nf-head{
  font-family:'JetBrains Mono', monospace; font-size:10px; text-transform:uppercase; letter-spacing:0.1em;
  color:var(--text-faint); display:flex; justify-content:space-between; padding-bottom:8px;
  border-bottom:1px solid var(--line-bright); margin-bottom:6px;
}
.nf-row{
  display:flex; justify-content:space-between; align-items:center; padding:5px 0;
  border-bottom:1px solid var(--line); font-size:13px;
}
.nf-row:last-child{ border-bottom:none; }
.nf-row .name{ display:flex; align-items:center; gap:8px; color:var(--text-muted); }
.nf-row .name .sw{ width:7px; height:7px; border-radius:2px; }
.nf-row .val{ font-family:'JetBrains Mono', monospace; font-weight:700; }

/* ---- Recipe detail page ---- */
.recipe-detail{ padding:48px 0 90px; }
.recipe-detail-grid{ display:grid; grid-template-columns:1.1fr 0.9fr; gap:56px; align-items:start; }
@media(max-width:900px){ .recipe-detail-grid{ grid-template-columns:1fr; } }
.recipe-hero-img{
  aspect-ratio:4/3; border-radius:16px; overflow:hidden;
  background:linear-gradient(135deg, var(--bg-elevated), #201d13);
}
.recipe-hero-img img{ width:100%; height:100%; object-fit:cover; }
.recipe-detail h1{ font-size:clamp(28px,3.6vw,40px); margin-bottom:14px; }
.recipe-detail .lead{ color:var(--text-muted); font-size:16px; margin-bottom:24px; }
.recipe-meta{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:28px; }
.meta-pill{
  font-family:'JetBrains Mono', monospace; font-size:12px; background:var(--surface-2);
  border:1px solid var(--line-bright); padding:5px 12px; border-radius:999px;
}
.section-label{
  font-family:'JetBrains Mono', monospace; font-size:12px; text-transform:uppercase;
  letter-spacing:0.1em; color:var(--text-faint); margin-bottom:14px;
}
.ingredient-list{ list-style:none; }
.ingredient-list li{
  display:flex; gap:10px; padding:9px 0; border-bottom:1px solid var(--line); font-size:14.5px;
}
.ingredient-list li::before{ content:'—'; color:var(--protein); }
.step-list{ list-style:none; counter-reset:step; }
.step-list li{
  counter-increment:step; padding:14px 0 14px 44px; border-bottom:1px solid var(--line);
  position:relative; font-size:14.5px; color:var(--text-muted); line-height:1.6;
}
.step-list li::before{
  content:counter(step); position:absolute; left:0; top:12px;
  width:28px; height:28px; border-radius:50%; background:var(--surface-2); border:1px solid var(--line-bright);
  color:var(--protein); font-family:'JetBrains Mono', monospace; font-size:12px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
}

/* ---- Lang switch (shared) ---- */
.lang-switch{
  display:flex; border:1px solid var(--line-bright); border-radius:999px; overflow:hidden;
  font-family:'JetBrains Mono', monospace; font-size:11px;
}
.lang-switch button{
  background:none; border:none; color:var(--text-muted); padding:6px 12px; cursor:pointer;
  font-family:inherit; font-size:inherit; transition:background .2s, color .2s;
}
.lang-switch button.active{ background:var(--protein); color:#0A0A0A; font-weight:700; }

/* ---- Footer ---- */
footer.site-footer{ border-top:1px solid var(--line); padding:40px 0 30px; margin-top:60px; }
.footer-bottom{
  display:flex; justify-content:space-between; color:var(--text-faint); font-size:12px;
  font-family:'JetBrains Mono', monospace; flex-wrap:wrap; gap:10px;
}

/* ---- Empty state ---- */
.empty-state{
  text-align:center; padding:80px 20px; color:var(--text-muted);
  border:1px dashed var(--line-bright); border-radius:16px;
}

/* =====================================================
   ADMIN
   ===================================================== */
.admin-body{ display:flex; min-height:100vh; }
.admin-sidebar{
  width:220px; flex-shrink:0; background:var(--bg-elevated); border-right:1px solid var(--line);
  position:fixed; top:0; left:0; bottom:0; padding:26px 18px; display:flex; flex-direction:column;
}
.admin-sidebar .logo{ padding:0 8px; margin-bottom:34px; }
.admin-nav a{
  display:block; padding:10px 12px; border-radius:8px; font-size:14px; color:var(--text-muted);
  margin-bottom:2px; transition:background .15s, color .15s;
}
.admin-nav a:hover{ background:var(--surface); color:var(--text); }
.admin-nav a.active{ background:var(--surface-2); color:var(--text); border:1px solid var(--line-bright); }
.admin-sidebar .spacer{ flex:1; }
.admin-user{ font-size:12px; color:var(--text-faint); padding:0 12px 10px; font-family:'JetBrains Mono', monospace; }
.admin-main{ margin-left:220px; flex:1; padding:36px 44px; max-width:980px; }
@media(max-width:760px){
  .admin-sidebar{ position:static; width:100%; flex-direction:row; align-items:center; }
  .admin-main{ margin-left:0; padding:24px; }
}

.admin-topbar{ display:flex; justify-content:space-between; align-items:center; margin-bottom:28px; }
.admin-topbar h1{ font-size:24px; }

.admin-card{ background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:26px; }

table.admin-table{ width:100%; border-collapse:collapse; }
table.admin-table th{
  text-align:left; font-family:'JetBrains Mono', monospace; font-size:11px; text-transform:uppercase;
  letter-spacing:0.06em; color:var(--text-faint); padding:10px 12px; border-bottom:1px solid var(--line-bright);
}
table.admin-table td{ padding:12px; border-bottom:1px solid var(--line); font-size:14px; vertical-align:middle; }
table.admin-table tr:last-child td{ border-bottom:none; }
.status-dot{ width:8px; height:8px; border-radius:50%; display:inline-block; margin-right:6px; }
.status-dot.on{ background:#5FDD8F; }
.status-dot.off{ background:var(--text-faint); }
.table-actions{ display:flex; gap:8px; }

.form-group{ margin-bottom:20px; }
.form-row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media(max-width:600px){ .form-row{ grid-template-columns:1fr; } }
label{ display:block; font-size:13px; color:var(--text-muted); margin-bottom:7px; font-weight:500; }
input[type=text], input[type=number], input[type=email], input[type=password], input[type=url], textarea{
  width:100%; background:var(--bg); border:1px solid var(--line-bright); border-radius:8px;
  padding:11px 13px; color:var(--text); font-family:'Inter', sans-serif; font-size:14px;
}
textarea{ resize:vertical; min-height:100px; font-family:'JetBrains Mono', monospace; font-size:13px; line-height:1.6; }
input:focus, textarea:focus{ outline:none; border-color:var(--protein); }
.hint{ font-size:12px; color:var(--text-faint); margin-top:6px; }
.checkbox-row{ display:flex; align-items:center; gap:10px; }
.checkbox-row input{ width:auto; }
.image-preview{ margin-bottom:12px; }
.image-preview img{ max-width:220px; max-height:140px; border-radius:8px; border:1px solid var(--line-bright); object-fit:cover; }

.alert{ padding:12px 16px; border-radius:8px; font-size:14px; margin-bottom:22px; }
.alert-success{ background:rgba(95,221,143,0.1); border:1px solid #2E5C40; color:#8FE8AF; }
.alert-error{ background:rgba(255,76,43,0.1); border:1px solid #5A2A22; color:#FF8266; }

.login-shell{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px; }
.login-box{ width:100%; max-width:380px; }
.login-box .logo{ text-align:center; margin-bottom:28px; font-size:24px; }
