
  :root {
    --bg: #080808;
    --bg-1: #0c0c0c;
    --bg-2: #111111;
    --bg-3: #161616;
    --line: rgba(255,255,255,0.06);
    --line-2: rgba(255,255,255,0.12);
    --fg: #f5f5f5;
    --fg-dim: #a3a3a3;
    --fg-dimmer: #6b6b6b;
    --accent: #22c55e;
    --accent-soft: rgba(34,197,94,0.12);
    --accent-glow: rgba(34,197,94,0.35);
    --warn: #f59e0b;
    --danger: #ef4444;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; overflow-x: hidden; }
  body {
    background: var(--bg);
    color: var(--fg);
    font-family: 'Geist', -apple-system, system-ui, sans-serif;
    font-feature-settings: "ss01","cv11";
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
  }
  body::before {
    content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 200;
    opacity: 0.03; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  }
  a { color: inherit; text-decoration: none; }
  button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
  .mono { font-family: 'Geist Mono', monospace; }
  .serif { font-family: 'Instrument Serif', serif; font-style: italic; }

  /* ===== Sidebar ===== */
  .app {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
  }
  @media (max-width: 900px) { .app { grid-template-columns: 1fr; } .sidebar { display: none; } }

  .sidebar {
    background: var(--bg-1);
    border-right: 1px solid var(--line);
    padding: 20px 16px;
    display: flex; flex-direction: column; gap: 6px;
    position: sticky; top: 0; height: 100vh;
    overflow-y: auto;
  }
  .sidebar .brand {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; margin-bottom: 20px;
    font-weight: 600; font-size: 17px; letter-spacing: -0.02em;
  }
  .logo-mark {
    width: 26px; height: 26px; border-radius: 7px;
    background: linear-gradient(135deg, var(--accent) 0%, #16a34a 100%);
    display: grid; place-items: center;
    box-shadow: 0 6px 20px -6px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.3);
    flex-shrink: 0;
  }
  .logo-mark::after { content: ""; width: 10px; height: 10px; border-radius: 2px; background: #04110a; }

  .side-section {
    font-family: 'Geist Mono', monospace;
    font-size: 10.5px; color: var(--fg-dimmer);
    text-transform: uppercase; letter-spacing: 0.1em;
    padding: 14px 10px 8px;
  }
  .nav-item {
    width: 100%; text-align: left;
    display: flex; align-items: center; gap: 12px;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 14px; color: var(--fg-dim);
    transition: background 140ms, color 140ms;
    position: relative;
  }
  .nav-item:hover:not(.locked) { background: rgba(255,255,255,0.04); color: var(--fg); }
  .nav-item.active { background: rgba(255,255,255,0.06); color: var(--fg); }
  .nav-item.active::before {
    content: ""; position: absolute; left: -16px; top: 8px; bottom: 8px;
    width: 2px; background: var(--accent); border-radius: 0 2px 2px 0;
  }
  .nav-item.locked { color: var(--fg-dimmer); cursor: not-allowed; }
  .nav-item.locked:hover { background: rgba(255,255,255,0.02); }
  .nav-item .ico {
    width: 16px; height: 16px; color: currentColor; flex-shrink: 0;
  }
  .nav-item .label { flex: 1; }
  .nav-item .lock-ico { width: 13px; height: 13px; opacity: 0.7; }
  .nav-badge {
    background: var(--danger); color: #fff;
    font-size: 10px; font-weight: 700; font-family: 'Geist Mono', monospace;
    min-width: 17px; height: 17px; border-radius: 9px;
    display: none; align-items: center; justify-content: center; padding: 0 4px;
  }
  .nav-badge.warn { background: var(--warn); }
  .nav-badge.accent { background: var(--accent); }
  .sound-ctrl-btn {
    width: 34px; height: 34px; border-radius: 50%;
    background: #111; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: opacity .15s; padding: 0;
  }
  .sound-ctrl-btn:hover { opacity: 0.75; }
  .nav-item .pro-tag {
    font-family: 'Geist Mono', monospace;
    font-size: 9.5px; padding: 2px 6px; border-radius: 4px;
    background: rgba(245,158,11,0.12); color: var(--warn);
    text-transform: uppercase; letter-spacing: 0.08em;
  }

  .side-foot {
    margin-top: auto;
    padding: 12px 10px;
    border-top: 1px solid var(--line);
    display: flex; align-items: center; gap: 10px;
  }
  .avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #16a34a);
    display: grid; place-items: center;
    font-weight: 600; color: #04110a; font-size: 13px;
    box-shadow: 0 0 0 2px var(--bg-1);
  }
  .side-foot .who { flex: 1; min-width: 0; }
  .side-foot .who .v { font-size: 13px; color: var(--fg); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-foot .who .e { font-size: 11px; color: var(--fg-dimmer); font-family: 'Geist Mono', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-foot .logout {
    padding: 6px; border-radius: 6px; color: var(--fg-dimmer);
    transition: color 140ms, background 140ms;
  }
  .side-foot .logout:hover { background: rgba(255,255,255,0.06); color: var(--fg); }

  /* ===== Main ===== */
  main {
    padding: 32px 40px 64px;
    max-width: 1400px;
    width: 100%;
  }
  @media (max-width: 600px) { main { padding: 24px 20px; } }

  .topbar {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
  }
  .greet-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px; color: var(--fg-dim);
    text-transform: uppercase; letter-spacing: 0.1em;
    margin-bottom: 12px;
  }
  .greet-eyebrow::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 10px var(--accent-glow);
  }
  h1.page-title {
    font-size: 38px;
    letter-spacing: -0.035em;
    font-weight: 500;
    line-height: 1.05;
    margin: 0;
    max-width: 20ch;
  }
  h1.page-title .serif-accent { font-family: 'Instrument Serif', serif; font-style: italic; color: var(--accent); font-weight: 400; }

  /* range toggle */
  .range {
    display: inline-flex;
    background: var(--bg-1);
    box-shadow: 0 0 0 1px var(--line) inset;
    border-radius: 10px;
    padding: 4px;
  }
  .range button {
    padding: 8px 14px;
    font-size: 13px; color: var(--fg-dim);
    border-radius: 7px;
    transition: background 140ms, color 140ms;
  }
  .range button.active {
    background: rgba(255,255,255,0.06);
    color: var(--fg);
    box-shadow: 0 0 0 1px var(--line) inset;
  }

  /* plan banner */
  .plan-banner {
    display: flex; align-items: center; gap: 16px;
    padding: 14px 18px;
    background: linear-gradient(90deg, rgba(34,197,94,0.06), transparent);
    border-radius: 12px;
    box-shadow: 0 0 0 1px var(--line) inset;
    margin-bottom: 28px;
    flex-wrap: wrap;
  }
  .plan-banner .plan-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent);
    font-family: 'Geist Mono', monospace;
    font-size: 11px; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.08em;
  }
  .plan-banner .plan-txt { font-size: 14px; color: var(--fg-dim); flex: 1; min-width: 240px; }
  .plan-banner .plan-txt b { color: var(--fg); font-weight: 500; }
  .plan-banner .upgrade {
    font-size: 13px; color: var(--accent);
    padding: 7px 12px; border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(34,197,94,0.3) inset;
    transition: background 140ms;
  }
  .plan-banner .upgrade:hover { background: var(--accent-soft); }

  /* ===== Stat cards ===== */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
  }
  @media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 520px) { .stats-grid { grid-template-columns: 1fr; } }

  .stat {
    background: var(--bg-1);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 0 0 1px var(--line) inset;
    position: relative;
    overflow: hidden;
  }
  .stat .lbl {
    font-family: 'Geist Mono', monospace;
    font-size: 11px; color: var(--fg-dim);
    text-transform: uppercase; letter-spacing: 0.08em;
  }
  .stat .val {
    font-size: 32px; letter-spacing: -0.03em;
    font-weight: 500; margin-top: 8px;
    font-family: 'Geist', sans-serif;
  }
  .stat .val .unit { color: var(--fg-dimmer); font-weight: 400; }
  .stat .delta {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 10px;
    font-size: 12px; font-family: 'Geist Mono', monospace;
    color: var(--accent);
  }
  .stat .delta.down { color: var(--danger); }
  .stat .delta .bar {
    margin-left: 10px;
    height: 4px; flex: 1;
    background: rgba(255,255,255,0.04); border-radius: 2px;
    overflow: hidden; display: inline-block; vertical-align: middle; min-width: 60px;
  }
  .stat .delta .bar span {
    display: block; height: 100%;
    background: linear-gradient(90deg, var(--accent), #16a34a);
    border-radius: 2px;
  }
  .stat .bg-glyph {
    position: absolute; bottom: -10px; right: -10px;
    font-size: 80px; color: rgba(255,255,255,0.02);
    font-weight: 700; letter-spacing: -0.1em;
    pointer-events: none;
  }

  /* ===== Row (chart + side list) ===== */
  .row-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
    margin-bottom: 28px;
  }
  @media (max-width: 1000px) { .row-2 { grid-template-columns: 1fr; } }

  .panel {
    background: var(--bg-1);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 0 0 1px var(--line) inset;
    position: relative;
  }
  .panel-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
  }
  .panel-head h3 {
    font-size: 16px; letter-spacing: -0.015em;
    font-weight: 500; margin: 0;
  }
  .panel-head .sub {
    font-family: 'Geist Mono', monospace;
    font-size: 11px; color: var(--fg-dimmer);
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-top: 2px;
  }
  .panel-head .right {
    font-family: 'Geist Mono', monospace;
    font-size: 11px; color: var(--accent);
  }

  /* Chart */
  .chart {
    width: 100%; height: 220px;
    position: relative;
  }
  .chart svg { width: 100%; height: 100%; display: block; }
  .chart .axis {
    display: flex; justify-content: space-between;
    font-family: 'Geist Mono', monospace;
    font-size: 10px; color: var(--fg-dimmer);
    margin-top: 8px;
  }

  /* Side list (top items) */
  .topitems { display: flex; flex-direction: column; gap: 14px; }
  .topitems .it {
    display: flex; align-items: center; gap: 12px;
  }
  .topitems .it .rank {
    width: 22px; height: 22px; border-radius: 6px;
    background: rgba(255,255,255,0.04);
    display: grid; place-items: center;
    font-family: 'Geist Mono', monospace;
    font-size: 11px; color: var(--fg-dim);
  }
  .topitems .it .nm { flex: 1; font-size: 14px; color: var(--fg); }
  .topitems .it .ct {
    font-family: 'Geist Mono', monospace;
    font-size: 12px; color: var(--fg-dim);
  }
  .topitems .it .bar {
    width: 80px; height: 4px;
    background: rgba(255,255,255,0.04); border-radius: 2px;
    overflow: hidden;
  }
  .topitems .it .bar span {
    display: block; height: 100%;
    background: linear-gradient(90deg, var(--accent), rgba(34,197,94,0.3));
    border-radius: 2px;
  }

  /* ===== Orders table ===== */
  .orders { padding: 0; }
  .orders .panel-head { padding: 20px 24px 12px; margin: 0; }
  .orders table { width: 100%; border-collapse: collapse; }
  .orders th, .orders td {
    text-align: left; padding: 12px 24px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--line);
  }
  .orders th {
    font-family: 'Geist Mono', monospace;
    font-size: 10.5px; color: var(--fg-dimmer);
    text-transform: uppercase; letter-spacing: 0.08em;
    font-weight: 500;
    background: rgba(255,255,255,0.01);
  }
  .orders tbody tr:last-child td { border-bottom: none; }
  .orders tbody tr { transition: background 140ms; }
  .orders tbody tr:hover { background: rgba(255,255,255,0.02); }
  .orders .table { color: var(--fg); font-weight: 500; }
  .orders .amt { font-family: 'Geist Mono', monospace; color: var(--fg); }
  .orders .status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 8px; border-radius: 999px;
    font-family: 'Geist Mono', monospace;
    font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  }
  .status-pill.ok { background: var(--accent-soft); color: var(--accent); }
  .status-pill.pend { background: rgba(245,158,11,0.12); color: var(--warn); }
  .status-pill.cancel { background: rgba(239,68,68,0.12); color: var(--danger); }
  .status-pill.cash { background: rgba(245,158,11,0.18); color: #b45309; border: 1px solid rgba(245,158,11,0.3); }
  .status-pill::before {
    content: ""; width: 5px; height: 5px; border-radius: 50%;
    background: currentColor;
  }

  /* ===== Locked overlay ===== */
  .locked-card {
    position: relative;
    overflow: hidden;
  }
  .locked-card .content { filter: blur(6px); opacity: 0.35; pointer-events: none; user-select: none; }
  .locked-card .locked-layer {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; padding: 24px;
    background: linear-gradient(180deg, rgba(8,8,8,0.4), rgba(8,8,8,0.7));
    text-align: center;
  }
  .locked-card .lock-badge {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0.04);
    display: grid; place-items: center;
    box-shadow: 0 0 0 1px var(--line-2) inset;
    color: var(--fg-dim);
  }
  .locked-card .locked-title { font-size: 15px; font-weight: 500; letter-spacing: -0.015em; }
  .locked-card .locked-sub { font-size: 12.5px; color: var(--fg-dim); max-width: 32ch; line-height: 1.5; }
  .locked-card .locked-cta {
    margin-top: 4px;
    padding: 7px 14px; border-radius: 999px;
    background: var(--accent); color: #04110a;
    font-size: 12.5px; font-weight: 600;
    box-shadow: 0 8px 24px -8px var(--accent-glow);
  }

  /* Empty/hidden page content */
  .page { display: none; }
  .page.active { display: block; animation: fade 300ms cubic-bezier(.2,.8,.2,1); }
  @keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

  /* Kitchen fullscreen mode */
  .page[data-page="kitchen"]:fullscreen,
  .page[data-page="kitchen"]:-webkit-full-screen {
    display: block;
    background: var(--bg);
    padding: 28px 32px 40px;
    overflow-y: auto;
  }
  .page[data-page="kitchen"]:fullscreen .topbar,
  .page[data-page="kitchen"]:-webkit-full-screen .topbar {
    margin-bottom: 24px;
  }

  .stub-panel {
    background: var(--bg-1); border-radius: 14px;
    box-shadow: 0 0 0 1px var(--line) inset;
    padding: 60px 40px; text-align: center;
  }
  @media (max-width: 900px) { .stub-panel { padding: 40px 20px; } }
  .stub-panel h3 { font-size: 22px; letter-spacing: -0.02em; font-weight: 500; margin: 0 0 10px; }
  .stub-panel p { color: var(--fg-dim); font-size: 14.5px; max-width: 44ch; margin: 0 auto; line-height: 1.55; }

  /* ===== Menu editor ===== */
  .me-layout { display: block; }
  .me-editor { display: flex; flex-direction: column; gap: 16px; }
  /* Şablonlar ve Menü Başlangıç sekmeleri — küçük ekranda tek sütun */
  @media (max-width: 1100px) {
    [data-mt="sablon"] > div { grid-template-columns: 1fr !important; }
    [data-mt="welcome"] > div { grid-template-columns: 1fr !important; }
  }

  .btn-mini {
    padding: 7px 12px; border-radius: 8px;
    background: rgba(255,255,255,0.04);
    box-shadow: 0 0 0 1px var(--line) inset;
    font-size: 12.5px; color: var(--fg);
    font-family: 'Geist', sans-serif;
    transition: all 150ms;
  }
  .btn-mini:hover { background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 1px rgba(34,197,94,0.3) inset; }
  .btn-del {
    padding: 4px 8px; border-radius: 6px;
    font-family: 'Geist Mono', monospace; font-size: 11px;
    color: var(--fg-dimmer); letter-spacing: 0.06em; text-transform: uppercase;
  }
  .btn-del:hover { color: var(--danger); background: rgba(239,68,68,0.08); }

  .field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
  .field label { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--fg-dim); text-transform: uppercase; letter-spacing: 0.08em; }
  .field input, .field textarea {
    background: var(--bg); border: 1px solid var(--line);
    border-radius: 10px; padding: 12px 14px; font-size: 14.5px;
    color: var(--fg); outline: none;
    transition: border-color 150ms, background 150ms;
    font-family: inherit;
    resize: vertical;
  }
  .field input:focus, .field textarea:focus { border-color: var(--accent); background: rgba(34,197,94,0.04); }
  .field input::placeholder, .field textarea::placeholder { color: var(--fg-dimmer); }

  .upload {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 18px; border-radius: 10px;
    border: 1px dashed var(--line-2);
    font-size: 13px; color: var(--fg-dim);
    cursor: pointer; transition: all 150ms;
  }
  .upload:hover { border-color: var(--accent); color: var(--accent); background: rgba(34,197,94,0.04); }
  .upload.has-img {
    padding: 0; overflow: hidden; border-style: solid;
    aspect-ratio: 16/9; position: relative;
  }
  .upload.has-img img { width: 100%; height: 100%; object-fit: cover; }
  .upload.has-img::after {
    content: "Değiştir"; position: absolute; inset: 0;
    background: rgba(0,0,0,0.5); color: #fff;
    display: grid; place-items: center; font-size: 12px; opacity: 0;
    font-family: 'Geist Mono', monospace; text-transform: uppercase; letter-spacing: 0.08em;
    transition: opacity 150ms;
  }
  .upload.has-img:hover::after { opacity: 1; }

  /* Links list */
  .links-list { display: flex; flex-direction: column; gap: 10px; }
  .link-row {
    display: grid; grid-template-columns: 44px 1fr 1fr auto;
    gap: 8px; align-items: center;
    padding: 10px; background: var(--bg); border-radius: 10px;
    box-shadow: 0 0 0 1px var(--line) inset;
  }
  .link-row input {
    background: transparent; border: 1px solid transparent;
    border-radius: 6px; padding: 6px 8px; font-size: 13px; color: var(--fg);
    outline: none; font-family: inherit;
  }
  .link-row input:focus { border-color: var(--line-2); background: var(--bg-2); }
  .link-row input.emoji { text-align: center; font-size: 20px; background: var(--bg-2); border-color: var(--line); }
  .link-row input::placeholder { color: var(--fg-dimmer); }

  /* Category cards */
  /* ── Menu items list ── */
  .mi-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
  .layout-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 10px; border: 1.5px solid var(--line); background: transparent; color: var(--fg-dim); font-size: 11px; cursor: pointer; transition: all 150ms; font-family: 'Geist', sans-serif; }
  .layout-opt:hover { border-color: var(--line-2); color: var(--fg); }
  .layout-opt.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
  .layout-opt svg { width: 24px; height: 24px; }
  .custom-cat-tag { display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 14px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--bg-2); font-size: 12.5px; color: var(--fg-dim); }
  .custom-cat-tag.builtin { opacity: 0.5; cursor: default; }
  .custom-cat-del { width: 16px; height: 16px; border-radius: 50%; background: rgba(239,68,68,0.12); color: var(--danger); font-size: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; border: none; transition: background 120ms; }
  .custom-cat-del:hover { background: rgba(239,68,68,0.25); }
  .mi-cat-btn { padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--line); background: transparent; color: var(--fg-dim); font-size: 12.5px; cursor: pointer; transition: all 120ms; }
  .mi-cat-btn.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
  #menu-items-list { display: flex; flex-direction: column; gap: 8px; }
  .mi-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg); border-radius: 10px; box-shadow: 0 0 0 1px var(--line) inset; transition: box-shadow 120ms; }
  .mi-card:hover { box-shadow: 0 0 0 1px var(--line-2) inset; }
  .mi-card.inactive { opacity: 0.45; }
  .mi-thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--bg-2); display: flex; align-items: center; justify-content: center; font-size: 22px; }
  .mi-thumb img { width: 100%; height: 100%; border-radius: 8px; object-fit: cover; }
  .mi-body { flex: 1; min-width: 0; }
  .mi-name { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mi-meta { display: flex; gap: 8px; align-items: center; margin-top: 3px; }
  .mi-badge { font-family: 'Geist Mono', monospace; font-size: 10.5px; color: var(--fg-dimmer); background: var(--bg-2); padding: 2px 6px; border-radius: 4px; }
  .mi-price { font-family: 'Geist Mono', monospace; font-size: 12.5px; color: var(--accent); font-weight: 600; }
  .mi-acts { display: flex; gap: 6px; flex-shrink: 0; }
  .mi-btn { padding: 5px 10px; border-radius: 6px; font-size: 11.5px; font-family: 'Geist Mono', monospace; letter-spacing: 0.04em; cursor: pointer; border: 1px solid var(--line); color: var(--fg-dim); transition: all 120ms; background: transparent; }
  .mi-btn:hover { color: var(--fg); border-color: var(--line-2); }
  .mi-btn.on { color: var(--accent); border-color: rgba(34,197,94,0.3); }
  .mi-btn.danger:hover { color: var(--danger); border-color: rgba(239,68,68,0.3); }
  .mi-empty { text-align: center; padding: 48px 20px; color: var(--fg-dimmer); font-size: 13px; }

  .cats-list { display: flex; flex-direction: column; gap: 16px; }
  .cat-card {
    background: var(--bg); border-radius: 12px;
    box-shadow: 0 0 0 1px var(--line) inset;
    overflow: hidden;
  }
  .cat-head {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,0.015);
  }
  .cat-head input {
    flex: 1;
    background: transparent; border: 1px solid transparent;
    border-radius: 6px; padding: 6px 8px; font-size: 16px; font-weight: 500;
    color: var(--fg); outline: none; font-family: inherit; letter-spacing: -0.01em;
  }
  .cat-head input:focus { border-color: var(--line-2); background: var(--bg-2); }
  .cat-items { padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  @media (max-width: 700px) { .cat-items { grid-template-columns: 1fr; } }
  .item-card {
    display: grid; grid-template-columns: 72px 1fr auto;
    gap: 10px; padding: 10px; align-items: center;
    background: var(--bg-2); border-radius: 10px;
    box-shadow: 0 0 0 1px var(--line) inset;
  }
  .item-img {
    width: 72px; height: 72px; border-radius: 8px;
    background: var(--bg-3); overflow: hidden;
    display: grid; place-items: center;
    cursor: pointer; position: relative;
    font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--fg-dimmer);
    text-align: center;
  }
  .item-img img { width: 100%; height: 100%; object-fit: cover; }
  .item-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .item-body input {
    background: transparent; border: 1px solid transparent;
    border-radius: 5px; padding: 4px 6px;
    color: var(--fg); font-size: 13.5px; outline: none; font-family: inherit;
    min-width: 0; width: 100%;
  }
  .item-body input.desc { font-size: 12px; color: var(--fg-dim); }
  .item-body input.price { font-family: 'Geist Mono', monospace; font-size: 13px; color: var(--accent); width: 100px; }
  .item-body input:focus { background: var(--bg); border-color: var(--line-2); }

  .item-add {
    padding: 12px; border-radius: 10px;
    border: 1px dashed var(--line-2);
    color: var(--fg-dim); font-size: 13px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    cursor: pointer; transition: all 150ms;
  }
  .item-add:hover { border-color: var(--accent); color: var(--accent); background: rgba(34,197,94,0.04); }

  /* Phone live preview */
  .phone-sticky { position: sticky; top: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
  .phone-mini {
    width: 300px; height: 600px;
    background: linear-gradient(160deg, #1a1a1a, #0a0a0a);
    border-radius: 40px;
    padding: 0;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 40px 80px -20px rgba(0,0,0,0.7), 0 0 60px -20px var(--accent-glow);
    position: relative;
    overflow: hidden;
  }
  .phone-mini-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 80px; height: 22px; border-radius: 12px; background: #000; z-index: 3; }
  .phone-mini-screen {
    width: 100%; height: 100%;
    background: #fafaf7;
    border-radius: 0;
    overflow: hidden; overflow-y: auto;
    color: #111;
    font-family: 'Geist', sans-serif;
    scrollbar-width: none;
  }
  .phone-mini-screen::-webkit-scrollbar { display: none; }
  .phone-mini-cap { font-size: 10.5px; color: var(--fg-dimmer); letter-spacing: 0.08em; }

  /* ===== Floating Notification Stack ===== */
  #notif-stack {
    position: fixed; top: 16px; right: 16px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
    pointer-events: none; width: 320px; max-width: calc(100vw - 32px);
  }
  .notif-card {
    background: var(--bg-1);
    border: 1px solid var(--line-2);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex; align-items: flex-start; gap: 12px;
    pointer-events: all;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05) inset;
    animation: notifSlide .25s cubic-bezier(.22,.68,0,1.2) both;
    position: relative; overflow: hidden;
  }
  .notif-card::before {
    content: ''; position: absolute; inset: 0 auto 0 0; width: 3px;
    background: var(--warn); border-radius: 14px 0 0 14px;
  }
  .notif-card.accent::before { background: var(--accent); }
  .notif-card.danger::before { background: var(--danger); }
  .notif-icon { font-size: 24px; flex-shrink: 0; margin-top: 1px; }
  .notif-body { flex: 1; min-width: 0; }
  .notif-title { font-size: 13px; font-weight: 700; color: var(--fg); margin-bottom: 2px; }
  .notif-sub { font-size: 12px; color: var(--fg-dimmer); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .notif-dismiss {
    background: none; border: none; color: var(--fg-dimmer); font-size: 18px;
    cursor: pointer; padding: 0; line-height: 1; flex-shrink: 0;
    opacity: 0.6; transition: opacity .15s;
  }
  .notif-dismiss:hover { opacity: 1; }
  .notif-progress {
    position: absolute; bottom: 0; left: 0; height: 2px;
    background: var(--warn); border-radius: 0 0 0 14px;
    animation: notifProgress var(--dur, 6s) linear both;
  }
  .notif-card.accent .notif-progress { background: var(--accent); }
  @keyframes notifSlide {
    from { opacity: 0; transform: translateX(24px) scale(.97); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
  }
  @keyframes notifProgress { from { width: 100%; } to { width: 0; } }

  /* ===== Audio unlock prompt ===== */
  #audio-unlock-banner {
    position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
    z-index: 8888; background: var(--bg-1); border: 1px solid var(--line-2);
    border-radius: 12px; padding: 12px 20px; display: flex; align-items: center; gap: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5); font-size: 13px; color: var(--fg-dim);
    cursor: pointer; transition: opacity .3s;
  }
  #audio-unlock-banner:hover { background: var(--bg-2); color: var(--fg); }

  /* Preview content (inside phone & full-preview) */
  .pv-cover {
    height: 160px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    background-size: cover; background-position: center;
    position: relative;
  }
  .pv-cover::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.3));
  }
  .pv-emoji {
    font-size: 48px; text-align: center; margin-top: -32px;
    position: relative; z-index: 2;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.2));
  }
  .pv-title { text-align: center; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 8px 16px 4px; color: #111; }
  .pv-sub { text-align: center; font-size: 12px; color: #666; margin: 0 16px 16px; font-family: 'Geist Mono', monospace; }

  .pv-links { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; }
  .pv-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 10px;
    background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.06) inset;
    font-size: 13px; color: #111; font-weight: 500;
  }
  .pv-link .e { font-size: 16px; }
  .pv-link .arrow { margin-left: auto; color: #999; font-size: 14px; }

  .pv-menu-btn {
    margin: 8px 16px 16px; padding: 12px;
    background: #22c55e; color: #04110a;
    border-radius: 10px; text-align: center;
    font-size: 14px; font-weight: 600;
  }

  .pv-cat { padding: 16px 16px 4px; font-size: 11px; font-family: 'Geist Mono', monospace; color: #888; text-transform: uppercase; letter-spacing: 0.1em; }
  .pv-items { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 8px; }
  .pv-item {
    display: grid; grid-template-columns: 56px 1fr auto;
    gap: 10px; padding: 8px; align-items: center;
    background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px rgba(0,0,0,0.05) inset;
  }
  .pv-item-img { width: 56px; height: 56px; border-radius: 8px; background: #eee; overflow: hidden; }
  .pv-item-img img { width: 100%; height: 100%; object-fit: cover; }
  .pv-item-nm { font-size: 13px; font-weight: 500; color: #111; }
  .pv-item-desc { font-size: 11px; color: #666; margin-top: 2px; }
  .pv-item-price { font-size: 12.5px; font-weight: 600; color: #16a34a; font-family: 'Geist Mono', monospace; }

  .full-preview {
    max-width: 420px; margin: 0 auto;
    background: #fafaf7; border-radius: 24px;
    overflow: hidden; color: #111;
    box-shadow: 0 0 0 1px var(--line) inset;
  }

  /* Tables grid */
  .tables-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px; margin-top: 20px;
  }
  .table-card {
    background: var(--bg-1); border-radius: 14px;
    box-shadow: 0 0 0 1px var(--line) inset;
    padding: 18px; position: relative;
    transition: all 150ms;
  }
  .table-card:hover { box-shadow: 0 0 0 1px rgba(34,197,94,0.3) inset; }
  .table-card .tc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
  .table-card .tc-name { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
  .table-card .tc-qr {
    width: 100%; aspect-ratio: 1; background: #fff;
    border-radius: 8px; padding: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px; overflow: hidden;
  }
  .table-card .tc-qr canvas,
  .table-card .tc-qr img { width: 100% !important; height: 100% !important; display: block; }
  .table-card .tc-url { font-family: 'Geist Mono', monospace; font-size: 10.5px; color: var(--fg-dimmer); text-align: center; word-break: break-all; }
  .table-card .tc-del {
    padding: 4px 8px; border-radius: 5px;
    font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--fg-dimmer); letter-spacing: 0.06em;
  }
  .table-card .tc-del:hover { color: var(--danger); }
  .table-card.occupied {
    box-shadow: 0 0 0 1.5px rgba(34,197,94,0.35) inset;
    background: rgba(34,197,94,0.04);
  }
  .table-card.occupied .tc-name { color: var(--accent); }
  .tc-status {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
    padding: 3px 9px; border-radius: 20px;
  }
  .tc-status.dolu {
    background: rgba(34,197,94,0.12); color: var(--accent);
    border: 1px solid rgba(34,197,94,0.25);
  }
  .tc-status.bos {
    background: rgba(255,255,255,0.05); color: var(--fg-dimmer);
    border: 1px solid var(--line);
  }
  .tc-order-info {
    font-size: 12px; color: var(--fg-dim);
    margin: 6px 0 10px; padding: 8px 10px;
    background: rgba(34,197,94,0.06); border-radius: 8px;
    border: 1px solid rgba(34,197,94,0.15);
    display: flex; justify-content: space-between; align-items: center;
  }
  .tc-status-bar {
    display: flex; gap: 3px; padding: 3px;
    background: var(--bg-2); border-radius: 9px;
    border: 1px solid var(--line); margin: 8px 0;
  }
  .tc-sb-btn {
    flex: 1; padding: 5px 0; font-size: 11px; font-weight: 600;
    border: none; border-radius: 6px; cursor: pointer;
    font-family: inherit; color: var(--fg-dimmer);
    background: transparent; transition: all 150ms; white-space: nowrap;
  }
  .tc-sb-btn:hover { color: var(--fg); }
  .tc-sb-btn.tc-auto { background: rgba(34,197,94,0.15); color: var(--accent); }
  .tc-sb-btn.tc-dolu { background: rgba(245,158,11,0.15); color: var(--warn); }
  .tc-sb-btn.tc-bos  { background: rgba(99,102,241,0.15); color: #818cf8; }

  .me-tab[hidden] { display: none; }

  /* ===== Welcome editor controls ===== */
  .w-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .w-row > .field { margin-bottom: 0; }

  .seg {
    display: flex; padding: 3px; gap: 3px;
    background: var(--bg); border-radius: 9px;
    box-shadow: 0 0 0 1px var(--line) inset;
  }
  .seg button {
    flex: 1; padding: 7px 8px; border-radius: 6px;
    font-size: 12.5px; color: var(--fg-dim);
    font-family: inherit;
    transition: all 140ms;
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  }
  .seg button.active { background: rgba(255,255,255,0.06); color: var(--fg); box-shadow: 0 0 0 1px var(--line) inset; }
  .seg svg { width: 14px; height: 14px; }

  .slider-row { display: flex; align-items: center; gap: 12px; }
  .slider-row input[type="range"] { flex: 1; accent-color: var(--accent); }
  .slider-row .val { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--fg-dim); min-width: 36px; text-align: right; }

  .swatches { display: flex; gap: 6px; flex-wrap: wrap; }
  .swatch {
    width: 32px; height: 32px; border-radius: 8px;
    cursor: pointer; position: relative;
    box-shadow: 0 0 0 1px var(--line) inset;
    transition: transform 120ms;
  }
  .swatch:hover { transform: scale(1.08); }
  .swatch.active { box-shadow: 0 0 0 2px var(--accent); }
  .sw {
    width: 36px; height: 36px; border-radius: 10px;
    cursor: pointer; position: relative;
    transition: transform 120ms, box-shadow 120ms;
    flex-shrink: 0;
  }
  .sw:hover { transform: scale(1.1); }
  .sw.active { box-shadow: 0 0 0 3px var(--accent), 0 0 0 1px var(--bg) inset; }
  .swatch.custom { display: grid; place-items: center; font-size: 16px; color: var(--fg-dim); background: var(--bg); }
  .swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

  /* BG type tabs */
  .bgtype-tabs {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
    padding: 4px; background: var(--bg); border-radius: 10px;
    box-shadow: 0 0 0 1px var(--line) inset;
    margin-bottom: 12px;
  }
  .bgtype-tabs button {
    padding: 8px 4px; border-radius: 7px;
    font-size: 11.5px; color: var(--fg-dim);
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    transition: all 140ms;
  }
  .bgtype-tabs button.active { background: rgba(255,255,255,0.06); color: var(--fg); box-shadow: 0 0 0 1px var(--line) inset; }
  .bgtype-tabs svg { width: 16px; height: 16px; }

  /* Pattern grid */
  .pattern-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .pattern-item {
    aspect-ratio: 4/5;
    border-radius: 10px;
    cursor: pointer; position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--line) inset;
    transition: transform 140ms;
    background-size: cover; background-position: center;
  }
  .pattern-item:hover { transform: translateY(-2px); }
  .pattern-item.active { box-shadow: 0 0 0 2px var(--accent), 0 0 20px -4px var(--accent-glow); }
  .pattern-item .pl {
    position: absolute; bottom: 6px; left: 6px; right: 6px;
    font-family: 'Geist Mono', monospace; font-size: 9.5px; color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    text-transform: uppercase; letter-spacing: 0.06em;
  }

  /* Template gallery */
  .templ-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  @media (max-width: 900px) { .templ-grid { grid-template-columns: repeat(2, 1fr); } }
  .templ-card {
    aspect-ratio: 3/5;
    border-radius: 12px;
    overflow: hidden; position: relative;
    cursor: pointer;
    box-shadow: 0 0 0 1px var(--line) inset;
    transition: transform 160ms, box-shadow 160ms;
    background: var(--bg);
  }
  .templ-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line-2) inset, 0 20px 40px -12px rgba(0,0,0,0.6); }
  .templ-card.active { box-shadow: 0 0 0 2px var(--accent), 0 0 24px -4px var(--accent-glow); }
  .templ-card .tp-bg { position: absolute; inset: 0; }
  .templ-card .tp-over { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.7)); }
  .templ-card .tp-body {
    position: absolute; inset: 0; padding: 14px;
    display: flex; flex-direction: column; justify-content: flex-end;
    color: #fff;
  }
  .templ-card .tp-title { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
  .templ-card .tp-sub { font-size: 10.5px; font-family: 'Geist Mono', monospace; color: rgba(255,255,255,0.75); margin-top: 2px; }
  .templ-card .tp-btn { margin-top: 10px; padding: 6px; border-radius: 5px; background: var(--accent); color: #04110a; font-size: 10.5px; font-weight: 600; text-align: center; }
  .templ-card .tp-tag {
    position: absolute; top: 8px; left: 8px;
    padding: 3px 7px; border-radius: 999px;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(6px);
    font-family: 'Geist Mono', monospace; font-size: 9px; color: #fff;
    text-transform: uppercase; letter-spacing: 0.08em;
  }

  /* Blocks (drag-drop) */
  .blocks-list { display: flex; flex-direction: column; gap: 6px; }
  .block-row {
    display: grid; grid-template-columns: 20px 1fr auto auto;
    gap: 10px; align-items: center;
    padding: 10px 12px; background: var(--bg); border-radius: 10px;
    box-shadow: 0 0 0 1px var(--line) inset;
    font-size: 13px;
    cursor: grab;
    transition: transform 160ms cubic-bezier(.2,.8,.2,1), box-shadow 140ms, opacity 140ms;
  }
  .block-row:active { cursor: grabbing; }
  .block-row.dragging { opacity: 0.4; }
  .block-row.drop-above { box-shadow: 0 -2px 0 var(--accent), 0 0 0 1px var(--line) inset; }
  .block-row.drop-below { box-shadow: 0 2px 0 var(--accent), 0 0 0 1px var(--line) inset; }
  .block-row .grip {
    color: var(--fg-dimmer);
    display: grid; place-items: center;
    font-size: 14px; line-height: 1;
  }
  .block-row .bl-name { color: var(--fg); font-weight: 500; }
  .block-row .bl-sub { color: var(--fg-dimmer); font-family: 'Geist Mono', monospace; font-size: 11px; }
  .block-row.off { opacity: 0.5; }
  .block-row.off .bl-name { color: var(--fg-dim); text-decoration: line-through; text-decoration-color: var(--fg-dimmer); }

  /* ===== Welcome fullscreen preview ===== */
  .wv-wrap {
    position: relative;
    width: 100%; height: 100%;
    color: var(--wc-fg, #fff);
    font-family: var(--wc-font, 'Geist'), sans-serif;
    overflow: hidden;
  }
  .wv-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
  }
  .wv-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,var(--wc-overlay, 0.6)) 100%);
  }
  .wv-stage {
    position: absolute; inset: 0;
    padding: 0;
  }

  .wv-logo {
    width: var(--wc-logo-size, 64px); height: var(--wc-logo-size, 64px);
    border-radius: 14px;
    background: rgba(255,255,255,0.96);
    overflow: hidden;
    display: grid; place-items: center;
    color: #111; font-weight: 700; font-size: 20px;
    font-family: 'Geist', sans-serif;
    flex-shrink: 0;
    box-shadow: 0 10px 30px -8px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.08) inset;
  }
  .wv-logo.pos-top { margin-top: 20px; margin-bottom: auto; }
  .wv-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .wv-title {
    font-size: var(--wc-title-size, 36px);
    font-weight: var(--wc-weight, 600);
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin: 0;
    text-wrap: balance;
  }
  .wv-sub {
    font-size: var(--wc-sub-size, 13px);
    color: var(--wc-sub-fg, rgba(255,255,255,0.82));
    margin: 0;
    font-family: 'Geist Mono', monospace;
    letter-spacing: 0.04em;
  }
  .wv-btn {
    margin-top: 6px;
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--wc-btn-bg, #22c55e);
    color: var(--wc-btn-fg, #04110a);
    font-weight: 600;
    font-size: 13.5px;
    display: inline-flex; align-items: center; gap: 6px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    font-family: 'Geist', sans-serif;
    align-self: var(--wc-btn-align, center);
  }
  .wv-stage.align-left .wv-btn { align-self: flex-start; }
  .wv-stage.align-right .wv-btn { align-self: flex-end; }
  .wv-stage.align-center .wv-btn { align-self: center; }

  .wv-links-inline {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin-top: 6px;
    justify-content: inherit;
  }

  /* Free-form editable blocks + lock */
  .wv-block {
    position: absolute;
    transition: box-shadow 140ms;
    border-radius: 10px;
  }
  .wv-wrap.locked .wv-block { pointer-events: none; }
  .wv-block.wv-editable {
    cursor: grab;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.25);
  }
  .wv-block.wv-editable:hover {
    box-shadow: 0 0 0 1px rgba(34,197,94,0.9), 0 0 0 4px rgba(34,197,94,0.18);
  }
  .wv-block.wv-editable:active, .wv-block.dragging, .wv-block.resizing {
    cursor: grabbing;
    box-shadow: 0 0 0 1px var(--accent), 0 0 0 6px rgba(34,197,94,0.22);
  }
  .wv-handle {
    position: absolute;
    width: 10px; height: 10px;
    background: var(--accent);
    border: 1.5px solid #04110a;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.3);
  }
  .wv-h-nw { top: -5px; left: -5px; cursor: nw-resize; }
  .wv-h-ne { top: -5px; right: -5px; cursor: ne-resize; }
  .wv-h-sw { bottom: -5px; left: -5px; cursor: sw-resize; }
  .wv-h-se { bottom: -5px; right: -5px; cursor: se-resize; }
  .wv-h-e  { top: 50%; right: -5px; transform: translateY(-50%); cursor: e-resize; }
  .wv-h-w  { top: 50%; left: -5px; transform: translateY(-50%); cursor: w-resize; }

  .wv-lock {
    position: absolute; bottom: 12px; right: 12px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0,0,0,0.65); backdrop-filter: blur(8px);
    color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.15), 0 8px 20px -4px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: all 160ms;
    z-index: 20;
  }
  .wv-lock:hover { transform: scale(1.08); }
  .wv-wrap.unlocked .wv-lock {
    background: var(--accent); color: #04110a;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.3), 0 8px 24px -4px var(--accent-glow);
  }
  .wv-wrap.unlocked .wv-stage::before {
    content: "";
    position: absolute; inset: 8px;
    border: 1px dashed rgba(34,197,94,0.4);
    border-radius: 8px;
    pointer-events: none;
  }
  .wv-links-inline .wl {
    padding: 6px 10px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    font-size: 11px;
    color: var(--wc-fg, #fff);
    display: inline-flex; align-items: center; gap: 4px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.15) inset;
  }

  /* Video bg styling */
  .wv-bg video { width: 100%; height: 100%; object-fit: cover; }

  /* Family styles */
  .f-sans { font-family: 'Geist', sans-serif; }
  .f-serif { font-family: 'Instrument Serif', serif; }
  .f-italic { font-family: 'Instrument Serif', serif; font-style: italic; }

  /* Full preview welcome */
  .full-preview .wv-wrap { aspect-ratio: 9/16; }

  /* ===== Admin panel (floating) ===== */
  #admin-btn {
    position: fixed; bottom: 24px; right: 24px;
    z-index: 100;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--bg-2);
    box-shadow: 0 0 0 1px var(--line-2) inset, 0 20px 40px -10px rgba(0,0,0,0.6);
    display: grid; place-items: center;
    color: var(--fg-dim);
    transition: all 180ms;
  }
  #admin-btn:hover { color: var(--fg); transform: translateY(-2px); }

  #admin-panel {
    position: fixed; bottom: 84px; right: 24px;
    z-index: 100;
    width: 320px;
    background: rgba(14,14,14,0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 0 0 1px var(--line-2) inset, 0 30px 80px -10px rgba(0,0,0,0.8);
    padding: 20px;
    display: none;
  }
  #admin-panel.on { display: block; animation: rise 280ms cubic-bezier(.2,.8,.2,1); }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

  #admin-panel h4 {
    font-family: 'Geist Mono', monospace;
    font-size: 11px; color: var(--fg-dim);
    text-transform: uppercase; letter-spacing: 0.1em;
    margin: 0 0 4px; font-weight: 500;
    display: flex; align-items: center; gap: 8px;
  }
  #admin-panel h4::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--warn);
    box-shadow: 0 0 10px rgba(245,158,11,0.5);
  }
  #admin-panel .hint { font-size: 12px; color: var(--fg-dimmer); margin-bottom: 16px; line-height: 1.4; }

  #admin-panel .plan-switch {
    display: flex; gap: 4px; padding: 4px;
    background: var(--bg); border-radius: 10px;
    box-shadow: 0 0 0 1px var(--line) inset;
    margin-bottom: 16px;
  }
  #admin-panel .plan-switch button {
    flex: 1; padding: 8px 10px; border-radius: 7px;
    font-size: 12px; color: var(--fg-dim);
  }
  #admin-panel .plan-switch button.active { background: rgba(255,255,255,0.06); color: var(--fg); }

  #admin-panel .mod-list {
    display: flex; flex-direction: column; gap: 2px;
    padding-top: 12px; border-top: 1px solid var(--line);
  }
  #admin-panel .mod-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 4px;
    font-size: 13px;
  }
  #admin-panel .mod-row .nm { color: var(--fg); }
  /* toggle */
  .toggle {
    position: relative; width: 34px; height: 20px;
    background: var(--bg-3); border-radius: 999px;
    box-shadow: 0 0 0 1px var(--line) inset;
    cursor: pointer; transition: background 180ms;
  }
  .toggle::after {
    content: ""; position: absolute;
    top: 2px; left: 2px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--fg-dim);
    transition: all 180ms cubic-bezier(.2,.8,.2,1);
  }
  .toggle.on { background: var(--accent-soft); box-shadow: 0 0 0 1px rgba(34,197,94,0.3) inset; }
  .toggle.on::after { left: 16px; background: var(--accent); }

  /* Order detail status buttons */
  .od-st-btn {
    padding: 8px 14px; border-radius: 8px; font-size: 12.5px; cursor: pointer;
    border: 1px solid var(--line); color: var(--fg-dim); background: transparent;
    transition: all 120ms; font-family: inherit;
  }
  .od-st-btn:hover { border-color: var(--line-2); color: var(--fg); }
  .od-st-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
  .od-st-btn.cash-collect { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.4); color: #b45309; font-weight: 600; }
  .od-st-btn.cash-collect:hover { background: rgba(245,158,11,0.2); }

  /* Staff list */
  .staff-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid var(--line);
  }
  .staff-row:last-child { border-bottom: none; }
  .staff-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--bg-3); display: grid; place-items: center;
    font-size: 14px; font-weight: 600; color: var(--accent); flex-shrink: 0;
  }
  .staff-role {
    font-family: 'Geist Mono', monospace; font-size: 10px;
    color: var(--fg-dimmer); background: var(--bg-2);
    padding: 2px 7px; border-radius: 4px;
  }

  /* Payments / analytics table row clickable */
  tbody tr { cursor: pointer; }
  tbody tr:hover td { background: rgba(255,255,255,0.02); }

  /* PIN boxes */
  .pin-box {
    width: 44px; height: 54px;
    background: var(--bg-2); border: 1.5px solid var(--line);
    border-radius: 10px; text-align: center;
    font-size: 22px; font-weight: 700; color: var(--fg);
    font-family: 'Geist Mono', monospace;
    outline: none; caret-color: transparent;
    transition: border-color 150ms, background 150ms;
  }
  .pin-box:focus { border-color: var(--accent); background: rgba(34,197,94,0.05); }
  .pin-box.filled { border-color: var(--line-2); }
  .pin-box.error  { border-color: var(--danger); background: rgba(239,68,68,0.06); animation: shake 300ms; }
  @keyframes shake {
    0%,100%{ transform:translateX(0); }
    20%    { transform:translateX(-6px); }
    60%    { transform:translateX(6px); }
  }
  @media (max-width: 400px) { .pin-box { width: 38px; height: 48px; font-size: 20px; } }

  /* ===== MOBILE NAV ===== */
  #mobile-header {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 110;
    height: 52px;
    background: rgba(8,8,8,0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
  }
  #mobile-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 110;
    height: 60px;
    background: rgba(8,8,8,0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    align-items: stretch;
  }
  .mn-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 3px; padding: 6px 2px;
    color: var(--fg-dimmer);
    font-size: 9.5px; font-family: 'Geist', sans-serif;
    letter-spacing: 0.01em; line-height: 1;
    transition: color 130ms; background: none;
    border: none; cursor: pointer;
  }
  .mn-item.active { color: var(--accent); }
  .mn-item svg { flex-shrink: 0; }

  /* More bottom sheet */
  #mobile-more-sheet {
    display: none; position: fixed; inset: 0; z-index: 120;
  }
  #mobile-more-sheet.open { display: block; }
  #mobile-more-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
  }
  #mobile-more-panel {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: var(--bg-1);
    border-radius: 20px 20px 0 0;
    border-top: 1px solid var(--line-2);
    padding: 12px 12px 76px;
    transform: translateY(100%);
    transition: transform 280ms cubic-bezier(.2,.8,.2,1);
    max-height: 80vh; overflow-y: auto;
  }
  #mobile-more-sheet.open #mobile-more-panel { transform: translateY(0); }
  #mobile-more-panel .sheet-handle {
    width: 36px; height: 4px; border-radius: 2px;
    background: rgba(255,255,255,0.15);
    margin: 0 auto 16px;
  }
  #mobile-more-panel .sheet-title {
    font-family: 'Geist Mono', monospace; font-size: 10px;
    color: var(--fg-dimmer); text-transform: uppercase;
    letter-spacing: 0.1em; padding: 0 4px 10px;
  }
  .mn-sheet-item {
    display: flex; align-items: center; gap: 14px;
    padding: 11px 14px; border-radius: 10px;
    font-size: 14px; color: var(--fg-dim);
    cursor: pointer; background: none; border: none;
    width: 100%; text-align: left;
    transition: background 120ms, color 120ms;
    font-family: inherit;
  }
  .mn-sheet-item:hover { background: rgba(255,255,255,0.04); color: var(--fg); }
  .mn-sheet-item.active { color: var(--accent); background: var(--accent-soft); }
  .mn-sheet-item.locked-item { color: var(--fg-dimmer); cursor: not-allowed; opacity: 0.5; }

  /* ===== RESPONSIVE FIXES ===== */
  @media (max-width: 900px) {
    #mobile-header { display: flex; }
    #mobile-nav    { display: flex; }

    main { padding-top: 68px !important; padding-bottom: 76px !important; }

    h1.page-title { font-size: 26px; }

    .panel { padding: 16px; }
    .panel-head { flex-wrap: wrap; gap: 8px; }

    .topbar {
      flex-direction: column; align-items: flex-start;
      gap: 10px; margin-bottom: 16px;
    }
    .greet-eyebrow { margin-bottom: 4px; }

    /* Range buttons: scrollable */
    #menu-tabs {
      overflow-x: auto; flex-wrap: nowrap;
      scrollbar-width: none; -webkit-overflow-scrolling: touch;
      max-width: 100%;
    }
    #menu-tabs::-webkit-scrollbar { display: none; }
    .range { flex-wrap: nowrap; }
    #range { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    #range::-webkit-scrollbar { display: none; }

    /* Orders table horizontal scroll */
    .orders table { min-width: 560px; display: table; }
    .panel.orders { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Full orders table */
    #orders-full-panel table { min-width: 560px; }
    #orders-full-panel { overflow-x: auto; }

    /* 2-col rows → single column */
    .w-row { grid-template-columns: 1fr !important; }
    .link-row { grid-template-columns: 40px 1fr auto !important; }
    #tmpl-settings-body { grid-template-columns: 1fr !important; }

    /* Stats: 2 cols */
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* Kitchen cards scroll */
    #kitchen-board { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Modals full-screen on mobile */
    #mi-modal-wrap .panel { border-radius: 20px 20px 0 0; width: 100%; max-height: 90vh; }

    /* Template phone preview hidden on mobile (not enough space) */
    .phone-sticky { display: none !important; }
    [data-mt="sablon"] > div { grid-template-columns: 1fr !important; }
    [data-mt="welcome"] > div { grid-template-columns: 1fr !important; }

    /* ── iOS zoom önleme: tüm input/select/textarea 16px olmalı ── */
    input, select, textarea { font-size: 16px !important; }

    /* ── Touch hedefleri: minimum 44px ── */
    .mn-item { min-height: 44px; padding: 6px 4px; }
    .mn-sheet-item { min-height: 48px; padding: 13px 16px; }
    .range button { min-height: 36px; padding: 8px 12px; }

    /* ── Siparişler tablosu: ürünler sütununu gizle, kompakt görünüm ── */
    #orders-full-panel table,
    .panel.orders table { font-size: 13px; min-width: unset; width: 100%; }
    #orders-full-panel th:nth-child(3),
    #orders-full-panel td:nth-child(3),
    .panel.orders th:nth-child(3),
    .panel.orders td:nth-child(3) { display: none; }
    #orders-full-panel th:nth-child(6),
    #orders-full-panel td:nth-child(6),
    .panel.orders th:nth-child(6),
    .panel.orders td:nth-child(6) { display: none; }
    #orders-full-panel { overflow-x: unset; }
    .panel.orders { overflow-x: unset; }

    /* ── Modal içerikleri mobilde tam yükseklik + kaydırma ── */
    #mi-modal-wrap .panel { overflow-y: auto; }
    #od-modal > div { max-height: 92vh; overflow-y: auto; width: calc(100% - 24px); border-radius: 16px; }
    #pin-modal > div,
    #set-pin-modal > div,
    #pin-auth-modal > div { width: calc(100% - 32px); max-height: 90vh; overflow-y: auto; }

    /* ── Ayarlar sayfası input genişlikleri ── */
    .field input, .field select, .field textarea { width: 100%; }

    /* ── Tablo başlıkları mobilde daha sıkışık ── */
    .panel-head { padding: 14px 0 10px; }
    .panel-head h2 { font-size: 15px; }
  }

  @media (max-width: 520px) {
    main { padding: 68px 12px 76px !important; }
    .stat { padding: 12px 14px; }
    .stat .val { font-size: 24px; }
    h1.page-title { font-size: 22px; }
    .panel { padding: 14px; }
    .stats-grid { gap: 8px; }
    .topbar { margin-bottom: 12px; }
    .range button { padding: 7px 10px; font-size: 12px; }
    .orders th, .orders td { padding: 10px 14px; font-size: 12.5px; }
    .bgtype-tabs { grid-template-columns: repeat(5, 1fr); }
    .bgtype-tabs button { font-size: 10px; padding: 6px 2px; }

    /* ── Küçük ekranda modaller tam genişlik ── */
    #od-modal > div { width: 100%; border-radius: 16px 16px 0 0; position: absolute; bottom: 0; max-height: 94vh; }
    #pin-modal > div,
    #set-pin-modal > div,
    #pin-auth-modal > div { width: 100%; border-radius: 20px 20px 0 0; position: absolute; bottom: 0; }
    #pin-modal, #set-pin-modal, #pin-auth-modal { align-items: flex-end; }
    #od-modal { align-items: flex-end; }
  }
