/* ── Menusc Design System ────────────────────────────────
   Apple HIG-inspired: clarity, deference, depth.
   Frosted glass surfaces, SF-style type scale, 44pt targets.
   Light + dark via prefers-color-scheme and [data-theme].
──────────────────────────────────────────────────────── */

:root {
  --bg: #f5f5f7;
  --bg-grad-1: rgba(0, 122, 255, 0.10);
  --bg-grad-2: rgba(255, 149, 0, 0.08);
  --bg-grad-3: rgba(52, 199, 89, 0.08);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.80);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.10);
  --green: #34c759;
  --red: #ff3b30;
  --red-soft: rgba(255, 59, 48, 0.10);
  --amber: #ff9f0a;
  --amber-soft: rgba(255, 159, 10, 0.12);
  --separator: rgba(60, 60, 67, 0.12);
  --fill: rgba(120, 120, 128, 0.08);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --mono: 'SF Mono', ui-monospace, 'Cascadia Code', Menlo, monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #000000;
  --bg-grad-1: rgba(10, 132, 255, 0.16);
  --bg-grad-2: rgba(255, 159, 10, 0.10);
  --bg-grad-3: rgba(48, 209, 88, 0.10);
  --glass: rgba(28, 28, 30, 0.62);
  --glass-strong: rgba(28, 28, 30, 0.82);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #86868b;
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --accent-soft: rgba(10, 132, 255, 0.18);
  --green: #30d158;
  --red: #ff453a;
  --red-soft: rgba(255, 69, 58, 0.16);
  --amber: #ff9f0a;
  --amber-soft: rgba(255, 159, 10, 0.16);
  --separator: rgba(255, 255, 255, 0.12);
  --fill: rgba(120, 120, 128, 0.16);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-grad-1: rgba(10, 132, 255, 0.16);
    --bg-grad-2: rgba(255, 159, 10, 0.10);
    --bg-grad-3: rgba(48, 209, 88, 0.10);
    --glass: rgba(28, 28, 30, 0.62);
    --glass-strong: rgba(28, 28, 30, 0.82);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #86868b;
    --accent: #0a84ff;
    --accent-hover: #409cff;
    --accent-soft: rgba(10, 132, 255, 0.18);
    --green: #30d158;
    --red: #ff453a;
    --red-soft: rgba(255, 69, 58, 0.16);
    --amber: #ff9f0a;
    --amber-soft: rgba(255, 159, 10, 0.16);
    --separator: rgba(255, 255, 255, 0.12);
    --fill: rgba(120, 120, 128, 0.16);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Ambient gradient orbs behind glass */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 15% 10%, var(--bg-grad-1), transparent 70%),
    radial-gradient(700px 500px at 85% 20%, var(--bg-grad-2), transparent 70%),
    radial-gradient(800px 600px at 50% 95%, var(--bg-grad-3), transparent 70%);
}

/* ── Navigation ────────────────────────────────────────── */
.glass-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: var(--glass);
  border-bottom: 1px solid var(--separator);
}

.nav-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #64d2ff);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--fill);
  color: var(--text-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, color 0.2s;
}
.theme-btn:hover { background: var(--separator); color: var(--text); }
.theme-btn svg { width: 17px; height: 17px; }

/* ── Layout ────────────────────────────────────────────── */
.app { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

.auth-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 64px 20px 40px;
}

.glass-card {
  width: 100%;
  max-width: 420px;
  background: var(--glass-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 36px 32px;
  animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.auth-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #64d2ff);
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.35);
}
.auth-icon svg { width: 28px; height: 28px; color: #fff; }

.auth-head { text-align: center; margin-bottom: 28px; }
.auth-head h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.auth-head p { color: var(--text-2); font-size: 15px; }

/* ── Forms ─────────────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 7px;
  letter-spacing: -0.01em;
}

.input, .field input[type="text"], .field input[type="tel"], .field input[type="file"] {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--separator);
  background: var(--fill);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  letter-spacing: -0.02em;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input:focus, .field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: var(--glass-strong);
}

.input::placeholder { color: var(--text-3); }

.hint { font-size: 13px; color: var(--text-3); margin-top: 6px; }

/* Segmented OTP input */
.otp-row {
  display: flex;
  gap: 9px;
  justify-content: center;
  margin: 26px 0 8px;
}

.otp-box {
  width: 46px;
  height: 56px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--separator);
  background: var(--fill);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  outline: none;
  caret-color: var(--accent);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.otp-box:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: var(--glass-strong);
}
.otp-box.filled { border-color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 48px;
  padding: 0 22px;
  border: none;
  border-radius: 980px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, background 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-block { width: 100%; }

.btn-glass {
  background: var(--fill);
  color: var(--accent);
  border: 1px solid var(--separator);
}
.btn-glass:hover { background: var(--separator); }

.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; }

.btn-danger { background: var(--red-soft); color: var(--red); }

.btn[disabled] { opacity: 0.4; pointer-events: none; }

/* Alerts */
.alert {
  border-radius: var(--radius-md);
  padding: 13px 16px;
  font-size: 15px;
  margin-bottom: 18px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: rise 0.3s ease;
}
.alert-error { background: var(--red-soft); color: var(--red); }
.alert-success { background: rgba(52, 199, 89, 0.12); color: var(--green); }
.alert-amber { background: var(--amber-soft); color: var(--amber); }

/* Fallback code display */
.fallback-code {
  text-align: center;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--amber-soft);
  border: 1px dashed var(--amber);
  margin-bottom: 20px;
}
.fallback-code .code {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 10px;
  color: var(--amber);
  margin-top: 4px;
}
.fallback-code .note { font-size: 13px; color: var(--text-2); }

/* Meta row under OTP */
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  font-size: 14px;
}
.meta-row a { color: var(--accent); text-decoration: none; font-weight: 500; }
.meta-row .count { color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ── Dashboard / tables ────────────────────────────────── */
.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 22px 60px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.page-head p { color: var(--text-2); font-size: 15px; margin-top: 2px; }

.panel {
  background: var(--glass-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.panel h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  padding: 10px 12px;
  border-bottom: 1px solid var(--separator);
}
td { padding: 14px 12px; border-bottom: 1px solid var(--separator); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: var(--fill); }

.slug-code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--fill);
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--accent);
}

.empty-state {
  text-align: center;
  padding: 44px 20px;
  color: var(--text-2);
}
.empty-state .big { font-size: 40px; margin-bottom: 10px; }

/* Slug field */
.slug-field {
  display: flex;
  align-items: center;
  height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--separator);
  background: var(--fill);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.slug-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.slug-prefix {
  padding: 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  background: var(--separator);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 14px;
  white-space: nowrap;
}
.slug-field input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 100%;
  flex: 1;
  font-family: var(--mono);
}

/* File thumbs */
.file-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--separator);
  cursor: zoom-in;
  vertical-align: middle;
  margin-right: 10px;
}
.file-icon { width: 20px; height: 20px; color: var(--text-2); vertical-align: middle; margin-right: 8px; }

/* ── Public menu page ──────────────────────────────────── */
.menu-hero {
  text-align: center;
  padding: 56px 20px 30px;
}
.menu-hero h1 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.menu-hero p { color: var(--text-2); margin-top: 6px; }

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.menu-item {
  background: var(--glass-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s;
}
.menu-item:hover { transform: translateY(-3px); }
.menu-item img { width: 100%; height: 220px; object-fit: cover; display: block; }
.menu-item .cap {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-2);
  border-top: 1px solid var(--separator);
}

.menu-item.pdf { display: flex; align-items: center; padding: 18px; gap: 14px; }
.menu-item.pdf a { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; width: 100%; }
.menu-item.pdf svg { width: 34px; height: 34px; color: var(--red); flex-shrink: 0; }
.menu-item.pdf .fname { font-weight: 600; font-size: 15px; display: block; }
.menu-item.pdf .fmeta { font-size: 13px; color: var(--text-3); }

/* ── AI widget ─────────────────────────────────────────── */
.ai-widget { position: fixed; bottom: 22px; right: 22px; z-index: 200; }

.ai-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 20px;
  border: 1px solid var(--glass-border);
  border-radius: 980px;
  background: var(--glass-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--glass-shadow);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s;
}
.ai-toggle-btn:hover { transform: translateY(-2px); }
.ai-toggle-btn svg { width: 20px; height: 20px; color: var(--accent); }

.ai-panel {
  position: fixed;
  bottom: 84px;
  right: 22px;
  width: 370px;
  max-width: calc(100vw - 44px);
  background: var(--glass-strong);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ai-panel.open { opacity: 1; transform: none; pointer-events: auto; }

.ai-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--separator);
}
.ai-panel-header h3 { font-size: 15px; font-weight: 600; }
.ai-close-btn { border: none; background: var(--fill); width: 28px; height: 28px; border-radius: 50%; color: var(--text-2); font-size: 16px; cursor: pointer; }

.ai-panel-body {
  padding: 14px;
  overflow-y: auto;
  max-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-message { display: flex; gap: 8px; align-items: flex-end; }
.ai-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; flex-shrink: 0;
}
.ai-avatar svg { width: 15px; height: 15px; }
.ai-bubble {
  background: var(--fill);
  padding: 9px 13px;
  border-radius: 16px;
  border-bottom-left-radius: 5px;
  font-size: 15px;
  max-width: 85%;
}
.ai-message-user { flex-direction: row-reverse; }
.ai-message-user .ai-bubble { background: var(--accent); color: #fff; border-bottom-left-radius: 16px; border-bottom-right-radius: 5px; }

.ai-panel-input { padding: 10px 12px; border-top: 1px solid var(--separator); }
#ai-form { display: flex; gap: 8px; }
#ai-input {
  flex: 1; height: 40px; padding: 0 16px;
  border-radius: 980px; border: 1px solid var(--separator);
  background: var(--fill); color: var(--text);
  font-family: var(--font); font-size: 15px; outline: none;
}
#ai-input:focus { border-color: var(--accent); }
.ai-send-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: var(--accent); color: #fff;
  display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
}
.ai-send-btn svg { width: 16px; height: 16px; }
.ai-attach-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--separator); background: var(--fill); color: var(--text-2);
  display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
  transition: color .2s, border-color .2s, transform .15s;
}
.ai-attach-btn:hover { color: var(--accent); border-color: var(--accent); }
.ai-attach-btn:active { transform: scale(.92); }
.ai-attach-btn svg { width: 17px; height: 17px; }
.ai-attach-btn[disabled] { opacity: .45; pointer-events: none; }
.ai-thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.ai-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }

/* ── Admin: chat transcript QA view ── */
.qa-panel { display: flex; flex-direction: column; gap: 18px; }
.qa-msg { max-width: 72%; }
.qa-msg-user { align-self: flex-end; text-align: right; }
.qa-msg-bot { align-self: flex-start; }
.qa-role { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.qa-bubble {
  display: inline-block; text-align: left; padding: 10px 14px;
  border-radius: 16px; font-size: 14px; line-height: 1.5;
  background: var(--fill); border: 1px solid var(--separator); color: var(--text);
}
.qa-msg-user .qa-bubble { background: var(--accent); border-color: transparent; color: #fff; border-bottom-right-radius: 5px; }
.qa-msg-bot .qa-bubble { border-bottom-left-radius: 5px; }
.qa-time { font-size: 11px; margin-top: 4px; }

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  padding: 26px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}

/* ── Misc ──────────────────────────────────────────────── */
.muted { color: var(--text-2); }
.link { color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; }
.inline-form { display: inline; }
.back-btn { font-size: 15px; color: var(--accent); text-decoration: none; font-weight: 500; }

@media (max-width: 640px) {
  .glass-card { padding: 28px 22px; }
  .auth-head h1 { font-size: 24px; }
  .menu-hero h1 { font-size: 30px; }
  .page-head h1 { font-size: 26px; }
  .otp-box { width: 42px; height: 52px; font-size: 21px; }
  .panel { padding: 18px; }
  table { font-size: 14px; }
  th, td { padding: 10px 8px; }
}

/* ── Landing page ──────────────────────────────────────── */
.hero { padding: 72px 22px 56px; text-align: center; }
.hero-inner { max-width: 760px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 980px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.grad {
  background: linear-gradient(90deg, var(--accent), #64d2ff 50%, var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 540px;
  margin: 20px auto 32px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-2);
  letter-spacing: -0.02em;
}

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 44px; }

.hero-steps {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
}
.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.features { max-width: 980px; margin: 0 auto; padding: 20px 22px 40px; }
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.feat { padding: 26px 24px; transition: transform 0.2s cubic-bezier(0.2,0.8,0.2,1); }
.feat:hover { transform: translateY(-3px); }
.feat-icon { font-size: 30px; margin-bottom: 12px; }
.feat h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px; }
.feat p { font-size: 15px; color: var(--text-2); line-height: 1.5; }

.final-cta { max-width: 700px; margin: 0 auto; padding: 20px 22px 72px; }
.final-cta-btns { margin-bottom: 0; }

/* ── QR / display modes ───────────────────────────────── */
.qr-frame {
  display: inline-block;
  padding: 18px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
}
.qr-frame img { display: block; border-radius: 8px; }

.menu-item.action-card { display: flex; align-items: center; padding: 18px; }
.menu-item.action-card a { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; width: 100%; }
.menu-item.action-card svg { width: 30px; height: 30px; color: var(--accent); flex-shrink: 0; }
.menu-item.action-card .fname { font-weight: 600; font-size: 15px; display: block; }
.menu-item.action-card .fmeta { font-size: 13px; color: var(--text-3); }

.menu-item.embed { padding: 0; }
.menu-item.embed object { display: block; border-radius: var(--radius-lg); }

.select-sm {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--separator);
  background: var(--fill);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  outline: none;
}
.select-sm:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

select.input { cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }

@media print {
  .glass-nav, .site-footer, .btn, .back-btn, .hint { display: none !important; }
  body::before { display: none; }
  .glass-card { box-shadow: none; border: none; }
}

/* ── Stats band ────────────────────────────────────────── */
.stats-band {
  max-width: 980px;
  margin: 10px auto 30px;
  padding: 0 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.stat {
  text-align: center;
  padding: 22px 14px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--accent), #64d2ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { font-size: 13px; color: var(--text-2); }

/* ── Nour widget extras ────────────────────────────────── */
.ai-head-id { display: flex; align-items: center; gap: 8px; }
.ai-head-id h3 { font-size: 15px; font-weight: 600; }
.ai-sub { font-size: 12px; color: var(--text-3); }
.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(52,199,89,0.2); }
.ai-avatar-user { background: var(--fill); color: var(--text-2); }
.ai-thinking { color: var(--text-3); animation: pulse 1s infinite alternate; }
@keyframes pulse { from { opacity: 0.4; } to { opacity: 1; } }
.ai-links { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 4px 4px 36px; }
.ai-link {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 980px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}
.ai-link:hover { border-color: var(--accent); }

/* ── Menu stack (1 column, images below each other) ───── */
.menu-stack { display: flex; flex-direction: column; gap: 22px; }

.menu-figure {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  margin: 0;
}
.menu-figure img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.menu-figure figcaption {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-3);
  border-top: 1px solid var(--separator);
  text-align: center;
}

.menu-pdf-embed {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--glass-shadow);
}
.menu-pdf-embed iframe,
.menu-pdf-embed object {
  display: block;
  width: 100%;
  height: 85vh;
  min-height: 480px;
  border: none;
  background: #525659;
}
.pdf-fallback {
  display: none;
  padding: 14px;
  text-align: center;
}
/* Mobile browsers (iOS Safari etc.) block inline PDF → show fallback button */
@supports (-webkit-touch-callout: none) {
  .menu-pdf-embed iframe, .menu-pdf-embed object { display: none; }
  .pdf-fallback { display: block; }
}

/* ── Full-screen zoom viewer (pinch + double-tap) ──────── */
.zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  touch-action: none;
  animation: zoomFade 0.18s ease;
}
@keyframes zoomFade { from { opacity: 0; } to { opacity: 1; } }
.zoom-overlay img {
  max-width: 96vw;
  max-height: 96vh;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.15s ease-out;
  user-select: none;
  -webkit-user-drag: none;
}
.zoom-hint {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  pointer-events: none;
}
.zoom-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

/* ── Floating share capsule (iOS toolbar style) ────────── */
.share-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  max-width: calc(100vw - 20px);
  border-radius: 980px;
  background: var(--glass-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.08);
}
/* keep page content above the floating capsule */
.app main { padding-bottom: 100px; }
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border: none;
  border-radius: 980px;
  background: transparent;
  color: var(--accent);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.share-btn:hover { background: var(--fill); }
.share-btn:active { transform: scale(0.94); }
.share-btn svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.share-btn span { display: none; }
.share-btn.copied span { display: inline; }
.share-divider { width: 1px; height: 22px; background: var(--separator); margin: 0 2px; flex: none; }
@media (min-width: 600px) {
  .share-btn { padding: 0 16px; }
  .share-btn span { display: inline; }
}

/* QR bottom sheet (Apple-style) */
.qr-sheet {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.qr-sheet.open { opacity: 1; pointer-events: auto; }
.qr-sheet-card {
  position: relative;
  width: calc(100% - 24px);
  max-width: 420px;
  margin: 0 12px calc(14px + env(safe-area-inset-bottom));
  background: var(--glass-strong);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 12px 20px 22px;
  text-align: center;
  transform: translateY(calc(100% + 24px));
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}
.qr-sheet-card::before {
  content: '';
  display: block;
  width: 38px; height: 5px;
  border-radius: 99px;
  background: var(--separator);
  margin: 0 auto 14px;
}
.qr-sheet.open .qr-sheet-card { transform: none; }
.qr-sheet-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 14px; }
.qr-sheet-card > img {
  background: #fff;
  padding: 14px;
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  margin-bottom: 10px;
}
@media (min-width: 641px) {
  .qr-sheet { align-items: center; }
  .qr-sheet-card { margin: 0; border-radius: 24px; transform: scale(0.92); }
  .qr-sheet-card::before { display: none; }
  .qr-sheet-card { padding: 26px 24px; }
  .qr-sheet.open .qr-sheet-card { transform: none; }
}

/* ── Contact bar ───────────────────────────────────────── */
.contact-bar { margin-top: 28px; text-align: center; }
.contact-bar h3 { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 12px; }
.contact-chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: 980px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.12s;
}
.contact-chip:hover { transform: translateY(-1px); text-decoration: none; }
.contact-chip svg { width: 16px; height: 16px; color: var(--text-2); }
.contact-chip.wa svg { color: #25d366; }

/* ── Settings: captions / info / badges ────────────────── */
.caption-form { display: flex; gap: 8px; align-items: center; }
.caption-input { height: 38px !important; font-size: 14px !important; padding: 0 12px !important; }
.files-table td { vertical-align: top; }
.files-table .file-thumb { margin-bottom: 4px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 16px;
}

.badge-on, .badge-off {
  display: inline-block;
  vertical-align: middle;
  padding: 3px 10px;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
}
.badge-on { background: rgba(52,199,89,0.15); color: var(--green); }
.badge-off { background: var(--red-soft); color: var(--red); }

@media (max-width: 640px) {
  .share-bar { gap: 2px; }
  .share-btn { padding: 0 12px; font-size: 13px; }
  .caption-form { flex-wrap: wrap; }
  .caption-input { flex: 1; min-width: 120px; }
}

/* ── Menu logo (public page, top of hero) ──────────────── */
.menu-logo-wrap { display: flex; justify-content: center; margin-bottom: 14px; }
.menu-logo-ring { position: relative; display: inline-block; padding: 4px; border-radius: 30px; }
.menu-logo {
  display: block;
  width: 96px; height: 96px; object-fit: cover;
  border-radius: 26px;
  background: var(--glass-strong);
  box-shadow: var(--glass-shadow);
}
.menu-desc { font-size: 15px; color: var(--text-2); margin-top: 6px; line-height: 1.45; }

/* ── Contact card (public page) ────────────────────────── */
.contact-card {
  margin-top: 26px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 18px 16px 16px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--glass-shadow);
}
.contact-card-head { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 14px; }
.contact-card-head svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.contact-card-head h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.contact-chip { height: 40px; padding: 0 16px; background: var(--fill); }
.contact-chip.wa { background: rgba(37, 211, 102, 0.12); }
.contact-chip.wa svg { color: #1ebe57; }
.contact-address {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--separator);
  font-size: 14px; line-height: 1.5;
  color: var(--text-2); text-align: center;
  white-space: pre-line;
}

/* ── Animated colored ring around the logo ─────────────── */
.menu-logo-ring::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 30px;
  padding: 3px;
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: frameShift 7s linear infinite;
}
@keyframes frameShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.anim-aurora, .bs-aurora::before { background-image: linear-gradient(120deg, #34c759, #007aff, #af52de, #ff2d55, #34c759); }
.anim-sunset, .bs-sunset::before { background-image: linear-gradient(120deg, #ff9f0a, #ff375f, #bf5af2, #ff9f0a); }
.anim-candy,  .bs-candy::before  { background-image: linear-gradient(120deg, #ff6fa5, #7ee8fa, #c39bff, #ffd36e, #ff6fa5); }
.anim-ocean,  .bs-ocean::before  { background-image: linear-gradient(120deg, #0a84ff, #64d2ff, #30d158, #0a84ff); }
.anim-neon,   .bs-neon::before   { background-image: linear-gradient(120deg, #ff00e5, #00f5ff, #aaff00, #ff00e5); }
.anim-gold,   .bs-gold::before   { background-image: linear-gradient(120deg, #b8860b, #ffd700, #fff3c4, #daa520, #b8860b); }
.bs-neon::before { filter: drop-shadow(0 0 6px rgba(0, 245, 255, 0.5)); }
.bs-gold::before { filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.45)); }
@media (prefers-reduced-motion: reduce) {
  .menu-logo-ring::before, .swatch { animation: none !important; }
}

/* ── Settings: logo + border picker ────────────────────── */
.logo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.logo-preview { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; border: 1px solid var(--glass-border); background: var(--fill); }
.logo-empty { display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 12px; font-weight: 600; }
.border-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-top: 10px; }
.border-swatch { position: relative; cursor: pointer; text-align: center; }
.border-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch {
  display: block; height: 52px; border-radius: 14px;
  border: 2px solid var(--separator);
  background-color: var(--fill);
  background-size: 300% 300%;
  transition: transform 0.12s;
  animation: frameShift 7s linear infinite;
}
.border-swatch:hover .swatch { transform: scale(1.04); }
.swatch-name { display: block; font-size: 12px; color: var(--text-2); margin-top: 6px; font-weight: 600; }
.border-swatch.sel .swatch { outline: 2.5px solid var(--accent); outline-offset: 2px; border-color: transparent; }
.border-swatch.sel .swatch-name { color: var(--accent); }

/* ── Contact sheet rows (bottom bar → organized list) ──── */
.contact-rows { display: flex; flex-direction: column; gap: 6px; }
.contact-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--fill);
  text-decoration: none;
  transition: background 0.15s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.contact-row:hover { background: var(--accent-soft); }
.contact-row:active { transform: scale(0.98); }
.contact-row-icon {
  width: 38px; height: 38px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  color: var(--accent);
}
.contact-row-icon svg { width: 18px; height: 18px; }
.contact-row.wa .contact-row-icon { color: #1ebe57; background: rgba(37, 211, 102, 0.12); border-color: transparent; }
.contact-row-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.contact-row-label { font-size: 14px; font-weight: 600; color: var(--text); }
.contact-row-value {
  font-size: 13px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.contact-row-go { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.contact-sheet-address {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--separator);
}
.contact-sheet-address svg { width: 17px; height: 17px; color: var(--accent); flex: none; margin-top: 2px; }
.contact-sheet-address p { font-size: 13.5px; line-height: 1.5; color: var(--text-2); white-space: pre-line; }

/* ── Nav auth links ────────────────────────────────────── */
.nav-link {
  font-size: 14px; font-weight: 600;
  color: var(--accent); text-decoration: none;
  padding: 7px 12px; border-radius: 980px;
  border: none; background: none; cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s;
}
.nav-link:hover { background: var(--accent-soft); }
.nav-link-solid { background: var(--accent); color: #fff; }
.nav-link-solid:hover { background: var(--accent-hover); }
.nav-link-quiet { color: var(--text-2); }
.nav-link-quiet:hover { background: var(--fill); }

/* ── Sun / moon toggle with rotate-fade animation ──────── */
.theme-btn { position: relative; overflow: hidden; }
.theme-btn svg {
  position: absolute;
  width: 18px; height: 18px;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}
.theme-btn .icon-sun { transform: none; opacity: 1; }
.theme-btn .icon-moon { transform: rotate(-90deg) scale(0.4); opacity: 0; }
html[data-theme="dark"] .theme-btn .icon-sun { transform: rotate(90deg) scale(0.4); opacity: 0; }
html[data-theme="dark"] .theme-btn .icon-moon { transform: none; opacity: 1; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-btn .icon-sun { transform: rotate(90deg) scale(0.4); opacity: 0; }
  html:not([data-theme="light"]) .theme-btn .icon-moon { transform: none; opacity: 1; }
}

/* ── Payments: public pay sheet (accordion list) ──────── */
.pay-sheet-card { max-width: 440px; }
.pay-sheet-sub { font-size: 13px; color: var(--text-2); margin: -8px 0 14px; }
.pay-cards { display: flex; flex-direction: column; gap: 10px; max-height: 56vh; overflow-y: auto; padding: 2px; }
.pay-row {
  border: 1px solid var(--separator);
  border-radius: 18px;
  background: var(--fill);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pay-row.open { border-color: color-mix(in srgb, var(--pay-color, #0071e3) 45%, transparent); box-shadow: 0 6px 18px color-mix(in srgb, var(--pay-color, #0071e3) 14%, transparent); }
.pay-row-head {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pay-row-head.no-expand { cursor: default; }
.pay-badge {
  width: 40px; height: 40px; border-radius: 13px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 0.02em;
  background: var(--pay-color, var(--accent));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--pay-color, #0071e3) 35%, transparent);
}
.pay-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pay-row-info strong { font-size: 15px; font-weight: 600; }
.pay-row-num { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-copy {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: var(--text-2);
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.pay-copy svg { width: 16px; height: 16px; }
.pay-copy:hover { background: var(--separator); }
.pay-copy.copied { background: #00a651; color: #fff; }
.pay-chev { width: 18px; height: 18px; flex: none; color: var(--text-3); transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.pay-row.open .pay-chev { transform: rotate(180deg); }
.pay-row-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
.pay-row.open .pay-row-body { grid-template-rows: 1fr; }
.pay-row-body-in { overflow: hidden; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 2px 14px 14px; }
.pay-open {
  width: 100%; justify-content: center; text-decoration: none;
  background: var(--pay-color, var(--accent)); color: #fff; border: none;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--pay-color, #0071e3) 30%, transparent);
  transition: filter 0.15s;
}
.pay-open:hover { filter: brightness(1.08); }
.pay-qr-wrap { text-align: center; }
.pay-qr {
  width: 190px; height: 190px; object-fit: contain;
  background: #fff; border-radius: 18px; padding: 12px;
  cursor: zoom-in; border: 1px solid var(--separator);
}
.pay-qr-hint { display: block; font-size: 11.5px; color: var(--text-2); margin-top: 6px; }

/* ── Payments + SEO: settings admin ───────────────────── */
.seo-details { margin: 4px 0 10px; }
.seo-details summary {
  cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent);
  padding: 10px 0; user-select: none;
}
.seo-details .hint { margin-bottom: 10px; }
.og-preview { width: 100%; max-width: 380px; height: auto; aspect-ratio: 1200/630; object-fit: cover; border-radius: 14px; }
.pay-admin-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.pay-admin-item {
  border: 1px solid var(--separator); border-radius: 14px;
  background: var(--fill); padding: 12px 14px;
}
.pay-admin-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.pay-admin-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.pay-admin-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.pay-admin-qr { width: 52px; height: 52px; object-fit: contain; background: #fff; border-radius: 10px; border: 1px solid var(--separator); padding: 3px; }
.pay-admin-noqr { font-size: 12.5px; color: var(--text-2); }
.pay-qr-form { display: flex; align-items: center; gap: 8px; }
.pay-qr-form input[type="file"] { font-size: 12.5px; max-width: 190px; }
.pay-color-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0; }
.pay-color-swatch { position: relative; width: 30px; height: 30px; cursor: pointer; }
.pay-color-swatch::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: var(--c); border: 2px solid transparent;
  transition: transform 0.15s;
}
.pay-color-swatch.sel::before { transform: scale(0.82); border-color: var(--c); box-shadow: 0 0 0 2px var(--bg, #fff), 0 0 0 4px var(--c); }
.pay-color-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.pay-color-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.pay-color-custom input[type="color"] {
  width: 30px; height: 30px; border: none; padding: 0; background: none;
  border-radius: 50%; cursor: pointer; overflow: hidden;
}
.pay-color-custom input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.pay-color-custom input[type="color"]::-webkit-color-swatch { border-radius: 50%; border: 1px solid var(--separator); }

/* ── Admin panel ── */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.admin-stat { padding: 18px 16px; text-align: center; }
.admin-stat-num {
  font-size: 28px; font-weight: 700; letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--accent, #0071e3), #64d2ff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.admin-stat-label { font-size: 12px; color: var(--text-secondary, #86868b); margin-top: 4px; font-weight: 500; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.badge-admin {
  display: inline-block; vertical-align: middle; padding: 3px 10px; border-radius: 980px;
  font-size: 12px; font-weight: 600; margin-left: 6px;
  background: rgba(0,113,227,0.14); color: var(--accent, #0071e3);
}
.input-sm { padding: 6px 10px; font-size: 13px; }
.plan-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.plan-name { width: 140px; }
.plan-limit { width: 76px; }
.plan-def { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; cursor: pointer; }
.plan-create { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.transfer-dd { display: inline-block; position: relative; }
.transfer-dd > summary { list-style: none; cursor: pointer; }
.transfer-dd > summary::-webkit-details-marker { display: none; }
.transfer-form {
  display: flex; gap: 6px; align-items: center;
  margin-top: 8px; padding: 10px; border-radius: 14px;
  background: var(--card-bg, rgba(255,255,255,0.7));
  border: 1px solid var(--separator, rgba(0,0,0,0.08));
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.transfer-form select { max-width: 170px; }
@media (max-width: 640px) {
  .admin-stat-num { font-size: 22px; }
  .transfer-form { flex-wrap: wrap; }
  .transfer-form select { max-width: none; flex: 1; }
}

/* ── AJAX settings: toast + autosave indicator ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px);
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 32px rgba(0,0,0,.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 9999;
  max-width: 86vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: rgba(255, 59, 48, 0.95); }
@media (prefers-color-scheme: light) {
  .toast { background: rgba(29, 29, 31, 0.88); }
}
.save-row { display: flex; align-items: center; gap: 12px; }
.save-indicator {
  font-size: 13px;
  color: var(--muted, #86868b);
  opacity: 0;
  transition: opacity .2s ease;
  white-space: nowrap;
}
.save-indicator.ok { opacity: 1; color: #34c759; }
.save-indicator.err { opacity: 1; color: #ff3b30; }
.save-indicator:not(.ok):not(.err) { opacity: .8; }
.btn.busy { opacity: .55; pointer-events: none; }


/* ── Public menu page: client-branded nav ─────────────── */
.menu-brand { display: inline-flex; align-items: center; gap: 10px; }
.menu-brand-mark {
  width: 34px; height: 34px; border-radius: 10px; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--fill); color: var(--text);
  font-weight: 700; font-size: 16px; flex: none;
  box-shadow: inset 0 0 0 1px var(--glass-border);
}
.menu-brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.menu-brand-name {
  font-weight: 700; font-size: 16px; letter-spacing: -0.02em; color: var(--text);
  max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 999px;
  font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em;
  color: #fff; white-space: nowrap; text-decoration: none;
  background: linear-gradient(135deg, #ff9f0a 0%, #ff375f 50%, #bf5af2 100%);
  background-size: 160% 160%;
  box-shadow: 0 4px 14px rgba(255, 55, 95, 0.35);
  transition: transform 0.25s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.25s, background-position 0.5s;
}
.nav-cta:hover { background-position: 100% 50%; transform: translateY(-1px) scale(1.02); box-shadow: 0 6px 20px rgba(255, 55, 95, 0.45); }
.nav-cta:active { transform: scale(0.97); }
.nav-cta-plus { font-size: 15px; font-weight: 700; line-height: 1; margin-top: -1px; }
.foot-brand { color: var(--accent); font-weight: 600; text-decoration: none; }

/* ── Public page: locations ────────────────────────────── */
.locations-card { margin-top: 18px; }
.locations-card { padding: 22px; border-radius: var(--radius-lg); background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); }
.loc-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.loc-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-md);
  background: var(--fill); color: var(--text); text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.2,0.8,0.2,1), background 0.2s;
}
a.loc-card:hover { transform: translateY(-2px); background: var(--accent-soft); }
.loc-card-pin { width: 22px; height: 22px; flex: none; color: var(--accent); display: inline-flex; }
.loc-card-pin svg { width: 100%; height: 100%; }
.loc-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.loc-card-body strong { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.loc-card-addr { font-size: 13px; color: var(--text-2); }
.loc-card-go { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.contact-sheet-locs { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--separator); }

/* ── Settings: modern dropzone uploader ───────────────── */
.dropzone {
  position: relative; border-radius: var(--radius-lg);
  border: 2px dashed var(--separator); background: var(--fill);
  padding: 38px 20px; text-align: center; cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s cubic-bezier(0.2,0.8,0.2,1);
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.01); }
.dz-icon { width: 46px; height: 46px; margin: 0 auto 12px; color: var(--accent); }
.dz-icon svg { width: 100%; height: 100%; }
.dz-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.dz-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.dz-browse { color: var(--accent); font-weight: 600; text-decoration: underline; }
.dz-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 14px; }
.dz-card {
  position: relative; border-radius: var(--radius-md); overflow: hidden;
  background: var(--glass-strong); border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  animation: dzPop 0.3s cubic-bezier(0.2,0.8,0.2,1);
}
@keyframes dzPop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
.dz-card img { width: 100%; height: 110px; object-fit: cover; display: block; background: var(--fill); }
.dz-pdf { height: 110px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--red); background: var(--fill); font-size: 15px; }
.dz-card-body { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.dz-caption { font-size: 13px !important; padding: 8px 10px !important; }
.dz-name { font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-remove {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px;
  border: none; border-radius: 50%; cursor: pointer;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 16px; line-height: 1;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.dz-remove:hover { background: var(--red); transform: scale(1.1); }
.upload-progress { height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; margin-top: 12px; }
.upload-progress-bar { height: 100%; width: 40%; border-radius: 2px; background: var(--accent); animation: upSlide 1.1s ease-in-out infinite; }
@keyframes upSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* ── Settings: drag-to-reorder file rows ──────────────── */
.file-row { transition: background 0.2s; }
.file-row.dragging { opacity: 0.45; }
.file-row.over-row { box-shadow: inset 0 2px 0 var(--accent); }
.drag-handle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 30px; margin-right: 6px; cursor: grab;
  color: var(--text-3); vertical-align: middle;
  transition: color 0.2s;
}
.drag-handle svg { width: 14px; height: 14px; }
.drag-handle:hover { color: var(--text); }
.drag-handle:active { cursor: grabbing; }

/* ── Settings: locations admin + payment edit details ── */
.loc-admin-list { display: flex; flex-direction: column; gap: 10px; }
.loc-admin-item { padding: 14px 16px; border-radius: var(--radius-md); background: var(--fill); }
.loc-admin-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.loc-admin-head strong { font-size: 14.5px; }
.loc-admin-addr { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.loc-admin-actions { display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.loc-edit-details, .pay-edit-details { display: inline-block; }
.loc-edit-details > summary, .pay-edit-details > summary { cursor: pointer; list-style: none; }
.loc-edit-details > summary::-webkit-details-marker, .pay-edit-details > summary::-webkit-details-marker { display: none; }
.loc-edit-form, .pay-edit-form { margin-top: 12px; padding: 14px; border-radius: var(--radius-md); background: var(--glass-strong); border: 1px solid var(--glass-border); min-width: min(420px, 100%); }
@media (max-width: 640px) {
  .nav-cta { padding: 8px 12px; font-size: 12.5px; }
  .menu-brand-name { max-width: 32vw; }
  .dz-preview { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ── Billing: badges, banners, activation sheet, admin ── */
.bill-badge { display: inline-block; vertical-align: middle; padding: 3px 10px; border-radius: 980px; font-size: 11.5px; font-weight: 600; margin-left: 6px; white-space: nowrap; }
.bill-active { background: rgba(52,199,89,0.14); color: var(--green); }
.bill-trial { background: var(--accent-soft); color: var(--accent); }
.bill-grace { background: var(--amber-soft); color: var(--amber); }
.bill-expired { background: var(--red-soft); color: var(--red); }
.alert-info { background: var(--accent-soft); color: var(--accent); }
.grace-banner {
  margin: 12px auto 0; max-width: 680px; padding: 12px 18px;
  border-radius: var(--radius-md); font-size: 14px; font-weight: 500;
  background: var(--amber-soft); color: var(--amber);
  border: 1px solid rgba(255,159,10,0.3); text-align: center;
}
.grace-banner a { color: inherit; font-weight: 700; text-decoration: underline; }
.plan-rules-card .plan-price { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); margin: 6px 0 4px; }
.plan-rules-card .plan-rules { font-size: 14px; color: var(--text-2); white-space: pre-line; }
/* activation sheet */
.activate-card { max-width: 520px; }
.act-price-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: var(--radius-md); background: var(--fill); margin: 10px 0; }
.act-price-label { font-size: 13.5px; color: var(--text-2); }
.act-price { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.act-due { color: var(--green); }
.act-pays { margin: 10px 0; }
.act-pays .pay-cards { max-height: 240px; overflow-y: auto; }
.act-coupon-row { display: flex; gap: 8px; margin-top: 10px; }
.act-coupon-row .input { flex: 1; }
.coupon-msg { min-height: 18px; margin: 6px 2px 0; font-size: 13px; }
.coupon-msg.ok { color: var(--green); font-weight: 600; }
.coupon-msg.err { color: var(--red); font-weight: 600; }
.coupon-chip { display: inline-block; padding: 2px 8px; border-radius: 980px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; }
/* proof upload */
.proof-drop {
  position: relative; border-radius: var(--radius-md); border: 2px dashed var(--separator);
  background: var(--fill); min-height: 96px; cursor: pointer; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.25s, background 0.25s;
}
.proof-drop:hover, .proof-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.proof-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-3); font-size: 13px; padding: 18px; }
.proof-empty svg { width: 30px; height: 30px; }
.proof-preview { width: 100%; max-height: 260px; object-fit: contain; display: block; background: var(--bg); }
.proof-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--separator); cursor: zoom-in; transition: transform 0.2s; }
.proof-thumb:hover { transform: scale(1.06); }
/* admin billing page */
.input-xs { padding: 6px 9px; font-size: 12.5px; height: 32px; border-radius: var(--radius-sm); }
.inline-details { display: inline-block; }
.inline-details > summary { cursor: pointer; list-style: none; display: inline-block; }
.inline-details > summary::-webkit-details-marker { display: none; }
.mini-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.mini-form .input { width: auto; flex: 0 1 auto; }
.plan-billing-item { padding: 10px 0; border-bottom: 1px solid var(--separator); }
.plan-billing-item:last-child { border-bottom: none; }
.plan-billing-item summary { cursor: pointer; font-size: 14.5px; padding: 6px 0; list-style: none; }
.plan-billing-item summary::-webkit-details-marker { display: none; }
.plan-billing-item .mini-form { display: block; }
.plan-billing-item .mini-form .field { margin-bottom: 10px; }
.arow-pending { background: rgba(255,159,10,0.05); }
.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
@media (max-width: 640px) {
  .act-price { font-size: 16px; }
  .proof-thumb { width: 52px; height: 52px; }
}

/* ── Footer legal links ─────────────────────────────────── */
.site-footer { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.foot-links a { font-size: 12.5px; color: var(--text-3); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.foot-links a:hover { color: var(--accent); }

/* ── Legal pages ────────────────────────────────────────── */
.legal-page { max-width: 760px; }
.legal-panel { padding: 34px 30px; }
.legal-title { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 4px; }
.legal-updated { font-size: 13px; color: var(--text-3); margin-bottom: 24px; }
.legal-body h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 26px 0 10px; }
.legal-body h3 { font-size: 17px; font-weight: 650; margin: 22px 0 8px; }
.legal-body h4 { font-size: 15px; font-weight: 650; margin: 18px 0 6px; }
.legal-body p { font-size: 15px; line-height: 1.65; color: var(--text-2); margin-bottom: 12px; }
.legal-body ul { margin: 0 0 14px 20px; color: var(--text-2); font-size: 15px; line-height: 1.65; }
.legal-body li { margin-bottom: 6px; }
.legal-body strong { color: var(--text); font-weight: 650; }
.page-body-input { font-family: var(--mono); font-size: 13px; line-height: 1.6; }
.page-edit-details > summary { cursor: pointer; list-style: none; padding: 4px 0; }
.page-edit-details > summary::-webkit-details-marker { display: none; }
.page-edit-details[open] > summary { margin-bottom: 6px; }

/* ── Portfolio ──────────────────────────────────────────── */
.pf-hero { padding-bottom: 10px; }
.pf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px; margin-top: 8px;
}
.pf-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 26px 18px 22px;
  border-radius: var(--radius-lg);
  background: var(--glass); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  transition: transform 0.3s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.3s;
}
.pf-card:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(0,0,0,0.12); }
/* standardized logo: fixed square, object-fit cover — never distorted, never different sizes */
.pf-logo-wrap { width: 96px; height: 96px; margin-bottom: 10px; }
.pf-logo-ring { position: relative; display: block; width: 96px; height: 96px; padding: 4px; border-radius: 30px; box-sizing: border-box; }
.pf-logo-ring::before {
  content: ''; position: absolute; inset: 0; border-radius: 30px; padding: 3px;
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: frameShift 7s linear infinite;
}
.pf-logo-ring img, .pf-initials {
  display: block; width: 88px; height: 88px; border-radius: 26px;
  object-fit: cover; background: var(--glass-strong);
}
.pf-initials {
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 700; color: var(--text-2);
}
.pf-name { font-size: 15.5px; font-weight: 650; letter-spacing: -0.01em; text-align: center; }
.pf-meta { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.pf-view { min-width: 120px; }
.pf-cta { text-align: center; margin: 36px 0 10px; }
.pf-cta p { color: var(--text-2); font-size: 15px; margin-bottom: 12px; }

/* ── Features page ──────────────────────────────────────── */
.hero-cta { margin-top: 18px; }
.feat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px; margin-top: 6px;
}
.feat-card {
  padding: 22px 20px;
  border-radius: var(--radius-lg);
  background: var(--glass); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  transition: transform 0.3s cubic-bezier(0.2,0.8,0.2,1);
}
.feat-card:hover { transform: translateY(-3px); }
.feat-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 12px; }
.feat-icon svg { width: 21px; height: 21px; }
.feat-card h3 { font-size: 15.5px; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 6px; }
.feat-card p { font-size: 13.5px; line-height: 1.55; color: var(--text-2); }

/* ── Admin portfolio checkbox ───────────────────────────── */
.portfolio-chk { display: inline-flex; cursor: pointer; }
.portfolio-chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.pchk-box {
  width: 22px; height: 22px; border-radius: 7px;
  border: 2px solid var(--separator); background: var(--glass-strong);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.2s cubic-bezier(0.2,0.8,0.2,1);
}
.pchk-box::after {
  content: ''; width: 10px; height: 6px;
  border-left: 2.4px solid #fff; border-bottom: 2.4px solid #fff;
  transform: rotate(-45deg) scale(0); margin-top: -2px;
  transition: transform 0.2s cubic-bezier(0.2,0.8,0.2,1);
}
.portfolio-chk input:checked + .pchk-box { background: var(--accent); border-color: var(--accent); }
.portfolio-chk input:checked + .pchk-box::after { transform: rotate(-45deg) scale(1); }
@media (max-width: 640px) {
  .legal-panel { padding: 24px 18px; }
  .legal-title { font-size: 24px; }
  .pf-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .feat-grid { grid-template-columns: 1fr; }
}

/* nav brand mark with the user's chosen frame color */
.menu-brand-mark { position: relative; }
.menu-brand-mark.bs-aurora::before, .menu-brand-mark.bs-sunset::before, .menu-brand-mark.bs-candy::before,
.menu-brand-mark.bs-ocean::before, .menu-brand-mark.bs-neon::before, .menu-brand-mark.bs-gold::before {
  content: ''; position: absolute; inset: -2px; border-radius: 12px; padding: 2px;
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: frameShift 7s linear infinite;
}

/* ══════════════════════════════════════════════════════════
   Mobile app mode (≤640px) — iOS-style grouped panels,
   44pt targets, card-ified tables, no-zoom inputs.
   ══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* page shell: edge-to-edge app feel with safe-area respect */
  .page { padding: 16px 12px calc(40px + env(safe-area-inset-bottom, 0px)); max-width: 100%; }
  .app main { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }

  /* panels = grouped app sections */
  .panel {
    padding: 18px 16px;
    margin-bottom: 14px;
    border-radius: 20px;
  }
  .panel h3 {
    font-size: 17px; font-weight: 700; letter-spacing: -0.02em;
    margin-bottom: 12px;
  }
  .panel > .hint:first-of-type { margin-bottom: 12px; }

  /* compact page head */
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; padding: 4px 2px 14px; }
  .page-head h1 { font-size: 24px; }
  .page-head > div:last-child { width: 100%; }
  .page-head > div[style*="flex"] > .btn,
  .page-head > div[style*="flex"] > form { flex: 1 1 auto; }
  .page-head > div[style*="flex"] > .btn { width: 100%; justify-content: center; }
  .page-head > div[style*="flex"] > form > .btn { width: 100%; justify-content: center; }
  .back-btn { font-size: 15px; }

  /* inputs: 44pt+ tall, 16px font (prevents iOS auto-zoom) */
  .input, select.input, textarea.input,
  .field input[type="text"], .field input[type="tel"], .field input[type="password"], .field input[type="url"], .field input[type="number"], .field input[type="file"] {
    font-size: 16px;
    min-height: 46px;
    border-radius: 12px;
    padding: 12px 14px;
  }
  textarea.input { min-height: 84px; }
  .field { margin-bottom: 14px; }
  .field label { font-size: 13px; margin-bottom: 6px; }
  .info-grid { grid-template-columns: 1fr; gap: 0; }

  /* buttons: full-size touch targets */
  .btn { min-height: 44px; border-radius: 12px; font-size: 15px; }
  .btn-sm { min-height: 38px; height: 38px; padding: 0 16px; font-size: 14px; }
  .btn-block { width: 100%; }
  /* primary actions inside panels go full width */
  .save-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .save-row .btn { width: 100%; justify-content: center; }
  .save-row .save-indicator { text-align: center; }
  #uploadForm > .btn-primary, form[action$="/activate"] .btn-primary,
  form[action$="/payments"] > .btn-primary, form[action$="/locations"] > .btn-primary,
  form[action$="/logo"] .btn-primary, form[action$="/og-image"] .btn-primary { width: 100%; justify-content: center; }

  /* tables → stacked cards */
  .files-table, .files-table thead, .files-table tbody, .files-table tr, .files-table td { display: block; width: 100%; }
  .files-table thead { display: none; }
  .files-table tr {
    background: var(--fill);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 10px;
    box-sizing: border-box;
  }
  .files-table td { padding: 5px 0; text-align: left !important; }
  .files-table td:first-child { display: flex; align-items: center; gap: 6px; padding-bottom: 8px; }
  .file-thumb { width: 64px; height: 64px; border-radius: 12px; }
  .files-table tr td:last-child form { width: 100%; }
  .files-table tr td:last-child .btn-danger { width: 100%; justify-content: center; }
  .caption-form { display: flex; flex-direction: column; gap: 8px; width: 100%; }
  .caption-form .btn { width: 100%; justify-content: center; }
  .files-table select.select-sm { width: 100%; min-height: 42px; font-size: 15px; border-radius: 12px; padding: 10px 12px; }
  .drag-handle { width: 26px; height: 40px; }

  /* generic admin/dashboard tables: horizontal scroll, never squeezed */
  .panel table:not(.files-table) { font-size: 14px; }
  .panel table:not(.files-table) th, .panel table:not(.files-table) td { padding: 10px 8px; white-space: nowrap; }
  .table-scroll, .panel div[style*="overflow-x"] { margin: 0 -6px; padding: 0 6px; }

  /* auth cards: full-bleed app sheets */
  .auth-wrap { padding: 16px 12px; }
  .glass-card { padding: 24px 18px; border-radius: 22px; width: 100%; box-sizing: border-box; }
  .glass-card form .btn-block { margin-top: 6px; }
  .otp-row { gap: 8px; }
  .otp-box { width: 44px; height: 54px; font-size: 22px; border-radius: 12px; }

  /* nav: compact app bar */
  .glass-nav .nav-inner { padding: 0 12px; gap: 8px; }
  .nav-link { font-size: 14px; padding: 8px 10px; }
  .logo { font-size: 16px; }
  .logo-mark { width: 30px; height: 30px; font-size: 14px; }
  .menu-brand-mark { width: 30px; height: 30px; border-radius: 9px; }
  .menu-brand-name { font-size: 15px; max-width: 30vw; }
  .nav-cta { padding: 8px 12px; font-size: 12.5px; }
  .theme-btn { width: 36px; height: 36px; }

  /* settings sub-components */
  .dropzone { padding: 30px 14px; border-radius: 18px; }
  .dz-title { font-size: 15px; }
  .dz-preview { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dz-card img, .dz-pdf { height: 96px; }
  .border-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .pay-admin-item, .loc-admin-item { padding: 14px 12px; border-radius: 16px; }
  .pay-admin-actions { gap: 8px; }
  .pay-admin-actions > form, .pay-admin-actions > details { flex: 1 1 auto; }
  .pay-admin-actions .btn { width: 100%; justify-content: center; }
  .pay-edit-form, .loc-edit-form { min-width: 0; padding: 12px; }
  .pay-color-row { gap: 8px; }
  .pay-color-swatch { width: 36px; height: 36px; }
  .loc-admin-actions > details, .loc-admin-actions > form { flex: 1 1 auto; }
  .loc-admin-actions .btn { width: 100%; justify-content: center; }

  /* sheets: full-width bottom sheets like native */
  .qr-sheet-card {
    width: calc(100% - 16px); max-width: none; margin: 0 8px;
    border-radius: 24px 24px 0 0;
    align-self: flex-end;
    max-height: 88vh; overflow-y: auto;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }
  .activate-card { max-width: none; }

  /* admin stats: 2-col grid of chips */
  .admin-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .admin-stat { padding: 14px 10px; border-radius: 18px; }
  .admin-stat-num { font-size: 22px; }

  /* admin inline forms: stack full width */
  .mini-form { flex-direction: column; align-items: stretch; }
  .mini-form .input, .mini-form select, .mini-form .btn { width: 100%; }
  .transfer-form, .plan-form { flex-direction: column; align-items: stretch; }
  .transfer-form .btn, .plan-form .btn { width: 100%; justify-content: center; }
  .transfer-dd, .inline-details { width: 100%; }
  .transfer-dd > summary, .inline-details > summary { width: 100%; box-sizing: border-box; text-align: center; justify-content: center; }
  .page-edit-details > summary { padding: 8px 0; }

  /* billing history proof thumbs bigger */
  .proof-thumb { width: 72px; height: 72px; }

  /* features/portfolio grids */
  .feat-grid { grid-template-columns: 1fr; gap: 10px; }
  .feat-card { padding: 18px 16px; border-radius: 18px; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; }
  .feat-icon { width: 44px; height: 44px; margin-bottom: 0; grid-row: 1 / 3; }
  .feat-card h3 { align-self: end; margin-bottom: 2px; }
  .pf-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pf-card { padding: 20px 12px 18px; border-radius: 18px; }
  .pf-logo-wrap, .pf-logo-ring { width: 80px; height: 80px; }
  .pf-logo-ring img, .pf-initials { width: 72px; height: 72px; border-radius: 22px; font-size: 28px; }
  .pf-view { width: 100%; justify-content: center; }
  .pf-name { font-size: 14px; }

  /* legal pages */
  .legal-panel { padding: 22px 16px; border-radius: 20px; }
  .legal-title { font-size: 22px; }
  .legal-body h2 { font-size: 19px; }
  .legal-body p, .legal-body ul { font-size: 14.5px; }

  /* hero tighter on phones */
  .hero { padding: 44px 16px 36px; }
  .hero-sub { font-size: 16px; margin: 14px auto 22px; }
  .hero-cta { flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; margin: 0 auto 30px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-steps { flex-direction: column; align-items: stretch; max-width: 340px; margin: 0 auto; }

  /* toast: above home indicator */
  .toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 32px); max-width: 400px; text-align: center; }

  /* public menu page */
  .menu-hero { padding-top: 18px; }
  .menu-logo { width: 84px; height: 84px; border-radius: 24px; }
  .menu-figure img { border-radius: 18px; }
  .contact-card, .locations-card { padding: 18px 14px; border-radius: 20px; }
  .contact-chips { gap: 8px; }
  .contact-chip { flex: 1 1 calc(50% - 4px); justify-content: center; }
  .share-bar { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .grace-banner { margin: 10px 12px 0; font-size: 13px; }

  /* alerts full-bleed friendly */
  .alert { border-radius: 14px; padding: 13px 14px; font-size: 14px; }

  /* empty states */
  .empty-state { padding: 32px 16px; }
}

/* dashboard/admin plain tables: scroll horizontally inside their panel on phones */
@media (max-width: 640px) {
  .panel > table:not(.files-table) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .page-head .btn, .page-head form .btn { min-height: 40px; }
}

/* ══════════════════════════════════════════════════════════
   Landing mobile pass (≤640px) — clean nav bar, fixed Memoza
   launcher, chat as native bottom sheet, polished CTA blocks.
   ══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* nav: hide marketing links (they live in hero + footer) */
  .nav-hide-mobile { display: none; }
  .nav-actions { gap: 6px; }
  .nav-link { font-size: 13.5px; padding: 8px 11px; }
  .nav-link-solid { padding: 8px 14px; }

  /* hero: tighter, more premium type scale */
  .hero { padding: 40px 16px 30px; }
  .hero h1 { font-size: clamp(32px, 9vw, 42px); }
  .hero-badge { font-size: 12px; padding: 5px 12px; margin-bottom: 18px; }
  .hero-sub { font-size: 15.5px; line-height: 1.55; margin: 14px auto 24px; }
  .hero-cta { gap: 10px; max-width: 320px; margin: 0 auto 32px; }
  .hero-steps { gap: 8px; max-width: 320px; }
  .step { padding: 11px 14px; font-size: 14px; border-radius: 14px; width: 100%; justify-content: flex-start; box-sizing: border-box; }

  /* stats band: 2×2 grid */
  .stats-band { grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px; margin: 6px auto 24px; }
  .stat { padding: 18px 10px; border-radius: 18px; }
  .stat strong { font-size: 22px; }
  .stat span { font-size: 12.5px; }

  /* features grid on home */
  .feat { padding: 20px 16px; border-radius: 18px; }
  .feat-icon { font-size: 26px; margin-bottom: 10px; }
  .feat h3 { font-size: 16px; }
  .feat p { font-size: 14px; }

  /* final CTA card */
  .final-cta { padding: 8px 16px calc(64px + env(safe-area-inset-bottom, 0px)); }
  .final-cta .panel { padding: 36px 20px !important; border-radius: 24px; }
  .final-cta h2 { font-size: 24px !important; }
  .final-cta .hero-cta { margin-bottom: 0; max-width: 300px; }

  /* footer */
  .site-footer { padding: 28px 16px calc(28px + env(safe-area-inset-bottom, 0px)); gap: 12px; }
  .foot-links { gap: 14px; }
  .foot-links a { font-size: 12px; padding: 6px 2px; }

  /* Memoza launcher: pinned above home indicator, never overlapped */
  .ai-widget {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    z-index: 260;
  }
  .ai-toggle-btn {
    height: 52px;
    padding: 0 18px;
    font-size: 14.5px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  .ai-toggle-btn svg { width: 22px; height: 22px; }

  /* Chat panel: full-width native bottom sheet */
  .ai-panel {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
    max-height: min(72vh, 560px);
    border-radius: 24px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateY(16px);
    z-index: 261;
  }
  .ai-panel.open { transform: none; }
  .ai-panel-header { padding: 15px 16px; }
  .ai-panel-body { max-height: none; flex: 1; min-height: 220px; padding: 14px 12px; }
  .ai-panel-input { padding: 10px 12px 12px; }
  #ai-input { height: 44px; font-size: 16px; } /* 16px prevents iOS zoom */
  .ai-send-btn, .ai-attach-btn { width: 44px; height: 44px; }
  .ai-bubble { font-size: 14.5px; max-width: 82%; }

  /* toast sits above the Memoza launcher */
  .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Store (hardware items) ── */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 20px; }
.store-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.store-img-wrap { background: var(--fill); aspect-ratio: 4 / 3; overflow: hidden; }
.store-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.store-card:hover .store-img { transform: scale(1.04); }
.store-img-empty { display: flex; align-items: center; justify-content: center; font-size: 42px; }
.store-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.store-card-body h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.store-desc { font-size: 13.5px; color: var(--text-2); line-height: 1.45; flex: 1; }
.store-price-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.store-price { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.store-order-btn { min-width: 84px; }
.bill-shipped { background: var(--accent-soft); color: var(--accent); }
.os-total-row { background: var(--accent-soft); }
.qty-stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; width: fit-content; }
.qty-btn { width: 46px; height: 46px; border: none; background: var(--fill); color: var(--text); font-size: 20px; font-weight: 600; cursor: pointer; transition: background 0.15s; -webkit-tap-highlight-color: transparent; }
.qty-btn:active { background: var(--accent-soft); }
.qty-input { width: 64px; text-align: center; border: none; border-radius: 0; box-shadow: none !important; height: 46px; font-size: 16px; font-weight: 600; -moz-appearance: textfield; appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.store-admin-thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--fill); font-size: 20px; }
.store-admin-noimg { color: var(--text-2); }
@media (max-width: 640px) {
  .store-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .store-card-body { padding: 12px 13px 13px; }
  .store-card-body h3 { font-size: 14.5px; }
  .store-desc { font-size: 12.5px; }
  .store-price { font-size: 15px; }
  .store-order-btn { min-width: 68px; font-size: 13px; padding: 9px 14px; }
}

/* ── Dashboard: latest store items strip ── */
.dash-store-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dash-store-head h3 { margin-bottom: 0; }
.dash-store-all { font-size: 13.5px; font-weight: 600; color: var(--accent); text-decoration: none; padding: 8px 4px; }
.dash-store-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dash-store-item { display: block; text-decoration: none; color: inherit; background: var(--fill); border: 1px solid var(--glass-border); border-radius: 16px; overflow: hidden; transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s; }
.dash-store-item:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10); }
.dash-store-img { aspect-ratio: 1 / 1; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 34px; overflow: hidden; }
.dash-store-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dash-store-info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.dash-store-info strong { font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dash-store-price { font-size: 14px; font-weight: 700; color: var(--accent); letter-spacing: -0.01em; }
@media (max-width: 640px) {
  .dash-store-strip { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dash-store-item { border-radius: 14px; }
  .dash-store-info { padding: 9px 10px 11px; }
}

/* ── Admin mobile usability pass ── */
@media (max-width: 640px) {
  /* xs inputs are real touch targets */
  .input-xs { min-height: 42px; font-size: 15px; border-radius: 11px; padding: 9px 12px; }
  /* admin action cells: stack controls full width, thumb-first rows breathe */
  .files-table td .inline-form { display: flex; gap: 8px; margin-top: 8px; }
  .files-table td .inline-form .btn { flex: 1 1 auto; justify-content: center; min-height: 42px; }
  .files-table td .inline-form .input-xs { flex: 1 1 auto; width: auto; }
  .files-table td form + form { margin-top: 8px; }
  .files-table details.inline-details { margin-top: 8px; }
  .files-table details.inline-details > summary { min-height: 42px; display: flex; align-items: center; }
  /* add-forms inside admin panels: comfortable stacked fields */
  .panel > form.mini-form .input, .panel > form.mini-form textarea.input,
  .panel > form.mini-form select.input, .panel > form.mini-form input[type="file"] { width: 100%; box-sizing: border-box; }
  .panel > form.mini-form { gap: 10px; }
  .panel > form.mini-form .btn { min-height: 46px; }
  .chk { min-height: 44px; display: flex; align-items: center; gap: 10px; font-size: 15px; }
  .chk input[type="checkbox"] { width: 22px; height: 22px; }
  /* proof thumbnails easier to tap */
  .proof-thumb { width: 84px; height: 84px; border-radius: 14px; }
  /* admin stats: keep 2-col but let numbers fit */
  .admin-stat-num { font-size: 20px; word-break: break-word; }
  /* details editors inside admin rows: full-bleed cards */
  .inline-details[open] > .mini-form { padding: 12px; background: var(--bg); border-radius: 14px; margin-top: 8px; }
  .inline-details[open] > .mini-form .input, .inline-details[open] > .mini-form textarea { width: 100%; box-sizing: border-box; margin-bottom: 8px; }
  /* page-head button rows: 2-up grid instead of one tall column */
  .page-head > div[style*="flex"] { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; }
  .page-head > div[style*="flex"] > form { grid-column: span 1; }
}

