:root {
  /* ---- Dark (default surfaces) ---- */
  --bg: #0e1014;
  --panel: #161922;
  --panel-2: #1d212b;
  --panel-3: #252a36;            /* hover / raised surface */
  --border: #2a2f3a;
  --border-2: #363c4a;           /* stronger border (input hover) */
  --text: #e7e9ee;
  --muted: #9aa3b2;
  --muted-2: #6b7385;            /* dimmer labels/placeholders */

  /* brand — unchanged */
  --brand: #ee3a24;   /* SIPO red  (logo top) */
  --brand-2: #f7a01c; /* SIPO amber (logo bottom) */
  --accent: #4f8cff;  /* the blue used ad-hoc, now a real token */
  --success: #16a34a;
  --danger: #e5484d;
  --brand-grad: linear-gradient(135deg, var(--brand), var(--brand-2));
  --brand-shadow: 0 3px 12px rgba(238,58,36,.34);
  --brand-soft: color-mix(in srgb, var(--brand) 14%, transparent);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);

  /* ---- Radius scale ---- */
  --r-xs: 6px; --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-xl: 18px; --r-full: 999px;
  /* ---- Spacing scale ---- */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px;
  /* ---- Shadow scale (soft, layered) ---- */
  --sh-1: 0 1px 2px rgba(0,0,0,.28);
  --sh-2: 0 2px 6px rgba(0,0,0,.30), 0 1px 2px rgba(0,0,0,.24);
  --sh-3: 0 8px 24px rgba(0,0,0,.34), 0 2px 6px rgba(0,0,0,.24);
  --sh-4: 0 18px 48px rgba(0,0,0,.44), 0 6px 16px rgba(0,0,0,.28);
  --sh-pop: 0 12px 34px rgba(0,0,0,.45);
  /* ---- Focus ring ---- */
  --ring: 0 0 0 3px color-mix(in srgb, var(--brand) 32%, transparent);
  --ring-accent: 0 0 0 3px color-mix(in srgb, var(--accent) 32%, transparent);
  /* ---- Motion ---- */
  --ease: cubic-bezier(.2,.6,.2,1);
  --t-fast: 120ms var(--ease);
  --t-med: 180ms var(--ease);

  --font-ui: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Space Grotesk', 'Plus Jakarta Sans', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', Menlo, Monaco, Consolas, monospace;
}
body.light {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --panel-2: #f2f3f5;
  --panel-3: #eceef1;
  --border: #e6e8ec;
  --border-2: #e0e3e8;
  --text: #16181d;
  --muted: #6b727c;
  --muted-2: #8b929c;
  --brand-soft: color-mix(in srgb, var(--brand) 10%, transparent);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --sh-1: 0 1px 2px rgba(20,24,31,.05);
  --sh-2: 0 2px 6px rgba(20,24,31,.07), 0 1px 2px rgba(20,24,31,.05);
  /* soft, layered card lift — the design's signature shadow */
  --sh-3: 0 8px 18px -6px rgba(20,24,31,.10), 0 1px 2px rgba(20,24,31,.05);
  --sh-4: 0 18px 44px -10px rgba(20,24,31,.16), 0 6px 16px rgba(20,24,31,.07);
  --sh-pop: 0 18px 46px rgba(20,24,31,.18);
  --brand-shadow: 0 3px 12px rgba(238,58,36,.28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* one consistent focus-visible ring for the whole chrome */
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: none; box-shadow: var(--ring); border-color: var(--brand);
}
/* the SIPO STUDIO wordmark + hero heading use the display font */
.brand, .brand-inline b, .login-welcome, .topbar-left b { font-family: var(--font-display); letter-spacing: -0.2px; }
/* big screen headings — bold Space Grotesk, tight tracking (matches the design) */
.dash-head h1, .choose-main h1, .login-hero h1 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -1px; line-height: 1.06;
}
.dash-head h1 { font-size: 34px; }

.view { display: none; height: 100vh; flex-direction: column; }
.view.active { display: flex; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--brand-grad); color: #fff; border: none; border-radius: 12px;
  padding: 11px 18px; font-family: var(--font-ui); font-weight: 700; font-size: 14.5px;
  cursor: pointer; box-shadow: var(--brand-shadow);
  transition: filter var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 6px 18px rgba(238,58,36,.34); }
.btn-primary:active { transform: translateY(1px); filter: brightness(.98); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; filter: none; box-shadow: none; }
.btn-primary.full { width: 100%; margin-top: var(--s-2); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  background: var(--panel); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 8px 13px; font-family: var(--font-ui);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.btn-ghost:hover { background: var(--panel-2); border-color: var(--border-2); }
.btn-ghost:active { background: var(--panel-3); }
.btn-ghost:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost.icon { padding: 0; width: 34px; height: 34px; font-size: 15px; line-height: 1; }
.btn-ghost.icon i { font-size: 15px; }
.btn-ghost.danger:hover { border-color: var(--danger); color: var(--danger); }

/* custom scrollbars (builder chrome only — the #preview iframe is unaffected) */
.sidebar, .drawer-scroll, .saved-list, .tool-rail, #code, .add-drawer, .menu-pop, .modal-card, #theme-pop {
  scrollbar-width: thin; scrollbar-color: var(--border-2) transparent;
}
.sidebar::-webkit-scrollbar, .drawer-scroll::-webkit-scrollbar, .saved-list::-webkit-scrollbar,
.tool-rail::-webkit-scrollbar, #code::-webkit-scrollbar, .modal-card::-webkit-scrollbar { width: 10px; height: 10px; }
.sidebar::-webkit-scrollbar-thumb, .drawer-scroll::-webkit-scrollbar-thumb, .saved-list::-webkit-scrollbar-thumb,
.tool-rail::-webkit-scrollbar-thumb, #code::-webkit-scrollbar-thumb, .modal-card::-webkit-scrollbar-thumb {
  background: var(--border-2); border-radius: var(--r-full); border: 2px solid transparent; background-clip: content-box;
}
.sidebar::-webkit-scrollbar-thumb:hover, .drawer-scroll::-webkit-scrollbar-thumb:hover { background: var(--muted-2); background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- site colour theme (top bar) ---------- */
.colour-wheel {
  width: 20px; height: 20px; border-radius: 50%; display: inline-block; vertical-align: middle;
  background: conic-gradient(#ee3a24, #f7a01c, #f5d020, #6ac04a, #3aa6f0, #8a5cf0, #ee3a24);
  box-shadow: inset 0 0 0 3px var(--panel);
}
#theme-pop {
  position: fixed; z-index: 1000; width: 300px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-4); padding: 16px; color: var(--text); animation: modal-in var(--t-med);
}
#theme-pop h4 { font-family: var(--font-display); font-size: 16px; margin-bottom: 4px; }
#theme-pop .tp-sub { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.tp-modes { display: flex; gap: 8px; margin-bottom: 14px; }
.tp-mode { flex: 1; padding: 9px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2);
  color: var(--text); cursor: pointer; font-size: 13px; font-weight: 600; text-align: center; }
.tp-mode.on { border-color: var(--brand); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.tp-label { font-size: 12px; color: var(--muted); margin: 6px 0 8px; display: flex; justify-content: space-between; }
.tp-swatches { display: flex; flex-direction: column; gap: 8px; }
.tp-sw { display: flex; align-items: center; gap: 10px; }
.tp-sw input[type="color"] { width: 42px; height: 34px; border: 1px solid var(--border); border-radius: 8px; background: none; cursor: pointer; padding: 2px; }
.tp-sw .tp-hex { flex: 1; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; color: var(--text); font-size: 13px; font-family: monospace; }
.tp-sw .tp-role { font-size: 11px; color: var(--muted); min-width: 40px; }
.tp-sw .tp-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 15px; }
.tp-sw .tp-del:hover { color: #e5484d; }
#theme-pop .tp-actions { display: flex; gap: 8px; margin-top: 14px; }
#theme-pop .tp-actions .btn-ghost, #theme-pop .tp-actions .btn-primary { flex: 1; text-align: center; font-size: 13px; padding: 9px; }
.tp-add { width: 100%; margin-top: 8px; padding: 8px; border: 1px dashed var(--border); border-radius: 9px; background: none;
  color: var(--muted); cursor: pointer; font-size: 13px; }
.tp-add:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- social platform picker (sidebar) ---------- */
.social-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 2px; }
.social-pk { display: flex; align-items: center; justify-content: center; height: 40px; border: 1px solid var(--border);
  border-radius: 9px; background: var(--panel-2); color: var(--text); font-size: 17px; cursor: pointer; transition: border-color .12s, color .12s; }
.social-pk:hover { border-color: var(--brand); color: var(--brand); }
.social-pk.on { border-color: var(--brand); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }

/* ---------- SIPO logo mark (real transparent logo — no background box) ---------- */
.sipo-logo { height: 32px; width: auto; flex-shrink: 0; display: inline-block; vertical-align: middle; object-fit: contain; }
.sipo-logo.sm { height: 26px; }
.brand-inline { display: flex; align-items: center; gap: 9px; }

/* ---------- Login / Register ---------- */
/* Desktop: two columns — showcase on the left, login card on the right.
   Mobile (≤900px): reverts to a single centred card (hero hidden). */
.login-wrap {
  flex: 1; display: flex; flex-direction: row; align-items: center; justify-content: center;
  gap: 64px; padding: 40px; position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 640px at 14% 4%, rgba(238,58,36,.22), transparent 58%),
    radial-gradient(1200px 760px at 88% 14%, rgba(247,160,28,.24), transparent 58%),
    radial-gradient(820px 560px at 50% 120%, rgba(238,58,36,.16), transparent 55%),
    var(--bg);
}
.login-panel { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 26px; }

/* left showcase */
.login-hero { position: relative; z-index: 1; flex: 0 1 500px; max-width: 520px; }
.login-hero > h1 {
  font-family: var(--font-display); font-size: clamp(34px, 3.4vw, 52px); line-height: 1.05;
  letter-spacing: -1px; color: var(--text); margin: 0 0 16px;
}
.login-hero > h1 span { background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-hero-sub { color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 440px; margin: 0 0 34px; }

/* CSS website mockups (browser windows previewing built sites) */
.login-mockups { position: relative; height: 300px; }
.lm-win { position: absolute; background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 26px 60px rgba(120,40,10,.22), 0 4px 16px rgba(0,0,0,.14); overflow: hidden; }
.lm-front { width: 320px; left: 8px; top: 30px; z-index: 2; }
.lm-back { width: 250px; left: 250px; top: 0; transform: rotate(5deg); opacity: .92; z-index: 1; }
.lm-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.lm-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d9534f22; box-shadow: 14px 0 0 #f7a01c22, 28px 0 0 #4caf5022; }
.lm-bar b { margin-left: 22px; font-size: 10px; font-weight: 500; color: var(--muted); font-family: var(--font-ui); }
.lm-body { padding: 14px; }
.lm-hero { height: 74px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); position: relative; margin-bottom: 12px; }
.lm-hero-2 { background: linear-gradient(135deg, #3a3f52, #6b7280); height: 56px; }
.lm-hbtn { position: absolute; left: 12px; bottom: 12px; width: 56px; height: 14px; border-radius: 7px; background: rgba(255,255,255,.9); }
.lm-line { height: 9px; border-radius: 5px; background: var(--border); margin-bottom: 8px; }
.lm-line.w70 { width: 70%; } .lm-line.w60 { width: 60%; } .lm-line.w50 { width: 50%; } .lm-line.w40 { width: 40%; }
.lm-tiles { display: flex; gap: 8px; margin: 12px 0; }
.lm-tiles span { flex: 1; height: 44px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); }
.lm-cta { display: inline-block; padding: 7px 16px; border-radius: 20px; font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.lm-badge { position: absolute; right: -6px; bottom: 34px; z-index: 3; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 24px; background: var(--panel); border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0,0,0,.2); font-size: 12px; font-weight: 700; color: var(--text); }
.lm-badge i { color: var(--brand); }

@media (max-width: 900px) {
  .login-wrap { flex-direction: column; gap: 30px; padding: 24px; }
  .login-hero { display: none; }
  .login-panel { width: 100%; max-width: 400px; }
}
/* slow-drifting soft colour mesh behind everything (both themes) */
.login-wrap::after {
  content: ""; position: absolute; inset: -25%; z-index: 0; pointer-events: none;
  background: conic-gradient(from 0deg at 50% 50%,
    rgba(238,58,36,.10), rgba(247,160,28,.12), rgba(238,58,36,.06),
    rgba(247,160,28,.12), rgba(238,58,36,.10));
  filter: blur(70px); opacity: .75;
}
@media (prefers-reduced-motion: no-preference) {
  .login-wrap::after { animation: bx-spin 44s linear infinite; }
}
@keyframes bx-spin { to { transform: rotate(360deg); } }
body.light .login-wrap::after { opacity: .55; }

.login-welcome {
  display: none; /* desktop: the left hero carries the heading; shown on mobile */
  position: relative; z-index: 1; margin: 0; text-align: center;
  font-size: clamp(28px, 5vw, 44px); font-weight: 800; letter-spacing: -0.5px; color: var(--text);
}
.login-welcome span {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* extras that fill out the mobile login (desktop uses the left hero instead) */
.login-tagline, .login-features, .login-foot-note { display: none; }
.login-tagline { color: var(--muted); font-size: 15px; line-height: 1.5; text-align: center; max-width: 380px; margin: -6px auto 4px; }
.login-features { flex-direction: column; gap: 10px; width: 100%; max-width: 340px; margin-top: 4px; }
.login-features > div {
  display: flex; align-items: center; gap: 11px; padding: 12px 15px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--panel); color: var(--text); font-size: 14px; font-weight: 600;
}
.login-features > div i { color: var(--brand); width: 18px; text-align: center; }
.login-foot-note { color: var(--muted); font-size: 12px; text-align: center; margin-top: 4px; }

/* mobile: single-column look — welcome heading + tagline + card + features */
@media (max-width: 900px) {
  .login-wrap { justify-content: flex-start; padding: 78px 24px 40px; }
  .login-welcome { display: block; }
  .login-tagline, .login-foot-note { display: block; }
  .login-features { display: flex; }
}
.theme-toggle {
  position: absolute; top: 22px; right: 24px; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); cursor: pointer; font-size: 17px;
  display: flex; align-items: center; justify-content: center; transition: border-color .12s, transform .12s;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); transform: rotate(20deg); }

.login-card {
  position: relative; z-index: 1;
  width: min(380px, 100%); background: var(--panel); border: 1px solid var(--border);
  border-radius: 18px; padding: 34px; box-shadow: 0 30px 90px rgba(120,40,10,.28), 0 4px 14px rgba(0,0,0,.12);
}
.brand { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.brand span { background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { color: var(--muted); margin: 8px 0 22px; font-size: 14px; }
form label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; font-weight: 500; }
form input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 11px 13px; color: var(--text); font-size: 15px;
  font-family: var(--font-ui);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
form input::placeholder { color: var(--muted-2); }
form input:hover { border-color: var(--border-2); }
form input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); background: var(--panel); }
.login-foot { margin-top: 18px; font-size: 14px; color: var(--muted); display: flex; gap: 8px; justify-content: center; }
.login-foot a { color: var(--brand-2); text-decoration: none; }
.hint { margin-top: 16px; text-align: center; color: var(--muted); font-size: 12px; }
.form-error { background: #3a1620; border: 1px solid #7a2230; color: #ffb3bf; padding: 10px 12px; border-radius: 9px; font-size: 14px; margin-bottom: 6px; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--border);
  box-shadow: var(--sh-1);
}
.topbar-left, .topbar-right, .topbar-center { display: flex; align-items: center; gap: 10px; }
.greeting { color: var(--muted); font-size: 13px; font-weight: 500; }

/* ---------- Choose cuisine ---------- */
.choose-main { flex: 1; overflow: auto; padding: 48px 32px; max-width: 1100px; margin: 0 auto; width: 100%; }
.choose-main h1 { font-size: 30px; }
.subtitle { color: var(--muted); margin: 8px 0 32px; }
.cuisine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.cuisine-card, .rest-card, .tpl-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 22px; cursor: pointer; position: relative; overflow: hidden; box-shadow: var(--sh-3);
  transition: transform var(--t-med), border-color var(--t-med), box-shadow var(--t-med);
}
.cuisine-card:hover, .rest-card:hover, .tpl-card:hover { transform: translateY(-3px); border-color: var(--border-2); box-shadow: var(--sh-4); }

/* rich dashboard restaurant card (thumbnail + status + ⋮ + domain + Edit) */
.rest-card { padding: 0; cursor: default; }
.rc-thumb { position: relative; height: 128px; display: grid; place-items: center; cursor: pointer;
  background: repeating-linear-gradient(45deg, var(--panel-2) 0 10px, var(--panel-3) 10px 20px);
  border-bottom: 1px solid var(--border); }
.rc-ph { color: var(--muted-2); font-size: 28px; opacity: .45; }
/* live scaled-down website preview inside the card thumbnail */
.rc-shot { position: absolute; top: 0; left: 0; width: 1280px; transform-origin: top left; border: 0; background: #fff; pointer-events: none; }
.rc-status, .rc-menu { z-index: 2; }
.rc-status { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-full); font-size: 11px; font-weight: 700; background: var(--panel); box-shadow: var(--sh-1); }
.rc-status .rc-dot { width: 7px; height: 7px; border-radius: 50%; }
.rc-status.live { color: #0f7a37; } .rc-status.live .rc-dot { background: var(--success); }
.rc-status.draft { color: #a9690f; } .rc-status.draft .rc-dot { background: var(--brand-2); }
.rc-menu { position: absolute; top: 11px; right: 11px; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; background: var(--panel); box-shadow: var(--sh-1); color: var(--muted); border: none; cursor: pointer; transition: var(--t-fast); }
.rc-menu:hover { color: var(--text); }
.rc-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 5px; }
.rc-body h3 { font-size: 17px; font-weight: 700; letter-spacing: -.2px; cursor: pointer; margin: 0; }
.rc-sub { font-size: 12.5px; color: var(--muted); }
.rc-domain { font-size: 12.5px; color: var(--muted-2); display: flex; align-items: center; gap: 6px; margin-top: 1px; overflow: hidden; cursor: pointer; }
.rc-domain.on { color: var(--muted); }
.rc-domain:hover, .rc-body h3[data-live]:hover { color: var(--accent); }
.rc-domain i { font-size: 11px; flex: none; }
.rc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.rc-meta { font-size: 12px; color: var(--muted-2); }
.btn-ghost.rc-edit { padding: 7px 13px; font-size: 12.5px; }
.cuisine-emoji { font-size: 40px; }
.cuisine-card h3 { margin: 12px 0 4px; font-size: 20px; }
.cuisine-card .cuisine-type { color: var(--muted); font-size: 13px; }
.cuisine-card .tagline { color: var(--muted); font-size: 13px; margin-top: 8px; }
.cuisine-swatch { position: absolute; top: 0; right: 0; width: 80px; height: 80px; border-radius: 0 0 0 80px; opacity: .35; }

/* dashboard search */
/* dashboard toolbar: search (left) + status filters (right) */
.dash-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 24px; }
.dash-toolbar[hidden] { display: none; }
.dash-search { position: relative; flex: 1 1 240px; max-width: 440px; }
.dash-search i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted-2); font-size: 14px; pointer-events: none;
}
.dash-search input {
  width: 100%; background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--r-full); padding: 11px 16px 11px 40px; font-size: 14.5px; font-family: var(--font-ui);
  box-shadow: var(--sh-1);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.dash-search input::placeholder { color: var(--muted-2); }
.dash-search input:hover { border-color: var(--border-2); }
.dash-search input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring-accent); }
.dash-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 600; color: var(--muted); background: var(--panel);
  border: 1px solid var(--border); cursor: pointer; transition: var(--t-fast);
}
.filter-chip:hover { border-color: var(--border-2); color: var(--text); }
.filter-chip.on { background: var(--text); color: var(--panel); border-color: transparent; }
.fc-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.fc-dot.live { background: var(--success); }
.fc-dot.draft { background: var(--brand-2); }
.filter-chip.on .fc-dot { box-shadow: 0 0 0 2px rgba(255,255,255,.25); }

/* dashboard header + add restaurant form */
.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.dash-head .subtitle { margin: 8px 0 0; }
.fld-label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
.rest-card .badge { display: inline-block; font-size: 11px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--border); border-radius: 20px; padding: 2px 9px; margin-top: 8px; }
.rest-actions { display: flex; gap: 8px; margin-top: 14px; }
.rest-actions .btn-ghost { padding: 6px 12px; font-size: 13px; }

/* small live preview thumbnail inside a template card */
.tpl-preview { position: relative; width: 100%; height: 150px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #fff; margin-bottom: 12px; }
.tpl-preview iframe { position: absolute; top: 0; left: 0; width: 1200px; height: 1000px; border: 0; transform: scale(0.235); transform-origin: top left; pointer-events: none; }
.tpl-card h3 { margin: 0 0 2px; font-size: 17px; }

/* ---------- Editor shell ---------- */
.editor-topbar { padding: 8px 14px; }
.editor-topbar .topbar-center { gap: 8px; }
.site-name {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--r-sm); padding: 7px 12px; font-size: 14px; width: 200px; font-weight: 600;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.site-name:hover { border-color: var(--border-2); }
.site-name:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); background: var(--panel); }
/* segmented control (device toggle) */
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 2px; gap: 2px; }
.seg-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--muted); padding: 6px 11px; cursor: pointer;
  font-size: 13px; border-radius: var(--r-xs); transition: background var(--t-fast), color var(--t-fast);
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--panel); color: var(--text); box-shadow: var(--sh-1); }

.editor-body { flex: 1; display: flex; min-height: 0; }

/* preview area */
.preview-wrap { flex: 1; min-width: 0; overflow: auto; background: #0a0b0e; display: flex; justify-content: center; padding: 22px; position: relative; }
/* collapse the left properties panel for a clean full-width preview */
.sb-toggle { position: absolute; top: 14px; left: 14px; z-index: 6; width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; background: var(--panel); color: var(--muted); border: 1px solid var(--border);
  box-shadow: var(--sh-2); cursor: pointer; transition: color var(--t-fast), border-color var(--t-fast); }
.sb-toggle:hover { color: var(--text); border-color: var(--border-2); }
.sb-toggle i { transition: transform var(--t-fast); }
.editor-body.sb-collapsed .sidebar { display: none; }
.editor-body.sb-collapsed .sb-toggle i { transform: rotate(180deg); }
.device-frame { width: 100%; height: 100%; background: #fff; border-radius: 8px; box-shadow: 0 10px 50px rgba(0,0,0,.5); transition: width .2s ease; }
.device-frame.tablet { width: 820px; }
.device-frame.mobile { width: 390px; }
#preview { width: 100%; height: 100%; border: none; border-radius: 8px; background: #fff; display: block; }

/* ---------- Left sidebar (properties / layers) ---------- */
.sidebar { width: 312px; flex: 0 0 312px; background: var(--panel); border-right: 1px solid var(--border); overflow-y: auto; overflow-x: hidden; }
.sb-empty { padding: 28px 20px; color: var(--muted); }
.sb-empty h4 { color: var(--text); font-size: 15px; margin-bottom: 8px; }
.sb-empty p { font-size: 13px; line-height: 1.6; }
.sb-tpl { margin-top: 18px; padding: 14px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }

.sb-head { position: sticky; top: 0; z-index: 2; background: var(--panel); border-bottom: 1px solid var(--border); padding: 12px 14px; }
.sb-crumbs { display: flex; flex-wrap: wrap; gap: 4px; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.sb-crumbs button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 11px; padding: 1px 3px; border-radius: 4px; }
.sb-crumbs button:hover { color: var(--text); background: var(--panel-2); }
.sb-crumbs .sep { opacity: .5; }
.sb-tag { display: flex; align-items: center; gap: 8px; }
.sb-tag .tag-name { font-weight: 700; font-size: 14px; color: var(--brand-2); text-transform: uppercase; letter-spacing: .04em; }
.sb-tools { display: flex; gap: 5px; margin-top: 10px; flex-wrap: wrap; }
.sb-tools button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--r-sm); padding: 0 9px; font-size: 13px; cursor: pointer; line-height: 1;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.sb-tools button:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.sb-tools button.danger:hover { border-color: var(--danger); color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }

.group { border-bottom: 1px solid var(--border); }
.group > summary {
  list-style: none; cursor: pointer; padding: 12px 14px; font-size: 11px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
  display: flex; justify-content: space-between; align-items: center; user-select: none;
  transition: color var(--t-fast);
}
.group > summary::-webkit-details-marker { display: none; }
.group > summary::after {
  content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 10px;
  opacity: .55; transition: transform var(--t-fast);
}
.group:not([open]) > summary::after { transform: rotate(-90deg); }
.group:hover > summary { color: var(--text); }
.group-body { padding: 4px 14px 16px; }

.row { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.row label { flex: 0 0 84px; font-size: 12px; color: var(--muted); }
.row .ctl { flex: 1; min-width: 0; }
.row.col { flex-direction: column; align-items: stretch; gap: 6px; }
.field {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 8px 11px; font-size: 13px; font-family: var(--font-ui);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.field::placeholder { color: var(--muted-2); }
.field:hover { border-color: var(--border-2); }
.field:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring-accent); background: var(--panel); }
select.field {
  appearance: none; padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239aa3b2' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
textarea.field { resize: vertical; min-height: 56px; font-family: inherit; }
input[type=range].field { padding: 0; accent-color: var(--brand); }
.swatch {
  width: 34px; height: 30px; padding: 3px; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); cursor: pointer; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.swatch:hover { border-color: var(--border-2); }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.quad { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.quad input { text-align: center; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--r-full); padding: 6px 11px; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.chip:hover { border-color: var(--border-2); background: var(--panel-3); }
.chip.on { background: var(--brand-grad); color: #fff; border-color: transparent; font-weight: 700; box-shadow: var(--sh-1); }
.hint-sm { font-size: 11px; color: var(--muted); margin-top: 4px; }
.hint-inline { font-size: 11px; color: var(--muted); margin-left: 8px; }
.upload-btn {
  display: block; text-align: center; background: var(--panel-2); border: 1px dashed var(--border-2);
  color: var(--muted); border-radius: var(--r-md); padding: 16px; cursor: pointer; font-size: 13px; font-weight: 600;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.upload-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* ---------- Add-element drawer ---------- */
.add-drawer { width: 280px; flex: 0 0 280px; background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; box-shadow: var(--sh-2); }
.add-drawer[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 13px 14px; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 700; font-family: var(--font-display); }
.drawer-scroll { overflow-y: auto; padding: 12px; }
.add-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 4px 8px; font-weight: 700; }
.add-cat:first-child { margin-top: 0; }
.add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.add-item {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 14px 8px; text-align: center; cursor: pointer; font-size: 12px; color: var(--text);
  transition: border-color var(--t-fast), transform var(--t-fast), background var(--t-fast);
}
.add-item:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-1px); }
.add-item .ico { font-size: 20px; display: block; margin-bottom: 6px; color: var(--muted); }
.add-item:hover .ico { color: var(--brand); }

/* ---------- Code drawer ---------- */
.code-drawer { height: 38vh; border-top: 1px solid var(--border); display: flex; flex-direction: column; background: #0d0f14; }
.code-drawer[hidden] { display: none; }
.code-drawer .drawer-head { background: var(--panel); }
.code-drawer small { margin-left: auto; color: var(--accent); font-weight: 600; }
.code-drawer small.dirty { color: var(--brand-2); }
#code {
  flex: 1; width: 100%; resize: none; border: none; outline: none;
  background: #0d0f14; color: #cfe3ff; padding: 14px;
  font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace; font-size: 13px; line-height: 1.55;
  tab-size: 2; white-space: pre;
}

/* ---------- Layers panel (reuses modal) ---------- */
.layer-row { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; background: var(--panel-2); cursor: grab; }
.layer-row.dragover { border-color: var(--brand); }
.layer-row .lr-name { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-row .lr-act { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 2px 4px; }
.layer-row .lr-act:hover { color: var(--text); }

/* ---------- Saved sites modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(6,8,12,.55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal[hidden] { display: none; }
.modal-card {
  width: 560px; max-width: 92vw; max-height: 80vh; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-4); display: flex; flex-direction: column; animation: modal-in var(--t-med);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-family: var(--font-display); font-size: 17px; }
.saved-list { padding: 12px 20px 20px; overflow: auto; }
.saved-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); }
.saved-item:last-child { border-bottom: none; }
.saved-item .meta { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); padding: 24px 0; text-align: center; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel); color: var(--text); border: 1px solid var(--border);
  padding: 12px 18px; border-radius: var(--r-md); z-index: 100; box-shadow: var(--sh-4);
  font-size: 14px; font-weight: 500; animation: modal-in var(--t-med);
}

/* ---------- Popover menu (pages switcher + right-click context menu) ---------- */
.menu-pop {
  position: fixed; z-index: 200; min-width: 210px; max-width: 260px;
  background: var(--panel); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--sh-pop); padding: 6px; overflow: hidden;
}
.menu-row {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--r-sm);
  font-size: 14px; cursor: pointer; white-space: nowrap; transition: background var(--t-fast);
}
.menu-row:hover { background: var(--panel-2); }
.menu-row.on { color: var(--accent, #4f8cff); }
.menu-row .menu-name { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.menu-row.add { border-top: 1px solid var(--border); margin-top: 4px; color: var(--accent, #4f8cff); font-weight: 600; }
.menu-row.danger:hover { background: rgba(211,47,47,.15); color: #ff6b6b; }
.menu-row .btn-ghost.icon { padding: 4px 6px; }
.menu-row .danger, .menu-row.is-danger { color: #e5484d; }
.menu-row.is-danger:hover { background: rgba(229,72,77,.12); }
.menu-row i { width: 15px; text-align: center; opacity: .8; }

/* ---------- Add-restaurant mode toggle (with / without API) ---------- */
.add-mode { display: flex; gap: 10px; margin-bottom: 16px; }
.mode-tab {
  flex: 1; text-align: left; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: var(--r-md); background: var(--panel-2); color: var(--text);
  display: flex; flex-direction: column; gap: 2px; cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.mode-tab:hover { border-color: var(--border-2); }
.mode-tab strong { font-size: 13px; }
.mode-tab .hint-sm { margin: 0; }
.mode-tab.is-active { border-color: var(--accent, #4f8cff); background: var(--brand-soft, rgba(79,140,255,.1)); box-shadow: 0 0 0 2px rgba(79,140,255,.15); }

/* ---------- "Create your own design" blank template card ---------- */
.tpl-blank-preview {
  display: flex; align-items: center; justify-content: center; min-height: 180px;
  color: var(--muted-2, #9aa0a6); font-size: 34px; border: 1px dashed var(--border-2);
  border-radius: var(--r-md);
  background: repeating-linear-gradient(45deg, var(--panel-2) 0, var(--panel-2) 10px, var(--panel-3) 10px, var(--panel-3) 20px);
}
.tpl-card.tpl-blank:hover .tpl-blank-preview { color: var(--accent, #4f8cff); border-color: var(--accent, #4f8cff); }

/* ---------- Dashboard card three-dots menu ---------- */
.rest-actions { position: relative; }
.card-menu-pop {
  position: fixed; z-index: 200; min-width: 190px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--sh-pop); padding: 6px; overflow: hidden;
}
.card-menu-pop .menu-row { font-size: 14px; }

/* ---------- Publish → FTP deploy block ---------- */
.ftp-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.ftp-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.ftp-head i { color: var(--accent, #4f8cff); }
.ftp-block .fld-label { display: block; margin: 10px 0 4px; font-size: 12px; color: var(--muted); }
.ftp-secure { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--muted); cursor: pointer; }
.ftp-status { margin-top: 10px; }
.ftp-status.ok { color: var(--success, #1f8a4c); }
.ftp-status.err { color: var(--danger, #e5484d); }

/* ---------- Share-card (og:image) preview ---------- */
.share-prev {
  width: 100%; aspect-ratio: 1200 / 630; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--panel-2) center / cover no-repeat;
}

/* ---------- Media library grid ---------- */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.media-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.media-thumb:hover { border-color: var(--accent, #4f8cff); }

/* ---- Uploads (Canva-style) drawer ---- */
.uploads-top { padding: 12px 12px 0; }
.uploads-tabs { display: flex; gap: 6px; margin: 12px 0 4px; }
.up-tab { flex: 1; padding: 7px 8px; border: 1px solid var(--border); background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; font-size: 12.5px; }
.up-tab.on { background: var(--accent, #4f8cff); color: #fff; border-color: transparent; }
.up-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 6px; }
.up-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: grab; background: rgba(128,128,128,.08); }
.up-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-item:hover { border-color: var(--accent, #4f8cff); }
.up-item.used { cursor: pointer; }
.up-item .up-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: none; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 12px; line-height: 1; opacity: 0; transition: opacity .15s; }
.up-item:hover .up-del { opacity: 1; }
.up-sec { font-size: 12px; font-weight: 700; color: var(--muted); margin: 14px 0 2px; text-transform: uppercase; letter-spacing: .04em; }

/* ---- Colored tool rail (far right of the editor) ---- */
.tool-rail { width: 78px; flex: 0 0 78px; background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; overflow-y: auto; }
.tool-rail[hidden] { display: none; }
.rail-btn { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; border: 1px solid transparent; border-radius: 13px; background: transparent; color: var(--text); cursor: pointer; font-size: 10.5px; font-weight: 600; line-height: 1.1; transition: background .15s, border-color .15s, transform .05s; }
.rail-btn i { font-size: 17px; color: var(--rc, #4f8cff); transition: transform .12s; }
.rail-btn span { color: var(--muted); }
.rail-btn:hover { background: color-mix(in srgb, var(--rc) 14%, transparent); border-color: color-mix(in srgb, var(--rc) 32%, transparent); }
.rail-btn:hover i { transform: translateY(-1px) scale(1.06); }
.rail-btn:hover span { color: var(--text); }
.rail-btn:active { transform: scale(.94); }
.rail-btn.active { background: color-mix(in srgb, var(--rc) 20%, transparent); border-color: var(--rc); }
.rail-btn.active span { color: var(--text); }
.rail-btn[data-c="blue"]   { --rc: #4f8cff; }
.rail-btn[data-c="orange"] { --rc: #f6791b; }
.rail-btn[data-c="purple"] { --rc: #8b5cf6; }
.rail-btn[data-c="teal"]   { --rc: #12b3a6; }
.rail-btn[data-c="pink"]   { --rc: #ec4899; }
.rail-btn[data-c="amber"]  { --rc: #f5a623; }
.rail-btn[data-c="indigo"] { --rc: #6366f1; }
.rail-btn[data-c="slate"]  { --rc: #64748b; }
.rail-btn[data-c="green"]  { --rc: #16a34a; }

/* API / live-data panel */
.rail-btn[data-c="red"] { --rc: #e0453f; }
.api-refresh { display: flex; width: calc(100% - 24px); margin: 12px 12px 0; justify-content: center; font-weight: 700; }
.api-refresh:hover { border-color: var(--accent); color: var(--accent); }
.api-cat { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 14px 12px 8px; }
.api-ins-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px; }
.api-ins { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-size: 12px; font-weight: 600; text-align: center; transition: background .15s, border-color .15s; }
.api-ins:hover { background: color-mix(in srgb, var(--accent, #4f8cff) 12%, transparent); border-color: var(--accent, #4f8cff); }
.api-ins i { font-size: 18px; color: var(--accent, #4f8cff); }
.api-ins.disabled { opacity: .4; pointer-events: none; }
.api-tog { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-bottom: 1px solid rgba(128,128,128,.14); }
.api-tog .lbl { font-size: 13.5px; }
.api-tog.disabled { opacity: .45; }
.api-sw { position: relative; width: 40px; height: 22px; flex: 0 0 40px; border-radius: var(--r-full); background: var(--border-2); cursor: pointer; transition: background var(--t-med); border: none; }
.api-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform var(--t-med); }
.api-sw.on { background: var(--success); }
.api-sw.on::after { transform: translateX(18px); }
.api-sw:focus-visible { box-shadow: var(--ring-accent); }

/* Context-menu align row */
.menu-al { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-bottom: 1px solid rgba(128,128,128,.14); }
.menu-al .al-lbl { font-size: 12px; color: var(--muted); margin-right: 4px; }
.menu-al button { flex: 1; height: 28px; border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: 7px; cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; transition: background .12s, border-color .12s; }
.menu-al button:hover { background: color-mix(in srgb, var(--accent, #4f8cff) 16%, transparent); border-color: var(--accent, #4f8cff); }
