/* Shared styles for login / profile / admin pages (Westo). */

:root {
  --p-bg: #08090b;
  --p-surface: #111318;
  --p-surface-2: #1a1d24;
  --p-border: #2a2f3a;
  --p-text: #f2efe8;
  --p-text-dim: #9a958c;
  --p-accent: #78d0d8;
  --p-accent-ink: #0a1a1c;
  --p-danger: #ff7676;
  --p-ok: #7dd87d;
  --p-warn: #e8a85a;
  --p-radius: 18px;
  --p-radius-sm: 8px;
  --p-radius-md: 12px;
  --p-radius-lg: 18px;
  --p-radius-xl: 24px;
  --p-sidebar: 268px;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../assets/fonts/Vazirmatn-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

* { box-sizing: border-box; }

body.panel-body {
  margin: 0;
  min-height: 100vh;
  background: var(--p-bg);
  color: var(--p-text);
  font-family: 'Vazirmatn', 'Geist', sans-serif;
  direction: rtl;
}

.panel-body a { color: inherit; }

/* ---------- auth card (login / profile) ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(60% 50% at 50% 0%, #202020 0%, transparent 70%),
    var(--p-bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.05) 42%,
      rgba(14, 12, 11, 0.62) 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--wg-r-panel, var(--p-radius));
  corner-shape: squircle;
  padding: 2.25rem 2rem;
  -webkit-backdrop-filter: blur(var(--wg-blur-panel, 18px)) saturate(1.15);
  backdrop-filter: blur(var(--wg-blur-panel, 18px)) saturate(1.15);
  box-shadow:
    0 1.2rem 2.8rem rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.auth-logo {
  display: block;
  margin: 0 auto 1.5rem;
  height: 48px;
  width: auto;
  max-width: 14rem;
  object-fit: contain;
}

.auth-title {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
}

.auth-sub {
  margin: 0 0 1.75rem;
  color: var(--p-text-dim);
  font-size: 0.9rem;
  text-align: center;
}

.field { margin-bottom: 1rem; }

.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--p-text-dim);
  margin-bottom: 0.4rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--p-text);
  border-radius: 12px;
  corner-shape: squircle;
  padding: 0.8rem 0.9rem;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color 0.15s, background 0.15s;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(120, 208, 216, 0.45);
  background: rgba(255, 255, 255, 0.09);
}

.field input[dir='ltr'] { text-align: left; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  overflow: hidden;
  background: var(--wg-chip-bg, linear-gradient(160deg, rgba(255,255,255,0.18), rgba(12,10,9,0.42)));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--wg-r-chip, 12px);
  corner-shape: squircle;
  padding: 0.9rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-backdrop-filter: blur(var(--wg-blur, 12px));
  backdrop-filter: blur(var(--wg-blur, 12px));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22);

/* Apple Squircle Checkbox Primitives (iOS Superellipse) */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  min-width: 17px;
  min-height: 17px;
  margin: 0;
  vertical-align: middle;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  corner-shape: squircle;
  background-color: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  position: relative;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
input[type="checkbox"]:hover:not(:disabled) {
  border-color: var(--p-accent, #78d0d8);
  box-shadow: 0 0 0 2px rgba(120, 208, 216, 0.18);
}
input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: var(--p-accent, #78d0d8);
  box-shadow: 0 0 0 3px rgba(120, 208, 216, 0.28);
}
input[type="checkbox"]:checked {
  background-color: var(--p-accent, #78d0d8) !important;
  border-color: var(--p-accent, #78d0d8) !important;
}
input[type="checkbox"]:checked::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid var(--p-accent-ink, #0a1a1c);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-0.5px, -1px);
}
input[type="checkbox"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s var(--wg-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    opacity 0.15s;
}
.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44%;
  background: linear-gradient(rgba(255, 255, 255, 0.22) 0%, transparent 100%);
  pointer-events: none;
}
.btn > * { position: relative; z-index: 1; }

.btn:hover:not(:disabled) {
  opacity: 1;
  background: var(--wg-chip-bg-hover, rgba(255, 255, 255, 0.18));
  border-color: rgba(120, 208, 216, 0.45);
  transform: translateY(-2px);
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--p-text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.btn.btn-danger {
  background: linear-gradient(160deg, rgba(255, 118, 118, 0.35), rgba(80, 20, 20, 0.55));
  color: #fff;
  border-color: rgba(255, 118, 118, 0.35);
}
.btn.btn-sm { width: auto; padding: 0.45rem 1rem; font-size: 0.85rem; min-height: 2.4rem; }

.msg { font-size: 0.85rem; margin: 0.6rem 0 0; text-align: center; min-height: 1.2em; }
.msg.error { color: var(--p-danger); }
.msg.ok { color: var(--p-ok); }

.demo-code {
  background: var(--p-surface-2);
  border: 1px dashed #444;
  border-radius: 10px;
  padding: 0.7rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  text-align: center;
  color: var(--p-text-dim);
}
.demo-code b { color: var(--p-text); font-size: 1.15rem; letter-spacing: 0.3em; direction: ltr; display: inline-block; }

.otp-boxes {
  display: flex;
  gap: 0.5rem;
  direction: ltr;
  justify-content: center;
  margin-bottom: 1rem;
}
.otp-boxes input {
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: 1.5rem;
  background: var(--p-surface-2);
  border: 1px solid var(--p-border);
  border-radius: 10px;
  color: var(--p-text);
  outline: none;
}
.otp-boxes input:focus {
  border-color: #78d0d8;
  box-shadow: 0 0 0 3px rgba(120, 208, 216, 0.25);
}

.auth-foot {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--p-text-dim);
}

.hidden { display: none !important; }

/* ---------- admin layout ---------- */
.admin-layout { display: flex; min-height: 100vh; background:
  radial-gradient(80% 50% at 100% 0%, rgba(120, 208, 216, 0.08), transparent 55%),
  var(--p-bg);
}

.admin-sidebar {
  width: var(--p-sidebar, 268px);
  flex-shrink: 0;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.06) 0%,
      rgba(14, 16, 20, 0.88) 40%,
      rgba(10, 11, 14, 0.94) 100%
    );
  border-inline-end: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0.85rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.admin-sidebar .brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.35rem 0.55rem 1.1rem;
}
.admin-sidebar .brand img { height: 28px; }
.brand-text { display: flex; flex-direction: column; gap: 0.1rem; line-height: 1.2; }
.brand-text strong { font-size: 0.95rem; font-weight: 800; }
.brand-text span { font-size: 0.72rem; color: var(--p-text-dim); }

.nav-group { margin-bottom: 0.65rem; }
.nav-label {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--p-text-dim);
  padding: 0.55rem 0.8rem 0.25rem;
  font-weight: 600;
}

.admin-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.58rem 0.8rem;
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--p-text-dim);
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  text-align: right;
  width: 100%;
  overflow: hidden;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--p-text);
  border-color: rgba(255, 255, 255, 0.08);
}
.admin-nav-item.active {
  background: var(--wg-chip-bg, rgba(255, 255, 255, 0.1));
  color: var(--wg-ink, var(--p-text));
  font-weight: 700;
  border-color: rgba(120, 208, 216, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.admin-sidebar .spacer { flex: 1; min-height: 1rem; }

.admin-shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--p-border);
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.admin-topbar-title { font-weight: 800; font-size: 1.05rem; }
.admin-topbar-meta { margin-inline-start: auto; color: var(--p-text-dim); font-size: 0.78rem; }
.admin-menu-toggle {
  display: none;
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--p-text);
  border-radius: var(--wg-r-btn, 0.8rem);
  width: 2.4rem;
  height: 2.4rem;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.admin-main { flex: 1; padding: 1.5rem 2rem 3rem; max-width: 1180px; }
.admin-main h1 { font-size: 1.55rem; margin: 0 0 0.35rem; font-weight: 800; }
.admin-main .lead {
  margin: 0 0 1.35rem;
  color: var(--p-text-dim);
  font-size: 0.9rem;
  max-width: 46rem;
  line-height: 1.55;
}
.hint { color: var(--p-text-dim); font-size: 0.78rem; margin: 0.6rem 0 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.85rem; margin-bottom: 1.5rem; }
.cards-dense { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.card {
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(18, 16, 18, 0.72) 55%,
      rgba(10, 9, 11, 0.82) 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--p-radius);
  corner-shape: squircle;
  padding: 1.1rem 1.15rem;
  position: relative;
  overflow: hidden;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.card.accent {
  border-color: rgba(120, 208, 216, 0.4);
  background:
    linear-gradient(
      160deg,
      rgba(120, 208, 216, 0.16),
      rgba(18, 16, 18, 0.75)
    );
}
.card.warn { border-color: rgba(232, 168, 90, 0.35); }
.card .num { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; }
.card .lbl { color: var(--p-text-dim); font-size: 0.8rem; margin-top: 0.3rem; }

.grid-2-main { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0.5rem; }
@media (max-width: 980px) { .grid-2-main { grid-template-columns: 1fr; } }

.spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 64px;
  padding: 0.25rem 0;
}
.spark-bar {
  flex: 1;
  min-width: 4px;
  background: linear-gradient(180deg, var(--p-accent), rgba(120,208,216,0.25));
  border-radius: 3px 3px 1px 1px;
  opacity: 0.9;
}

.section-box {
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.08) 0%,
      rgba(18, 16, 18, 0.78) 55%,
      rgba(10, 9, 11, 0.88) 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--p-radius);
  padding: 1.35rem;
  margin-bottom: 1.25rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.section-box h2 { margin: 0 0 1rem; font-size: 1.02rem; }
.section-box h2 small { color: var(--p-text-dim); font-weight: 400; font-size: 0.8rem; margin-inline-start: 0.5rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } .admin-main { padding: 1.1rem 1rem 2.5rem; } }

table.tbl { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.tbl th, .tbl td { padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--p-border); text-align: right; vertical-align: middle; }
.tbl th { color: var(--p-text-dim); font-weight: 600; font-size: 0.78rem; }
.tbl td.ltr { direction: ltr; text-align: left; }
.ltr-input { direction: ltr; text-align: left; width: 100%; max-width: 9rem; background: var(--p-surface-2); border: 1px solid var(--p-border); color: var(--p-text); border-radius: 8px; padding: 0.45rem 0.55rem; font-family: inherit; }
.hours-tbl input[type="time"] {
  background: var(--p-surface-2);
  border: 1px solid var(--p-border);
  color: var(--p-text);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  font-family: inherit;
}
.chk { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--p-text-dim); }

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: var(--p-text-dim);
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.chip:has(input:checked) {
  border-color: rgba(120, 208, 216, 0.45);
  color: var(--wg-ink, var(--p-text));
  background: var(--wg-chip-bg, rgba(120, 208, 216, 0.12));
}
.chip input { accent-color: var(--p-accent); }

.pill { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.72rem; border: 1px solid var(--p-border); }
.pill.admin { background: #2b2340; border-color: #4c3d78; }
.pill.blocked { background: #401f1f; border-color: #7a3535; color: var(--p-danger); }
.pill.ok { background: #1a3320; border-color: #2f6b3e; color: var(--p-ok); }

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 50%;
  transform: translateX(50%);
  background: var(--p-surface-2);
  border: 1px solid var(--p-border);
  color: var(--p-text);
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 99;
}
.toast.show { opacity: 1; }

.row-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.save-bar { margin-top: 1rem; display: flex; gap: 0.75rem; align-items: center; }

.logo-preview {
  background: repeating-conic-gradient(#222 0% 25%, #191919 0% 50%) 0 / 24px 24px;
  border: 1px solid var(--p-border);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
}
.logo-preview img { max-height: 60px; max-width: 100%; }

/* ---- Kitchen Display System ---- */
.kds-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}
@media (max-width: 980px) {
  .kds-board { grid-template-columns: 1fr; }
}
.kds-col {
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 0.85rem;
  min-height: 12rem;
}
.kds-col h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.kds-col h2 small { color: var(--p-text-dim); font-weight: 500; }
.kds-card {
  background: var(--p-surface-2);
  border: 1px solid var(--p-border);
  border-radius: 12px;
  padding: 0.8rem 0.85rem;
  margin-bottom: 0.65rem;
}
.kds-card.is-warn { border-color: rgba(232, 168, 90, 0.55); }
.kds-card.is-late {
  border-color: rgba(255, 118, 118, 0.65);
  box-shadow: 0 0 0 1px rgba(255, 118, 118, 0.2);
}
.kds-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.kds-age {
  font-size: 0.78rem;
  color: var(--p-accent);
  font-variant-numeric: tabular-nums;
  direction: ltr;
}
.kds-id { font-size: 0.72rem; color: var(--p-text-dim); margin-bottom: 0.45rem; }
.kds-items {
  margin: 0 0 0.7rem;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  line-height: 1.45;
}
.kds-items li { margin-bottom: 0.2rem; }
.kds-items b { color: var(--p-accent); margin-inline-end: 0.25rem; }
.kds-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.kds-ready-note { color: var(--p-accent); font-size: .74rem; font-weight: 750; }
.kds-calls { border-color: rgba(120, 208, 216, 0.35); }
.kds-cancelled-lane--admin { margin: 0 0 1rem; padding: .8rem; border: 1px solid color-mix(in srgb,var(--ops-danger,#d04b55) 42%,var(--p-border)); border-radius: var(--p-radius); background: var(--p-surface); color: var(--p-text); }
.kds-cancelled-lane--admin > .ops-panel__head { margin-bottom: .45rem; }
.kds-cancelled-lane--admin > .ops-panel__head h2 { margin: 0; font-size: 1rem; }
.kds-cancelled-lane--admin > .hint { margin: .4rem 0 .7rem; }
.kds-cancelled-lane--admin__list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,14rem),1fr)); gap: .55rem; }
.kds-cancelled-card { min-width: 0; padding: .65rem .75rem; border: 1px solid color-mix(in srgb,var(--ops-danger,#d04b55) 28%,var(--p-border)); border-radius: 12px; background: color-mix(in srgb,var(--ops-danger,#d04b55) 6%,var(--p-surface-2)); }
.kds-cancelled-card header { display: flex; justify-content: space-between; gap: .5rem; color: var(--p-text); }
.kds-cancelled-card header span { color: var(--p-text-dim); direction: ltr; }
.kds-cancelled-card__time,.kds-cancelled-card__note { margin: .25rem 0; color: var(--p-text-dim); font-size: .75rem; }
.kds-cancelled-card__time { color: var(--ops-danger,#d04b55); font-weight: 750; }
.kds-cancelled-card ul { margin: .35rem 0 0; padding-inline-start: 1.1rem; color: var(--p-text); line-height: 1.6; }
.kds-cancelled-card li b { color: var(--ops-danger,#d04b55); }
.kds-cancelled-card__note { display: grid; gap: .15rem; }
.kds-cancelled-card__note b { color: var(--p-text); }

.branch-select-wrap {
  margin-inline-start: auto;
  margin-inline-end: 0.75rem;
}
.branch-select {
  appearance: none;
  background: var(--p-surface, #111318);
  color: var(--p-text, #ece8e2);
  border: 1px solid var(--p-border, #2a2f3a);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: 0.82rem;
  max-width: 11rem;
  cursor: pointer;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.color-row input[type="color"] {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--p-border, #2a2f3a);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.color-row .ltr-input {
  flex: 1;
  min-width: 0;
}
.theme-preview {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--p-radius, 14px);
  background: var(--p-bg, #08090b);
  border: 1px solid var(--p-border, #2a2f3a);
}
.theme-preview__bar {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--p-accent-ink, #0a1a1c);
  background: var(--p-accent, #78d0d8);
  padding: 0.55rem 0.85rem;
  border-radius: calc(var(--p-radius, 14px) - 4px);
}
.theme-preview__card {
  background: var(--p-surface, #111318);
  color: var(--p-text, #ece8e2);
  padding: 0.9rem 1rem;
  border-radius: calc(var(--p-radius, 14px) - 4px);
  border: 1px solid var(--p-border, #2a2f3a);
}
.theme-preview__card .btn {
  background: var(--p-accent, #78d0d8);
  color: var(--p-accent-ink, #0a1a1c);
}

/* ---- Menu studio (food menu admin) ---- */
.menu-studio {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.menu-studio__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}
.menu-studio__toolbar .field {
  margin: 0;
  flex: 1 1 14rem;
  min-width: 10rem;
}
.menu-studio__toolbar .field input {
  margin: 0;
}
.menu-studio__toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-inline-start: auto;
}
.menu-studio__toolbar-actions .btn {
  width: auto;
  min-width: 0;
}
.menu-studio__cats {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.15rem 0.1rem 0.35rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.menu-studio__cat {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--p-text-dim);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.menu-studio__cat:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--p-text);
}
.menu-studio__cat.is-on {
  background: var(--wg-chip-bg, rgba(255, 255, 255, 0.12));
  border-color: rgba(120, 208, 216, 0.45);
  color: var(--wg-ink, var(--p-text));
}
.menu-studio__list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.menu-studio__row {
  display: grid;
  grid-template-columns: 3.1rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.08) 0%,
      rgba(18, 16, 18, 0.55) 100%
    );
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.menu-studio__row:hover,
.menu-studio__row.is-active {
  border-color: rgba(120, 208, 216, 0.4);
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.12) 0%,
      rgba(24, 20, 18, 0.7) 100%
    );
}
.menu-studio__thumb {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 0.75rem;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
}
.menu-studio__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.menu-studio__thumb-ph {
  font-size: 0.68rem;
  color: var(--p-text-dim);
  opacity: 0.7;
}
.menu-studio__meta {
  min-width: 0;
}
.menu-studio__meta strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.menu-studio__meta span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--p-text-dim);
  direction: ltr;
  text-align: right;
}
.menu-studio__row-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.menu-studio__row-actions .btn {
  width: auto;
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
  min-height: 2.1rem;
}
.menu-studio__empty {
  text-align: center;
  color: var(--p-text-dim);
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
}

.menu-studio__drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.menu-studio__drawer-scrim[hidden] { display: none !important; }

.menu-studio__drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  z-index: 81;
  width: min(26rem, 100vw);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.1rem 1.1rem 2rem;
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(18, 16, 18, 0.88) 45%,
      rgba(10, 9, 11, 0.94) 100%
    );
  border-inline-start: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  box-shadow:
    -0.5rem 0 2rem rgba(0, 0, 0, 0.4),
    inset 1px 0 0 rgba(255, 255, 255, 0.06);
}
.menu-studio__drawer[hidden] { display: none !important; }
.menu-studio__drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.menu-studio__drawer-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
}
.menu-studio__drawer-close {
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--p-text);
  font-size: 1.15rem;
  cursor: pointer;
  line-height: 1;
}
.menu-studio__drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 9.5rem;
  margin-bottom: 1rem;
  padding: 0.85rem;
  border-radius: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  text-align: center;
}
.menu-studio__drop.has-img {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.14);
  padding: 0;
  min-height: 11rem;
}
.menu-studio__drop img {
  width: 100%;
  height: 11rem;
  object-fit: cover;
  display: block;
}
.menu-studio__drop-hint {
  font-size: 0.82rem;
  color: var(--p-text-dim);
  pointer-events: none;
}
.menu-studio__drop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.55rem;
}
.menu-studio__drop-actions .btn {
  width: auto;
  font-size: 0.8rem;
  padding: 0.45rem 0.85rem;
  min-height: 2.2rem;
}
.menu-studio__drop.has-img .menu-studio__drop-actions {
  position: absolute;
  inset-inline: 0.55rem;
  bottom: 0.55rem;
  margin: 0;
}
.menu-studio__advanced {
  margin: 0.75rem 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 0, 0, 0.18);
}
.menu-studio__advanced summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 0.88rem;
  color: var(--p-text-dim);
  list-style: none;
}
.menu-studio__advanced summary::-webkit-details-marker { display: none; }
.menu-studio__advanced[open] summary {
  color: var(--p-text);
  margin-bottom: 0.75rem;
}
.menu-studio__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.35rem 0 0.85rem;
  font-size: 0.78rem;
}
.menu-studio__links button {
  appearance: none;
  border: 0;
  background: none;
  color: var(--wg-gold, var(--p-accent));
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.menu-studio__cat-mgr {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.75rem;
}
.menu-studio__cat-card {
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 0.55rem;
}
.menu-studio__cat-card .field label {
  font-size: 0.72rem;
}
.menu-studio__cat-row input {
  flex: 1;
}
.menu-studio__cat-row .btn {
  width: auto;
  flex: 0 0 auto;
}

.menu-studio-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.menu-studio-modal[hidden] { display: none !important; }
.menu-studio-modal__card {
  width: min(24rem, 100%);
  max-height: min(80vh, 32rem);
  overflow-y: auto;
  padding: 1.25rem 1.15rem 1.35rem;
  border-radius: var(--wg-r-panel, 1.35rem);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.12) 0%,
      rgba(14, 12, 11, 0.82) 100%
    );
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 1.2rem 2.8rem rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.menu-studio-modal__card h3 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
}

@media (max-width: 720px) {
  .menu-studio__row {
    grid-template-columns: 2.75rem 1fr;
  }
  .menu-studio__row-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  .menu-studio__drawer {
    width: 100%;
  }
}

.mobile-topbar { display: none; }
@media (max-width: 860px) {
  .admin-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    transform: translateX(110%);
    transition: transform 0.25s ease;
    box-shadow: -12px 0 40px rgba(0,0,0,0.45);
  }
  html[dir="rtl"] .admin-sidebar { inset: 0 0 0 auto; transform: translateX(-110%); }
  body.sidebar-open .admin-sidebar { transform: translateX(0); }
}

/* ---- Sitewide light theme (guest forms + admin) ---- */
html[data-theme='light'] {
  --p-bg: #ebe4d6;
  --p-surface: #fdfbf7;
  --p-surface-2: #efe6d8;
  --p-border: rgba(26, 23, 20, 0.12);
  --p-text: #1a1714;
  --p-text-dim: #6b645c;
  --p-accent: #2a7a86;
  --p-accent-ink: #f4efe6;
}

html[data-theme='light'] .auth-wrap {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(42, 122, 134, 0.14) 0%, transparent 70%),
    linear-gradient(165deg, #f3ede2 0%, var(--p-bg) 50%, #e3d9c8 100%);
}

html[data-theme='light'] .auth-card {
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(248, 243, 234, 0.92) 42%,
      rgba(236, 228, 214, 0.95) 100%
    );
  border-color: rgba(26, 23, 20, 0.1);
  box-shadow:
    0 1.2rem 2.8rem rgba(26, 23, 20, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

html[data-theme='light'] .admin-sidebar {
  background: var(--p-surface);
  border-color: var(--p-border);
}

html[data-theme='light'] .admin-nav-item.active {
  background: linear-gradient(135deg, rgba(42, 122, 134, 0.22), rgba(42, 122, 134, 0.08));
  border-color: rgba(42, 122, 134, 0.45);
}

html[data-theme='light'] .stat-card,
html[data-theme='light'] .dash-card,
html[data-theme='light'] .panel-card,
html[data-theme='light'] .card,
html[data-theme='light'] .section-box {
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(248, 243, 234, 0.92) 45%,
      rgba(236, 228, 214, 0.95) 100%
    );
  border-color: var(--p-border);
  box-shadow:
    0 0.4rem 1.1rem rgba(26, 23, 20, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

html[data-theme='light'] .card.accent {
  border-color: rgba(42, 122, 134, 0.4);
  background:
    linear-gradient(
      160deg,
      rgba(42, 122, 134, 0.18),
      rgba(255, 252, 247, 0.92)
    );
}

html[data-theme='light'] .menu-studio__row {
  border-color: var(--p-border);
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.92) 0%,
      rgba(243, 238, 230, 0.9) 100%
    );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

html[data-theme='light'] .menu-studio__row:hover,
html[data-theme='light'] .menu-studio__row.is-active {
  border-color: rgba(42, 122, 134, 0.45);
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(248, 240, 224, 0.95) 100%
    );
}

html[data-theme='light'] .menu-studio__thumb {
  background: rgba(26, 23, 20, 0.04);
  border-color: var(--p-border);
}

html[data-theme='light'] .menu-studio__drawer {
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(248, 243, 234, 0.96) 45%,
      rgba(236, 228, 214, 0.98) 100%
    );
  border-inline-start-color: var(--p-border);
  box-shadow:
    -0.5rem 0 2rem rgba(26, 23, 20, 0.12),
    inset 1px 0 0 rgba(255, 255, 255, 0.6);
}

html[data-theme='light'] .menu-studio__drawer-head {
  border-bottom-color: var(--p-border);
}

html[data-theme='light'] .admin-layout {
  background: var(--p-bg) !important;
}

html[data-theme='light'] .admin-topbar {
  background: rgba(255, 252, 247, 0.9);
  border-bottom: 1px solid var(--p-border);
}

html[data-theme='light'] .admin-nav-item:hover {
  background: rgba(26, 23, 20, 0.05);
}

html[data-theme='light'] .kpi,
html[data-theme='light'] .metric,
html[data-theme='light'] .tile,
html[data-theme='light'] .box,
html[data-theme='light'] .table-wrap,
html[data-theme='light'] table {
  color: var(--p-text);
}

.admin-theme-switch {
  display: flex;
  gap: 0.35rem;
  margin: 0.75rem 0.85rem 0.25rem;
  padding: 0.28rem;
  border-radius: 999px;
  border: 1px solid var(--p-border);
  background: var(--p-surface-2);
}

.admin-theme-switch .navbar_theme-btn {
  appearance: none;
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.5rem;
  background: transparent;
  color: var(--p-text-dim);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-theme-switch .navbar_theme-btn.is-active,
.admin-theme-switch .navbar_theme-btn[aria-pressed='true'] {
  background: var(--p-surface);
  color: var(--p-text);
  box-shadow: inset 0 0 0 1px rgba(42, 122, 134, 0.4);
}

/* ---- Light loop stages 7–8: forms + admin CTAs ---- */
html[data-theme='light'] .btn {
  background: var(--wg-cta-bg, #1a1714);
  color: var(--wg-cta-ink, #f7f2ea);
  border-color: transparent;
  box-shadow: 0 0.55rem 1.25rem rgba(26, 23, 20, 0.16);
}

html[data-theme='light'] .btn::after {
  opacity: 0.12;
}

html[data-theme='light'] .btn:hover:not(:disabled) {
  background: #2a2521;
  border-color: rgba(42, 122, 134, 0.45);
  color: var(--wg-cta-ink, #f7f2ea);
}

html[data-theme='light'] .btn.btn-ghost {
  background: rgba(26, 23, 20, 0.06);
  color: var(--p-text);
  border-color: rgba(26, 23, 20, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

html[data-theme='light'] .btn.btn-ghost:hover:not(:disabled) {
  background: rgba(26, 23, 20, 0.1);
  border-color: rgba(26, 23, 20, 0.22);
  color: var(--p-text);
}

html[data-theme='light'] .field input,
html[data-theme='light'] .field textarea,
html[data-theme='light'] .field select {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(26, 23, 20, 0.14);
  color: var(--p-text);
}

html[data-theme='light'] .field input:focus,
html[data-theme='light'] .field textarea:focus,
html[data-theme='light'] .field select:focus {
  background: #fffcf7;
  border-color: rgba(42, 122, 134, 0.45);
}

html[data-theme='light'] .field label {
  color: var(--p-text-dim);
}

html[data-theme='light'] .toast {
  background: rgba(26, 23, 20, 0.92);
  color: #f7f2ea;
}

html[data-theme='light'] .admin-main,
html[data-theme='light'] .admin-shell {
  color: var(--p-text);
}

html[data-theme='light'] .tbl th {
  color: var(--p-text-dim);
}

html[data-theme='light'] .tbl td {
  color: var(--p-text);
  border-bottom-color: var(--p-border);
}

html[data-theme='light'] input[type='text'],
html[data-theme='light'] input[type='number'],
html[data-theme='light'] input[type='email'],
html[data-theme='light'] input[type='tel'],
html[data-theme='light'] textarea,
html[data-theme='light'] select {
  color: var(--p-text);
}

/* ---- Pass2 stage8: admin residual ---- */
html[data-theme='light'] .spark-bar {
  opacity: 0.95;
}
html[data-theme='light'] .section-box h2,
html[data-theme='light'] .section-box h2 small {
  color: var(--p-text);
}
html[data-theme='light'] .section-box h2 small {
  color: var(--p-text-dim);
}
html[data-theme='light'] .admin-topbar,
html[data-theme='light'] .admin-topbar * {
  color: var(--p-text);
}
html[data-theme='light'] .color-row input[type='text'],
html[data-theme='light'] .ltr-input {
  background: var(--p-surface);
  color: var(--p-text);
  border-color: var(--p-border);
}
html[data-theme='light'] .faq-admin textarea,
html[data-theme='light'] .newsletter-admin input {
  background: var(--p-surface);
  color: var(--p-text);
  border-color: var(--p-border);
}

/* ---- Pass3 stage7: guest forms residual ---- */
html[data-theme='light'] .otp-boxes input {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(26, 23, 20, 0.16);
  color: #1a1714;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
html[data-theme='light'] .otp-boxes input:focus {
  border-color: rgba(42, 122, 134, 0.55);
  box-shadow: 0 0 0 1px rgba(42, 122, 134, 0.35);
}
html[data-theme='light'] .auth-logo {
  filter: brightness(0) saturate(100%) invert(10%);
}
html[data-theme='light'] .auth-sub,
html[data-theme='light'] .auth-foot,
html[data-theme='light'] .hint {
  color: #4a453e;
}
html[data-theme='light'] .auth-title,
html[data-theme='light'] .reserve-brand h1,
html[data-theme='light'] .fb-brand h1,
html[data-theme='light'] .profile-brand h1 {
  color: #1a1714;
}
html[data-theme='light'] .reserve-brand p,
html[data-theme='light'] .fb-brand p {
  color: rgba(26, 23, 20, 0.58);
}
html[data-theme='light'] .hint a,
html[data-theme='light'] .auth-foot a,
html[data-theme='light'] .panel-body a:not(.btn) {
  color: rgba(26, 23, 20, 0.82);
  text-decoration-color: rgba(42, 122, 134, 0.55);
}
html[data-theme='light'] .score-btn {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(26, 23, 20, 0.14);
  color: #1a1714;
}
html[data-theme='light'] .score-btn.is-on {
  background: var(--wg-cta-bg, #1a1714);
  color: var(--wg-cta-ink, #f7f2ea);
  border-color: transparent;
}
html[data-theme='light'] .score-hint {
  color: rgba(26, 23, 20, 0.5);
}
html[data-theme='light'] .fb-done {
  background: rgba(255, 252, 247, 0.96);
  border-color: rgba(26, 23, 20, 0.12);
  color: #1a1714;
}
html[data-theme='light'] .panel-body {
  background:
    radial-gradient(60% 45% at 50% 0%, rgba(42, 122, 134, 0.12) 0%, transparent 65%),
    var(--p-bg, #f3eee6);
  color: var(--p-text, #1a1714);
}
html[data-theme='light'] .field input::placeholder,
html[data-theme='light'] .field textarea::placeholder {
  color: rgba(26, 23, 20, 0.4);
}

/* ---- Pass3 stage8: admin chips/pills/studio residual ---- */
html[data-theme='light'] .chip {
  background: rgba(26, 23, 20, 0.05);
  border-color: rgba(26, 23, 20, 0.12);
  color: rgba(26, 23, 20, 0.72);
}
html[data-theme='light'] .chip:has(input:checked) {
  background: rgba(42, 122, 134, 0.16);
  border-color: rgba(42, 122, 134, 0.45);
  color: #1a1714;
}
html[data-theme='light'] .pill {
  background: rgba(26, 23, 20, 0.06);
  border-color: rgba(26, 23, 20, 0.14);
  color: rgba(26, 23, 20, 0.72);
}
html[data-theme='light'] .pill.admin {
  background: rgba(90, 70, 140, 0.12);
  border-color: rgba(90, 70, 140, 0.35);
  color: #3d2f6b;
}
html[data-theme='light'] .pill.blocked {
  background: rgba(160, 60, 50, 0.1);
  border-color: rgba(160, 60, 50, 0.35);
  color: #8c2d28;
}
html[data-theme='light'] .pill.ok {
  background: rgba(40, 120, 70, 0.1);
  border-color: rgba(40, 120, 70, 0.35);
  color: #1f5c38;
}
html[data-theme='light'] .admin-menu-toggle {
  background: rgba(26, 23, 20, 0.06);
  border-color: rgba(26, 23, 20, 0.14);
  color: #1a1714;
}
html[data-theme='light'] .menu-studio__cat {
  background: rgba(26, 23, 20, 0.04);
  border-color: rgba(26, 23, 20, 0.1);
  color: rgba(26, 23, 20, 0.72);
}
html[data-theme='light'] .menu-studio__cat:hover {
  background: rgba(26, 23, 20, 0.08);
  color: #1a1714;
}
html[data-theme='light'] .menu-studio__cat.is-on {
  background: rgba(26, 23, 20, 0.1);
  border-color: rgba(42, 122, 134, 0.4);
  color: #1a1714;
}
html[data-theme='light'] .menu-studio__empty,
html[data-theme='light'] .menu-studio__drop-hint,
html[data-theme='light'] .menu-studio__meta span {
  color: rgba(26, 23, 20, 0.55);
}
html[data-theme='light'] .menu-studio__meta strong {
  color: #1a1714;
}
html[data-theme='light'] .menu-studio__drop {
  background: rgba(26, 23, 20, 0.03);
  border-color: rgba(26, 23, 20, 0.14);
}
html[data-theme='light'] .menu-studio__drop.has-img {
  border-color: rgba(26, 23, 20, 0.18);
}
html[data-theme='light'] .menu-studio__drawer-close {
  background: rgba(26, 23, 20, 0.06);
  border-color: rgba(26, 23, 20, 0.14);
  color: rgba(26, 23, 20, 0.72);
}
html[data-theme='light'] .menu-studio__drawer-close:hover {
  background: rgba(26, 23, 20, 0.1);
  color: #1a1714;
}
html[data-theme='light'] .menu-studio-modal__card {
  background: rgba(255, 252, 247, 0.98);
  border-color: rgba(26, 23, 20, 0.12);
  color: #1a1714;
  box-shadow: 0 1.2rem 2.8rem rgba(26, 23, 20, 0.16);
}
html[data-theme='light'] .menu-studio__cat-card {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(26, 23, 20, 0.1);
}
html[data-theme='light'] .hours-tbl input[type='time'] {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(26, 23, 20, 0.14);
  color: #1a1714;
}
html[data-theme='light'] .kpi .muted,
html[data-theme='light'] .stat-card .muted,
html[data-theme='light'] .dash-card .muted,
html[data-theme='light'] .admin-nav-item {
  color: rgba(26, 23, 20, 0.62);
}
html[data-theme='light'] .admin-nav-item.active {
  color: #1a1714;
}
html[data-theme='light'] .admin-theme-switch {
  background: rgba(26, 23, 20, 0.05);
  border-color: rgba(26, 23, 20, 0.12);
}
html[data-theme='light'] .admin-theme-switch .navbar_theme-btn.is-active,
html[data-theme='light'] .admin-theme-switch .navbar_theme-btn[aria-pressed='true'] {
  background: rgba(255, 252, 247, 0.95);
  color: #1a1714;
  box-shadow: inset 0 0 0 1px rgba(42, 122, 134, 0.45);
}
html[data-theme='light'] .spark-bar {
  background: linear-gradient(180deg, #2a7a86, rgba(42, 122, 134, 0.28));
}

/* Guest forms use the same glass button system as the menu header. Keep the
   dense admin controls separate so operational screens retain their utility. */
body.panel-body:not(.admin-app) .btn:not(.btn-danger) {
  isolation: isolate;
  overflow: hidden;
  border-radius: 999px;
  background: var(--wg-action-bg, rgba(255, 255, 255, 0.08));
  color: var(--wg-action-ink, #f8f6f0);
  border-color: var(--wg-action-edge, rgba(255, 255, 255, 0.2));
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.005em;
  -webkit-backdrop-filter: blur(14px) saturate(1.14);
  backdrop-filter: blur(14px) saturate(1.14);
  box-shadow: var(--wg-action-shadow);
}

body.panel-body:not(.admin-app) .btn:not(.btn-danger)::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  border-radius: inherit;
  background: var(--wg-glass-edge);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

body.panel-body:not(.admin-app) .btn:not(.btn-danger)::after {
  z-index: 0;
  background: linear-gradient(var(--wg-action-highlight, rgba(255, 255, 255, 0.16)), transparent);
}

body.panel-body:not(.admin-app) .btn:not(.btn-danger):hover,
body.panel-body:not(.admin-app) .btn:not(.btn-danger):focus-visible {
  background: var(--wg-action-bg-hover, rgba(255, 255, 255, 0.14));
  color: var(--wg-action-ink, #f8f6f0);
  border-color: var(--wg-action-edge-hover, rgba(120, 208, 216, 0.58));
  transform: translateY(-1px);
  box-shadow:
    var(--wg-action-shadow),
    0 0 1rem var(--wg-action-glow, rgba(120, 208, 216, 0.18));
}

body.panel-body:not(.admin-app) .btn.btn-ghost {
  background: color-mix(in srgb, var(--wg-action-bg, rgba(255, 255, 255, 0.08)) 74%, transparent);
  color: var(--wg-action-ink, #f8f6f0);
  border-color: var(--wg-action-edge, rgba(255, 255, 255, 0.2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

html[data-theme='light'] body.panel-body:not(.admin-app) .btn:not(.btn-danger),
html[data-theme='light'] body.panel-body:not(.admin-app) .btn.btn-ghost {
  background: var(--wg-action-bg, rgba(255, 252, 247, 0.72));
  color: var(--wg-action-ink, #1a1714);
  border-color: var(--wg-action-edge, rgba(26, 23, 20, 0.15));
  box-shadow: var(--wg-action-shadow);
}

html[data-theme='light'] body.panel-body:not(.admin-app) .btn:not(.btn-danger):hover,
html[data-theme='light'] body.panel-body:not(.admin-app) .btn:not(.btn-danger):focus-visible {
  background: var(--wg-action-bg-hover, rgba(255, 252, 247, 0.9));
  color: var(--wg-action-ink, #1a1714);
  border-color: var(--wg-action-edge-hover, rgba(42, 122, 134, 0.5));
  box-shadow:
    var(--wg-action-shadow),
    0 0 0.9rem var(--wg-action-glow, rgba(42, 122, 134, 0.14));
}

/* ---------- command center: operational IA / live workspaces ---------- */
.admin-pro {
  --p-sidebar: 292px;
}
.nav-workspace {
  margin: 0.15rem 0 0.35rem;
  border-radius: 0.8rem;
}
.nav-workspace > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  user-select: none;
}
.nav-workspace > summary::-webkit-details-marker { display: none; }
.nav-workspace > summary::before {
  content: '‹';
  font-size: 1rem;
  line-height: 1;
  color: var(--p-text-dim);
  transform: rotate(0deg);
  transition: transform .18s ease;
}
.nav-workspace[open] > summary::before { transform: rotate(-90deg); }
.nav-workspace > .admin-nav-item { margin-block: 0.1rem; }
.admin-sidebar-close {
  display: none;
  margin-inline-start: auto;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--p-border);
  border-radius: 50%;
  color: var(--p-text);
  background: rgba(255,255,255,.06);
  font: inherit;
  font-size: 1.35rem;
  cursor: pointer;
}
.admin-sidebar-scrim { display: none; }
.admin-command-trigger,
.admin-user-chip {
  border: 1px solid var(--p-border);
  background: rgba(255,255,255,.055);
  color: var(--p-text);
  border-radius: 999px;
  min-height: 2.25rem;
  padding: .35rem .72rem;
  font-family: inherit;
  font-size: .74rem;
}
.admin-command-trigger { cursor: pointer; white-space: nowrap; }
.admin-command-trigger:hover { border-color: color-mix(in srgb, var(--p-accent) 62%, transparent); }
.admin-user-chip {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  white-space: nowrap;
  color: var(--p-text-dim);
}
.admin-user-chip b {
  color: var(--p-accent);
  font-size: .68rem;
  font-weight: 700;
}
.ops-hero,
.ops-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.15rem;
}
.ops-hero h1,
.ops-page-head h1 { margin-bottom: .28rem; }
.eyebrow {
  margin: 0 0 .36rem;
  color: var(--p-accent);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .075em;
}
.ops-quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .45rem;
  max-width: 31rem;
}
.ops-quick-actions .btn { width: auto; }
.ops-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .7rem;
  margin-bottom: 1rem;
}
.ops-metric {
  min-height: 6.4rem;
  padding: .9rem;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(255,255,255,.095), rgba(255,255,255,.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13);
}
.ops-metric strong { display: block; font-size: 1.42rem; line-height: 1.15; }
.ops-metric span { display: block; margin-top: .45rem; color: var(--p-text-dim); font-size: .72rem; line-height: 1.4; }
.ops-metric.is-accent { border-color: color-mix(in srgb, var(--p-accent) 50%, transparent); background: linear-gradient(145deg, color-mix(in srgb, var(--p-accent) 18%, transparent), rgba(255,255,255,.03)); }
.ops-metric.is-warn { border-color: rgba(232,168,90,.45); }
.ops-metric.is-danger { border-color: rgba(255,118,118,.5); }
.ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(17rem, .78fr);
  gap: 1rem;
  align-items: start;
}
.ops-panel { margin: 0; padding: 1rem; }
.ops-panel--queue { grid-row: span 3; }
.ops-panel__head {
  display: flex;
  justify-content: space-between;
  gap: .7rem;
  align-items: flex-start;
  margin-bottom: .8rem;
}
.ops-panel__head h2 { margin: 0; font-size: 1rem; }
.text-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: .2rem;
  color: var(--p-accent);
  font: inherit;
  font-size: .76rem;
  cursor: pointer;
}
.text-btn:hover { text-decoration: underline; }
.ops-queue { display: grid; gap: .5rem; }
.ops-order-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  text-align: right;
  align-items: center;
  gap: .8rem;
  padding: .75rem .8rem;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: .8rem;
  background: rgba(255,255,255,.035);
  color: var(--p-text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.ops-order-row:hover { transform: translateY(-1px); background: rgba(255,255,255,.07); border-color: color-mix(in srgb, var(--p-accent) 45%, transparent); }
.ops-order-row.is-late { border-color: rgba(255,118,118,.5); }
.ops-order-row__main,
.ops-order-row__side { display: grid; gap: .12rem; min-width: 0; }
.ops-order-row__main span,
.ops-order-row__main small,
.ops-order-row__side small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-order-row__main small,
.ops-order-row__side small { color: var(--p-text-dim); font-size: .7rem; }
.ops-order-row__side { flex: 0 0 auto; text-align: left; }
.ops-order-row__side em { color: var(--p-accent); font-size: .72rem; font-style: normal; }
.ops-alert-list,
.ops-compact-list { display: grid; gap: .45rem; }
.ops-alert,
.ops-compact-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
  padding: .55rem .1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .8rem;
}
.ops-alert:last-child,
.ops-compact-list > div:last-child { border-bottom: 0; }
.ops-alert span,
.ops-compact-list span { color: var(--p-text-dim); font-size: .71rem; }
.ops-alert.is-danger b { color: var(--p-danger); }
.ops-alert.is-warn b { color: var(--p-warn); }
.ops-empty { margin: .55rem 0; color: var(--p-text-dim); font-size: .83rem; }
.ops-filters { display: flex; align-items: end; gap: .75rem; margin-bottom: .9rem; padding: .85rem 1rem; }
.ops-filters label { display: grid; gap: .3rem; flex: 1 1 13rem; color: var(--p-text-dim); font-size: .72rem; }
.ops-filters input,
.ops-filters select { min-height: 2.55rem; }
.ops-filter-count { color: var(--p-text-dim); font-size: .78rem; white-space: nowrap; padding-bottom: .6rem; }
.ops-order-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: .85rem; }
.ops-order-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(255,255,255,.085), rgba(10,9,11,.62));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ops-order-card.is-focused { border-color: var(--p-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-accent) 22%, transparent), inset 0 1px 0 rgba(255,255,255,.13); }
.ops-order-card__head { display: flex; justify-content: space-between; gap: .8rem; padding: .95rem .95rem .72rem; }
.ops-order-card__head p { margin: 0 0 .22rem; color: var(--p-text-dim); font-size: .7rem; }
.ops-order-card__head h2 { margin: 0; font-size: 1.08rem; }
.ops-order-card__head span:not(.ops-status) { display: block; margin-top: .3rem; color: var(--p-text-dim); font-size: .72rem; }
.ops-status { align-self: flex-start; border: 1px solid rgba(120,208,216,.35); border-radius: 999px; padding: .3rem .5rem; color: var(--p-accent); font-size: .68rem; white-space: nowrap; }
.ops-status--cancelled,
.ops-status--failed { color: var(--p-danger); border-color: rgba(255,118,118,.38); }
.ops-status--pending,
.ops-status--pending_online,
.ops-status--awaiting_confirmation,
.ops-status--pay_at_cashier { color: var(--p-warn); border-color: rgba(232,168,90,.38); }
.ops-order-card__meta { display: flex; gap: .65rem; flex-wrap: wrap; padding: .58rem .95rem; background: rgba(255,255,255,.035); color: var(--p-text-dim); font-size: .71rem; }
.ops-order-card__meta span:first-child { color: var(--p-text); font-weight: 800; }
.ops-order-items { display: grid; gap: .38rem; padding: .8rem .95rem; margin: 0; list-style: none; }
.ops-order-items li { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: baseline; font-size: .82rem; }
.ops-order-items b { color: var(--p-accent); }
.ops-order-items em { font-style: normal; color: var(--p-text-dim); font-size: .69rem; }
.ops-order-detail { border-top: 1px solid rgba(255,255,255,.08); }
.ops-order-detail summary { cursor: pointer; padding: .65rem .95rem; color: var(--p-text-dim); font-size: .73rem; }
.ops-order-detail__content { padding: 0 .95rem .85rem; color: var(--p-text-dim); font-size: .74rem; }
.ops-order-detail__content p { margin: .35rem 0; }
.ops-order-detail__content ol { display: grid; gap: .3rem; padding: 0 1.1rem 0 0; margin: .65rem 0 0; }
.ops-order-detail__content li { display: flex; justify-content: space-between; gap: .5rem; }
.ops-order-detail__content time { color: var(--p-text-dim); font-size: .65rem; }
.ops-order-card__actions { display: flex; align-items: center; gap: .5rem; padding: .7rem .95rem .9rem; margin-top: auto; }
.ops-order-card__actions select { min-height: 2.35rem; flex: 1; }
.delivery-zone-grid { display: grid; gap: .75rem; }
.delivery-zone-card { padding: .85rem; border: 1px solid rgba(255,255,255,.1); border-radius: .85rem; background: rgba(255,255,255,.035); }
.delivery-zone-card header { display: flex; justify-content: space-between; gap: .7rem; align-items: center; margin-bottom: .75rem; }
.switch { display: inline-flex; align-items: center; gap: .4rem; color: var(--p-text-dim); font-size: .75rem; cursor: pointer; }
.grid-3 { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: .65rem; }
.delivery-zone-new { margin-top: .85rem; border-top: 1px solid rgba(255,255,255,.1); padding-top: .85rem; }
.delivery-zone-new summary { cursor: pointer; color: var(--p-accent); font-size: .84rem; margin-bottom: .75rem; }
.payment-list { display: grid; gap: .35rem; }
.payment-row { display: grid; grid-template-columns: 1fr auto auto; gap: .75rem; align-items: center; padding: .65rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.payment-row:last-child { border-bottom: 0; }
.payment-row div { display: grid; gap: .15rem; }
.payment-row span { color: var(--p-text-dim); font-size: .68rem; }
.payment-row strong { font-size: .82rem; }
.ops-provider-pill { border: 1px solid rgba(120,208,216,.3); border-radius: 999px; color: var(--p-accent); padding: .25rem .55rem; font-size: .68rem; }
.ops-error-state { max-width: 42rem; margin: clamp(2rem, 8vh, 7rem) auto; text-align: right; }
.ops-error-state h1 { margin: .25rem 0 .5rem; }
.ops-error-state .row-actions { margin-top: 1rem; }
.admin-command-palette {
  width: min(34rem, calc(100vw - 1.5rem));
  padding: 0;
  color: var(--p-text);
  background: transparent;
  border: 0;
  border-radius: 1.1rem;
}
.admin-command-palette::backdrop { background: rgba(0,0,0,.62); backdrop-filter: blur(7px); }
.admin-command-palette__sheet { padding: 1rem; border: 1px solid rgba(255,255,255,.18); border-radius: 1.1rem; background: linear-gradient(155deg, rgba(36,40,43,.95), rgba(9,10,12,.97)); box-shadow: 0 1.3rem 3.5rem rgba(0,0,0,.48); }
.admin-command-palette__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.admin-command-palette__close { border: 0; background: transparent; color: var(--p-text); font-size: 1.45rem; cursor: pointer; }
.admin-command-palette input { width: 100%; min-height: 2.8rem; padding: .65rem .75rem; border: 1px solid rgba(255,255,255,.14); border-radius: .75rem; background: rgba(255,255,255,.07); color: var(--p-text); font: inherit; outline: none; }
.admin-command-palette input:focus { border-color: var(--p-accent); }
.admin-command-results { display: grid; gap: .35rem; margin: .75rem 0; max-height: min(50vh, 21rem); overflow: auto; }
.admin-command-result { display: flex; justify-content: space-between; gap: .75rem; align-items: center; width: 100%; padding: .72rem; border: 1px solid transparent; border-radius: .7rem; background: transparent; color: var(--p-text); text-align: right; font: inherit; cursor: pointer; }
.admin-command-result:hover { background: rgba(255,255,255,.08); border-color: rgba(120,208,216,.3); }
.admin-command-result span { color: var(--p-text-dim); font-size: .7rem; }
:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; }

/* Keep the command center legible in the light theme without losing the
   hierarchy of the dark glass treatment. */
html[data-theme='light'] .ops-metric,
html[data-theme='light'] .ops-panel,
html[data-theme='light'] .ops-order-card,
html[data-theme='light'] .delivery-zone-card {
  border-color: rgba(22, 52, 57, .14);
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(238,247,246,.78));
  box-shadow: 0 .65rem 1.65rem rgba(24, 51, 56, .08);
}
html[data-theme='light'] .ops-order-card__meta { background: rgba(22, 52, 57, .045); }
html[data-theme='light'] .ops-order-detail { border-color: rgba(22, 52, 57, .12); }
html[data-theme='light'] .payment-row { border-color: rgba(22, 52, 57, .1); }
html[data-theme='light'] .admin-command-palette__sheet {
  border-color: rgba(22, 52, 57, .16);
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(235,247,245,.96));
  box-shadow: 0 1.3rem 3.5rem rgba(24, 51, 56, .2);
}
html[data-theme='light'] .admin-command-palette input { border-color: rgba(22, 52, 57, .18); background: rgba(255,255,255,.78); }
html[data-theme='light'] .admin-command-result:hover { background: rgba(69, 190, 199, .12); }

@media (max-width: 1160px) {
  .ops-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ops-grid { grid-template-columns: 1fr 1fr; }
  .ops-panel--queue { grid-column: span 2; grid-row: auto; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .admin-sidebar {
    width: 100vw;
    max-width: none;
    padding-top: 1rem;
    z-index: 70;
  }
  .admin-sidebar-close { display: inline-flex; align-items: center; justify-content: center; }
  .admin-sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 60;
    border: 0;
    background: rgba(0,0,0,.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .admin-sidebar-scrim { display: block; opacity: 1; pointer-events: auto; }
  .admin-topbar { padding: .7rem .85rem; gap: .5rem; }
  .admin-topbar-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-command-trigger { display: none; }
  .admin-user-chip { display: none; }
  .admin-topbar-meta { display: none; }
  .branch-select-wrap { max-width: 8rem; }
  .admin-main { padding: 1rem .85rem 2rem; }
  .ops-hero, .ops-page-head { flex-direction: column; }
  .ops-quick-actions { justify-content: flex-start; max-width: none; }
  .ops-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-grid { grid-template-columns: 1fr; }
  .ops-panel--queue { grid-column: auto; }
  .ops-filters { align-items: stretch; flex-direction: column; }
  .ops-filter-count { padding-bottom: 0; }
  .ops-order-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .payment-row { grid-template-columns: 1fr auto; }
  .payment-row .ops-status { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 480px) {
  .ops-order-row { align-items: flex-start; }
  .ops-order-row__side { max-width: 42%; }
  .ops-order-card__actions { align-items: stretch; flex-direction: column; }
  .ops-order-card__actions select { width: 100%; }
}


/* WESTO v12.9 — guest-flow language + motor logic */
html[lang='fa'] body.panel-body,
html[lang='ar'] body.panel-body { direction: rtl; }
html[lang='en'] body.panel-body { direction: ltr; }
body.panel-body .auth-foot a,
body.panel-body .slot-btn,
body.panel-body .score-btn { min-height: 44px; }
body.panel-body .auth-foot a { display: inline-flex; align-items: center; }
body.panel-body button:focus-visible,
body.panel-body a:focus-visible,
body.panel-body input:focus-visible,
body.panel-body select:focus-visible,
body.panel-body textarea:focus-visible {
  outline: 2px solid var(--p-accent);
  outline-offset: 3px;
}
html[data-perf-tier='economy'] body.panel-body .auth-card,
html[data-perf-tier='economy'] body.panel-body .reserve-done,
html[data-perf-tier='economy'] body.panel-body .fb-done {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
@media (prefers-reduced-motion: reduce) {
  body.panel-body .slot-btn,
  body.panel-body .score-btn,
  body.panel-body .btn { transition: none !important; transform: none !important; }
}


body.panel-body .field-group-label {
  display: block;
  margin-bottom: .45rem;
  color: var(--p-text-dim);
  font-size: .85rem;
  font-weight: 600;
}
body.panel-body .btn.btn-sm { min-height: 44px; }

.admin-tracking-code {
  display: inline-block;
  color: var(--p-text, #fff);
  background: rgba(255, 255, 255, 0.08);
}
html[data-theme='light'] .admin-tracking-code {
  color: #1a2327 !important;
  background: rgba(12, 85, 92, 0.08) !important;
  border: 1px solid rgba(12, 85, 92, 0.18) !important;
}

/* ── WESTO Admin — Menu & Recipe Engineering V2 Ergonomics ── */

.menu-studio__row {
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.menu-studio__row.is-unavailable {
  opacity: 0.62;
  filter: grayscale(0.25);
  background: rgba(255, 255, 255, 0.03);
}
.menu-studio__row.is-price-updated {
  animation: priceUpdatedGlow 1.2s ease-out;
}
@keyframes priceUpdatedGlow {
  0% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.6), inset 0 0 12px rgba(34, 197, 94, 0.3); border-color: #22c55e; }
  100% { box-shadow: none; }
}

.menu-studio__meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.menu-studio__name-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.menu-studio__name-line strong {
  font-size: 0.98rem;
  font-weight: 750;
  color: var(--p-text);
}
.menu-studio__chips-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

/* Dietary Pills */
.menu-dietary-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  border: 1px solid transparent;
}
.menu-dietary-pill.is-vegan {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.25);
}
.menu-dietary-pill.is-keto {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.25);
}
.menu-dietary-pill.is-gf {
  background: rgba(234, 179, 8, 0.12);
  color: #facc15;
  border-color: rgba(234, 179, 8, 0.25);
}
.menu-dietary-pill.is-spicy {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}
.menu-dietary-pill.is-lowcal {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.25);
}
.menu-dietary-pill.is-dairyfree {
  background: rgba(244, 114, 182, 0.12);
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.25);
}

/* Food Cost & BCG Pills */
.menu-cost-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.45rem;
  font-size: 0.65rem;
  font-weight: 750;
  border: 1px solid transparent;
}
.menu-cost-pill.is-good {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.28);
}
.menu-cost-pill.is-warn {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.28);
}
.menu-cost-pill.is-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.28);
}
.menu-cost-pill.is-missing {
  background: rgba(255, 255, 255, 0.06);
  color: var(--p-text-dim);
  border-color: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}
.menu-cost-pill.is-missing:hover {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}
.menu-cost-pill .bcg-tag {
  padding: 0.05rem 0.3rem;
  border-radius: 0.3rem;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.62rem;
}

/* Prep & Stock Pills */
.menu-prep-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
  font-size: 0.64rem;
  color: var(--p-text-dim);
  background: rgba(255, 255, 255, 0.06);
}
.menu-stock-pill {
  display: inline-flex;
  padding: 0.1rem 0.45rem;
  border-radius: 0.35rem;
  font-size: 0.63rem;
  font-weight: 700;
}
.menu-stock-pill.is-ok {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}
.menu-stock-pill.is-low {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.menu-stock-pill.is-out {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Inline Quick-Price Editor */
.menu-studio__price-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
}
.menu-price-display {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--p-accent, #78d0d8);
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 0.4rem;
  transition: background 0.15s ease;
  direction: ltr;
}
.menu-price-display:hover {
  background: rgba(120, 208, 216, 0.15);
  text-decoration: underline;
}
.inline-price-editor {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.3rem 0.45rem;
  background: var(--p-surface-2, rgba(20, 20, 24, 0.95));
  border: 1px solid var(--p-accent, #78d0d8);
  border-radius: 0.65rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  z-index: 10;
}
.inline-price-input {
  width: 7.5rem !important;
  min-height: 2rem !important;
  padding: 0.25rem 0.45rem !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  direction: ltr !important;
  text-align: center !important;
  border-radius: 0.4rem !important;
  border: 1px solid var(--admin-line, rgba(255, 255, 255, 0.15)) !important;
  background: var(--p-surface, #121214) !important;
  color: var(--p-text, #fff) !important;
}
.inline-price-nudges {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.btn-nudge {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--p-text);
  border-radius: 0.35rem;
  padding: 0.2rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.12s ease;
  direction: ltr;
}
.btn-nudge:hover {
  background: var(--p-accent);
  color: #0d1b1e;
  border-color: var(--p-accent);
}
.inline-price-save {
  padding: 0.25rem 0.6rem !important;
  min-height: 2rem !important;
  font-size: 0.75rem !important;
}
.inline-price-cancel {
  padding: 0.25rem 0.5rem !important;
  min-height: 2rem !important;
  font-size: 0.75rem !important;
}

/* Dietary & Costing Filter Strip */
.menu-filters-strip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.4rem 0;
  margin-top: 0.5rem;
  scrollbar-width: none;
}
.menu-filters-strip::-webkit-scrollbar { display: none; }
.menu-filter-chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--p-text-dim);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.menu-filter-chip:hover {
  border-color: var(--p-accent);
  color: var(--p-text);
}
.menu-filter-chip.is-active {
  background: var(--p-accent);
  color: #0b1e22;
  border-color: var(--p-accent);
}

/* Bulk Price Adjustment Modal */
.bulk-price-modal {
  width: min(38rem, calc(100vw - 2rem));
}
.bulk-price-options {
  display: flex;
  gap: 0.4rem;
  margin: 0.85rem 0;
  flex-wrap: wrap;
}
.bulk-pct-chip {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--p-text);
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
  direction: ltr;
}
.bulk-pct-chip.is-active {
  background: var(--p-accent);
  color: #0b1e22;
  border-color: var(--p-accent);
}
.bulk-preview-table-wrap {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.65rem;
  margin: 0.75rem 0;
}
.bulk-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}
.bulk-preview-table th,
.bulk-preview-table td {
  padding: 0.5rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.bulk-preview-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--p-text-dim);
}
.bulk-diff-up { color: #4ade80; font-weight: 700; direction: ltr; }
.bulk-diff-down { color: #f87171; font-weight: 700; direction: ltr; }

/* Gross Profit & Markup Simulator in Drawer */
.menu-editor-card--simulator {
  border-color: rgba(120, 208, 216, 0.3);
  background: linear-gradient(175deg, rgba(120, 208, 216, 0.08) 0%, rgba(20, 24, 28, 0.85) 100%);
}
.menu-simulator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.75rem;
}
.menu-simulator-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.sim-metric {
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}
.sim-metric .sim-label {
  display: block;
  font-size: 0.66rem;
  color: var(--p-text-dim);
  margin-bottom: 0.2rem;
}
.sim-metric .sim-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--p-text);
  direction: ltr;
  text-align: right;
}
.sim-metric .sim-value.is-profit { color: #4ade80; }
.sim-metric .sim-value.is-margin { color: #38bdf8; }
.sim-target-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--p-text);
}
.sim-target-label input[type="range"] {
  width: 100%;
  accent-color: var(--p-accent);
  cursor: pointer;
}
.sim-target-chips {
  display: flex;
  gap: 0.3rem;
  margin: 0.45rem 0 0.75rem;
  flex-wrap: wrap;
}
.sim-target-chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--p-text-dim);
  border-radius: 0.45rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 750;
  cursor: pointer;
}
.sim-target-chip.is-active {
  background: var(--p-accent);
  color: #091a1d;
  border-color: var(--p-accent);
}
.sim-suggested-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  background: rgba(120, 208, 216, 0.12);
  border: 1px solid rgba(120, 208, 216, 0.3);
}
.sim-suggested-card small {
  display: block;
  font-size: 0.65rem;
  color: var(--p-text-dim);
}
.sim-suggested-card strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--p-accent);
  direction: ltr;
  text-align: right;
}

/* Recipe Ingredient Yield & Wastage Controls */
.inv-recipe-line {
  display: grid;
  grid-template-columns: 1.3fr 0.65fr 0.65fr 0.75fr 0.75fr 2rem;
  gap: 0.35rem;
  align-items: center;
  padding-bottom: 0.4rem;
}
.recipe-basis-select {
  font-size: 0.72rem !important;
}
.recipe-yield-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: var(--p-surface-2);
  border: 1px solid var(--admin-line);
  border-radius: 0.62rem;
  padding: 0 0.4rem;
  height: 2.55rem;
  box-sizing: border-box;
}
.recipe-yield-wrap input {
  border: none !important;
  background: transparent !important;
  padding: 0.2rem !important;
  min-height: auto !important;
  width: 2.6rem !important;
  text-align: center;
  direction: ltr;
  font-weight: 750;
  color: var(--p-text);
}
.recipe-yield-wrap span {
  font-size: 0.65rem;
  color: var(--p-text-dim);
  white-space: nowrap;
}
.recipe-line-calc {
  grid-column: 1 / -1;
  font-size: 0.68rem;
  color: var(--p-text-dim);
  display: flex;
  gap: 0.85rem;
  padding: 0.15rem 0.5rem 0.35rem 0.5rem;
  margin-top: -0.2rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}
.recipe-line-calc strong {
  color: var(--p-accent);
}
.recipe-yield-badge {
  font-size: 0.62rem;
  color: var(--p-text-dim);
  padding: 0.2rem 0.35rem;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}
.recipe-batch-scaler {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--admin-line);
}
.recipe-batch-scaler span {
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--p-text-dim);
  margin-left: 0.4rem;
}
.recipe-scale-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--p-text);
  border-radius: 0.4rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 750;
  cursor: pointer;
  direction: ltr;
}
.recipe-scale-btn:hover {
  border-color: var(--p-accent);
}
.recipe-scale-btn.is-active {
  background: var(--p-accent);
  color: #0a1b1e;
  border-color: var(--p-accent);
}
.recipe-live-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  padding: 0.85rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0.5rem;
}
.recipe-live-summary article small {
  display: block;
  font-size: 0.65rem;
  color: var(--p-text-dim);
}
.recipe-live-summary article strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--p-text);
  margin-top: 0.15rem;
  direction: ltr;
  text-align: right;
}
.recipe-danger-alert {
  grid-column: 1 / -1;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.74rem;
  font-weight: 750;
}

@media (max-width: 768px) {
  .menu-simulator-grid { grid-template-columns: 1fr; }
  .recipe-live-summary { grid-template-columns: 1fr 1fr; }
  .inv-recipe-line { grid-template-columns: 1fr 1fr; }
}

