/* ============================================================
   SmartMenu QR v2.0 — Premium Design System
   Design: Dark sidebar + off-white content + bold accent
   Palette: Charcoal sidebar / Warm white canvas / Electric indigo
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  /* Core palette */
  --sidebar-bg: #0f1117;
  --sidebar-border: rgba(255,255,255,.07);
  --sidebar-text: rgba(255,255,255,.55);
  --sidebar-active: #ffffff;
  --sidebar-pill: rgba(255,255,255,.09);
  --sidebar-pill-active: #5b4fff;

  --canvas: #f5f5f7;
  --surface: #ffffff;
  --surface2: #f0f0f3;
  --surface3: #e8e8ed;

  --ink: #111118;
  --ink2: #3a3a45;
  --muted: #7a7a8c;
  --line: #e4e4ea;

  --accent: #5b4fff;
  --accent2: #7c6fff;
  --accent-glow: rgba(91,79,255,.18);
  --accent-soft: rgba(91,79,255,.08);

  --green: #16a34a;
  --green-bg: #f0fdf4;
  --green-text: #166534;
  --amber: #d97706;
  --amber-bg: #fffbeb;
  --amber-text: #92400e;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --red-text: #991b1b;
  --blue: #2563eb;
  --blue-bg: #eff6ff;
  --blue-text: #1d4ed8;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12);
  --shadow-accent: 0 8px 24px rgba(91,79,255,.28);

  --sidebar-w: 240px;
  --topbar-h: 60px;

  /* Theme-aware overrides (business themes) */
  --primary: #5b4fff;
  --primary2: #7c6fff;
}

/* ── Business themes ── */
body[data-theme="coffee"]   { --primary:#8b4513; --primary2:#c08432; }
body[data-theme="burger"]   { --primary:#e53e3e; --primary2:#f97316; }
body[data-theme="restaurant"]{ --primary:#2d3748; --primary2:#b45309; }
body[data-theme="juice"]    { --primary:#16a34a; --primary2:#ec4899; }
body[data-theme="hotel"]    { --primary:#1e3a8a; --primary2:#7c3aed; }
body[data-theme="bakery"]   { --primary:#a16207; --primary2:#d946ef; }
body[data-theme="fast_food"]{ --primary:#dc2626; --primary2:#f59e0b; }
body[data-theme="lounge"]   { --primary:#7c3aed; --primary2:#db2777; }

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; color: var(--ink); background: var(--canvas); min-height: 100vh; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1,h2,h3,h4 { margin: 0; font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; letter-spacing: -.03em; }
p { margin: 0; }
button { cursor: pointer; font-family: inherit; }

/* ================================================================
   ADMIN SHELL — Sidebar Layout
   ================================================================ */

.admin-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 11px;
}
.sidebar-logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center;
  color: white; font-size: 18px;
  flex-shrink: 0;
  box-shadow: var(--shadow-accent);
}
.sidebar-brand-text strong {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.sidebar-brand-text small {
  color: var(--sidebar-text);
  font-size: 11px;
}

.sidebar-nav {
  padding: 14px 12px;
  flex: 1;
}
.sidebar-section {
  margin-bottom: 6px;
}
.sidebar-section-label {
  color: var(--sidebar-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 10px 8px 4px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: all .15s;
  margin-bottom: 1px;
}
.sidebar-link:hover {
  background: var(--sidebar-pill);
  color: rgba(255,255,255,.85);
}
.sidebar-link.active {
  background: var(--sidebar-pill-active);
  color: white;
  font-weight: 600;
}
.sidebar-link .sico {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  font-size: 16px;
  flex-shrink: 0;
  opacity: .7;
}
.sidebar-link.active .sico { opacity: 1; }

.sidebar-bottom {
  padding: 14px 12px;
  border-top: 1px solid var(--sidebar-border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
}
.sidebar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.sidebar-user-info strong {
  display: block;
  color: rgba(255,255,255,.85);
  font-size: 12.5px;
  font-weight: 600;
}
.sidebar-user-info span {
  color: var(--sidebar-text);
  font-size: 11px;
}

/* ── Main content ── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ── Topbar ── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 16px;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.02em;
}
.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.4s infinite;
}

/* ── Page content ── */
.page {
  padding: 28px;
  flex: 1;
}

/* ── Layout ── -- backwards compat alias */
.layout { padding: 28px; }

/* ================================================================
   CARDS & SURFACES
   ================================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 24px; }
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.card-body { padding: 20px 24px; }

/* glass/hero card compat */
.glass, .hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* ================================================================
   STATS / KPI
   ================================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-card .stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.04em;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.stat-card .stat-sub {
  font-size: 12px;
  color: var(--muted);
}
.stat-card .stat-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 18px;
  margin-bottom: 4px;
}
/* compat with old .stat class */
.stat { display: flex; align-items: center; justify-content: space-between; }
.stat b { font-size: 28px; font-weight: 800; color: var(--accent); font-family: 'Plus Jakarta Sans', sans-serif; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn, button[type=submit], button:not(.qty button):not(.nt-close):not(.global-sound-btn):not(#enableSoundBtn):not(#globalSoundBtn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  background: var(--accent);
  color: white;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover, button[type=submit]:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(91,79,255,.3);
}
.btn.secondary {
  background: var(--surface);
  color: var(--ink2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.btn.secondary:hover { background: var(--surface2); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.green { background: var(--green); color: white; }
.btn.green:hover { box-shadow: 0 6px 20px rgba(22,163,74,.3); }
.btn.danger { background: var(--red); color: white; }
.btn.danger:hover { box-shadow: 0 6px 20px rgba(220,38,38,.3); }
.btn.small, button.small { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent-glow); }
.btn.ghost:hover { background: var(--accent-soft); }

/* ================================================================
   FORMS
   ================================================================ */
.form { display: grid; gap: 14px; }
label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink2);
  margin-bottom: 5px;
}
.input, select, textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea { min-height: 80px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7a8c' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px; }
.form-row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.span-all { grid-column: 1 / -1; }

/* compat grid classes */
.admin-form-grid { display: grid; gap: 13px; }
.admin-form-grid.two { grid-template-columns: 1fr 1fr; }
.admin-form-grid.three { grid-template-columns: 1fr 1fr 1fr; }

/* ================================================================
   TABLES
   ================================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.admin-table, .table, .simple-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th, .table th, .simple-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.admin-table td, .table td, .simple-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink2);
  font-size: 13.5px;
  vertical-align: middle;
}
.admin-table tr:last-child td, .table tr:last-child td, .simple-table tr:last-child td {
  border-bottom: none;
}
.admin-table tr:hover td, .table tr:hover td { background: var(--surface2); }

/* ================================================================
   BADGES / PILLS
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
}
.badge.pending    { background: var(--amber-bg); color: var(--amber-text); }
.badge.preparing  { background: var(--blue-bg);  color: var(--blue-text); }
.badge.ready      { background: var(--green-bg); color: var(--green-text); }
.badge.served     { background: var(--surface2); color: var(--ink2); }
.badge.cancelled  { background: var(--red-bg);   color: var(--red-text); }
.badge.partial    { background: #fff7ed;          color: #9a3412; }
.badge.paid       { background: var(--green-bg); color: var(--green-text); }
.badge.trial      { background: var(--blue-bg);  color: var(--blue-text); }
.badge.active     { background: var(--green-bg); color: var(--green-text); }
.badge.expired    { background: var(--red-bg);   color: var(--red-text); }
.badge.suspended  { background: var(--surface2); color: var(--muted); }

/* pill alias */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }

/* ================================================================
   NOTICES / ALERTS
   ================================================================ */
.notice {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin: 10px 0;
  font-size: 13.5px;
  font-weight: 500;
  border-left: 3px solid;
}
.notice { background: var(--amber-bg); color: var(--amber-text); border-color: var(--amber); }
.notice.success, .success { background: var(--green-bg); color: var(--green-text); border-color: var(--green); }
.notice.error, .error { background: var(--red-bg); color: var(--red-text); border-color: var(--red); }

/* ================================================================
   LOGIN PAGE
   ================================================================ */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--sidebar-bg);
  padding: 20px;
}
.login-card {
  width: min(420px, 94vw);
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
}
.login-logo {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center;
  color: white; font-size: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-accent);
}
.login-card h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -.04em;
}
.login-card > p { color: var(--muted); margin-bottom: 24px; font-size: 13.5px; }
.login-hint { color: var(--muted); font-size: 12px; margin-top: 16px; line-height: 1.6; }

/* ================================================================
   PAGE TITLE / BREADCRUMB
   ================================================================ */
.page-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.page-title h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.04em;
}
.page-title p, .page-title .sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}
/* compat */
.admin-page-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.admin-page-title h1 { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.04em; }
.admin-page-title p { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* ================================================================
   ADMIN MENU PAGE LAYOUT
   ================================================================ */
.admin-menu-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: start;
}
.admin-panel { padding: 22px; }
.admin-panel h2 { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 16px; }
.compact-panel { position: sticky; top: calc(var(--topbar-h) + 16px); }

.menu-admin-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 14px; margin-top: 14px; }
.admin-menu-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.admin-item-main { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; }
.admin-menu-photo {
  width: 64px; height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface2);
  border: 1px solid var(--line);
}
.no-photo {
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--muted);
}
.admin-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.admin-meta b { color: var(--accent); font-size: 14px; font-weight: 700; }
.translation-preview { font-size: 12px; color: var(--muted); margin-top: 6px; }
.admin-card-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.admin-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface2); border: 1px solid var(--line); }
.upload-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.list-head h2 { font-size: 15px; font-weight: 700; }

.edit-drawer summary { list-style: none; cursor: pointer; }
.edit-drawer summary::-webkit-details-marker { display: none; }
.edit-form { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }

.check-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--surface2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.check-row label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 500; }
.translation-box { background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.translation-box summary { font-weight: 700; cursor: pointer; color: var(--ink); font-size: 13px; }
.mini-row { display: grid; grid-template-columns: 1fr 90px; gap: 10px; }

/* ================================================================
   ORDERS / KITCHEN
   ================================================================ */
.kitchen-grid-v14 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.kitchen-ticket {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.kitchen-ticket:hover { box-shadow: var(--shadow); }
.kitchen-ticket.pending { border-top: 3px solid var(--amber); }
.kitchen-ticket.preparing { border-top: 3px solid var(--blue); }
.kitchen-ticket.ready { border-top: 3px solid var(--green); }
.kitchen-ticket.served { border-top: 3px solid var(--muted); opacity: .7; }
.kitchen-ticket.cancelled { border-top: 3px solid var(--red); opacity: .6; }

.ticket-head {
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.ticket-head h2 { font-size: 15px; font-weight: 800; color: var(--ink); }
.ticket-head p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ticket-items { padding: 12px 16px; }
.kitem {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.kitem:last-child { border-bottom: none; }
.kitem small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.kitem b { color: var(--accent); }
.ticket-note {
  margin: 0 16px 12px;
  padding: 8px 10px;
  background: var(--amber-bg);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--amber-text);
}
.ticket-total {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface2);
  font-size: 12.5px;
  color: var(--muted);
}
.ticket-total strong { font-size: 15px; font-weight: 800; color: var(--ink); }
.ticket-actions {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
}
.ticket-actions button {
  flex: 1;
  min-width: 60px;
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 8px;
}
.ticket-actions button.danger { background: var(--red); }
.status-badge { display: inline-flex; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-badge.pending { background: var(--amber-bg); color: var(--amber-text); }
.status-badge.preparing { background: var(--blue-bg); color: var(--blue-text); }
.status-badge.ready { background: var(--green-bg); color: var(--green-text); }
.status-badge.served { background: var(--surface2); color: var(--ink2); }
.status-badge.cancelled { background: var(--red-bg); color: var(--red-text); }

.orders-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.order-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); border-left: 4px solid var(--accent); }
.order-card.new { animation: pulseGlow 1s ease-in-out 3; }
.order-items { margin: 10px 0; padding-left: 16px; font-size: 13px; color: var(--ink2); }

/* ================================================================
   CASHIER
   ================================================================ */
.cashier-shell { display: grid; grid-template-columns: 1fr 400px; gap: 20px; align-items: start; }
.cashier-left {}
.payment-box { position: sticky; top: calc(var(--topbar-h) + 16px); }
.cashier-layout { display: grid; grid-template-columns: 1fr 420px; gap: 20px; align-items: start; }

.income-banner {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: var(--radius);
  padding: 22px;
  color: white;
  margin-bottom: 18px;
}
.income-banner small { font-size: 11.5px; opacity: .75; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.income-banner h1 { font-size: 36px; font-weight: 900; margin: 4px 0; letter-spacing: -.04em; }
.income-banner p { opacity: .7; font-size: 13px; }
.method-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.method-pills span { background: rgba(255,255,255,.15); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600; display: flex; gap: 8px; }
.method-pills b { opacity: .9; }

.pay-order-list { display: grid; gap: 8px; margin-bottom: 20px; }
.pay-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all .15s;
}
.pay-card:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.pay-card h3 { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.pay-card small { font-size: 12px; color: var(--muted); }
.pay-card b { font-size: 16px; font-weight: 800; color: var(--red); }
.partial-pill { background: var(--amber-bg); color: var(--amber-text); border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 700; margin-left: 6px; }

.history-list { display: grid; gap: 6px; }
.history-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 13px;
}
.history-row b { color: var(--ink); font-weight: 700; }
.history-row span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

.payment-row { background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 8px; }
.payment-row-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.payment-row-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.payment-row-actions small { color: var(--muted); font-size: 12px; }

.split-summary { background: var(--surface2); border-radius: 10px; padding: 14px; margin: 12px 0; }
.split-summary > div { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 13.5px; color: var(--ink2); border-bottom: 1px solid var(--line); }
.split-summary > div:last-child { border-bottom: none; }
.split-summary b { font-weight: 700; color: var(--ink); }

.pp-lines { display: grid; gap: 4px; margin: 10px 0; background: var(--surface2); border-radius: 8px; padding: 10px; }
.pp-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink2); }
.pp-line b { font-weight: 600; }

.empty-pay { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* ================================================================
   CUSTOMER MENU PAGE
   ================================================================ */
.customer-shell { max-width: 820px; margin: 0 auto; padding-bottom: 100px; }
.customer-head {
  background: linear-gradient(155deg, var(--primary), var(--primary2));
  color: white;
  padding: 28px 20px 40px;
  border-radius: 0 0 36px 36px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  position: relative;
  overflow: hidden;
}
.customer-head::after {
  content: '';
  position: absolute;
  right: -50px; bottom: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
}
.customer-head .brand { display: flex; align-items: center; gap: 12px; }
.customer-head .logo {
  width: 48px; height: 48px; border-radius: 14px;
  background: rgba(255,255,255,.2);
  display: grid; place-items: center;
  font-size: 22px; color: white;
  backdrop-filter: blur(10px);
}
.customer-head b { font-size: 17px; font-weight: 800; }
.customer-head small { font-size: 12px; opacity: .75; }
.customer-head h1 { margin: 16px 0 4px; font-size: 22px; font-weight: 800; }
.customer-head p { opacity: .8; font-size: 13.5px; }

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  background: rgba(245,245,247,.9);
  backdrop-filter: blur(12px);
  z-index: 10;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }
.category-tabs a {
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  box-shadow: var(--shadow-sm);
  transition: all .15s;
}
.category-tabs a:hover, .category-tabs a.active {
  background: var(--primary);
  color: white;
  border-color: transparent;
}

.menu-section { padding: 0 16px 8px; }
.menu-section h2 { font-size: 16px; font-weight: 800; margin: 20px 0 10px; letter-spacing: -.02em; }
.menu-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 10px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.menu-card.has-img { grid-template-columns: 88px 1fr auto; }
.menu-img { width: 88px; height: 88px; border-radius: 12px; object-fit: cover; box-shadow: var(--shadow-sm); background: var(--surface2); }
.menu-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.menu-card p { font-size: 12.5px; color: var(--muted); }
.price { font-size: 17px; font-weight: 800; color: var(--primary); margin-top: 6px; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-glow);
  font-size: 17px;
  font-weight: 700;
  padding: 0;
  display: grid; place-items: center;
  box-shadow: none;
  transform: none;
}
.qty button:hover { background: var(--accent); color: white; transform: none; box-shadow: none; }
.item-body .input { margin-top: 8px; padding: 8px 10px; font-size: 12.5px; }
.item-actions { display: grid; gap: 8px; align-content: start; }
.item-actions > button {
  padding: 8px 12px;
  font-size: 12.5px;
  border-radius: 9px;
  white-space: nowrap;
}

.cartbar {
  position: fixed;
  left: 50%; bottom: 16px;
  transform: translateX(-50%);
  width: min(780px, 92vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  color: white;
  padding: 14px 20px;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,.25);
  z-index: 50;
  cursor: pointer;
}
.cartbar span { font-size: 13px; font-weight: 600; opacity: .7; }
.cartbar b { font-size: 14px; font-weight: 700; }

.cart-panel {
  position: fixed;
  inset: auto 0 0 0;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  padding: 24px;
  box-shadow: 0 -20px 60px rgba(0,0,0,.18);
  z-index: 80;
  max-height: 84vh;
  overflow: auto;
  display: none;
}
.cart-panel.show { display: block; animation: slideUp .22s ease; }
.cart-panel h2 { font-size: 18px; font-weight: 800; margin-bottom: 16px; }

.lang-switch { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 8px; }
.lang-switch a {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
}
.lang-switch a.active { background: white; color: var(--primary); }

/* ================================================================
   LANDING PAGE
   ================================================================ */
.landing-page {
  min-height: 100vh;
  background: var(--sidebar-bg);
  color: white;
}
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--sidebar-border);
}
.landing-logo { display: flex; align-items: center; gap: 10px; }
.landing-logo .icon { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: grid; place-items: center; font-size: 18px; box-shadow: var(--shadow-accent); }
.landing-logo strong { font-size: 15px; font-weight: 700; color: white; }
.landing-logo small { display: block; color: var(--sidebar-text); font-size: 11px; }
.landing-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 80px 40px 60px;
  max-width: 1200px;
  margin: 0 auto;
}
.landing-hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.05em;
  color: white;
  margin-bottom: 16px;
}
.landing-hero h1 span { color: var(--accent2); }
.landing-hero p { color: rgba(255,255,255,.6); font-size: 16px; line-height: 1.6; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art {
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  min-height: 340px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-art-glow {
  position: absolute;
  top: 30px; left: 50%;
  transform: translateX(-50%);
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(91,79,255,.4), transparent 70%);
  filter: blur(20px);
}
.hero-art-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  font-size: 72px;
  opacity: .9;
}
.hero-art-label {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 14px 16px;
  color: white;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .04em;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero-art-label small { display: block; color: rgba(255,255,255,.5); font-size: 12px; font-weight: 500; letter-spacing: .02em; margin-top: 2px; }

.landing-flow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.landing-flow span {
  background: rgba(91,79,255,.15);
  border: 1px solid rgba(91,79,255,.3);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(255,255,255,.8);
}
.landing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  padding: 0 40px 60px;
  max-width: 1200px;
  margin: 0 auto;
}
.mini-feature {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 20px;
}
.mini-feature b { display: block; font-size: 15px; color: white; margin-bottom: 6px; font-weight: 700; }
.mini-feature span { font-size: 13.5px; color: rgba(255,255,255,.5); }
.mini-feature a { color: var(--accent2); font-weight: 600; }

/* ================================================================
   PLATFORM PAGE
   ================================================================ */
.platform-shell { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }

/* ================================================================
   QR CARDS / TABLES
   ================================================================ */
.qr-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.table-qr-card { text-align: center; }
.qr { background: white; padding: 14px; border-radius: var(--radius); display: inline-block; border: 1px solid var(--line); }
.qr img { display: block; width: 140px; height: 140px; }
.qr.big { padding: 18px; }
.qr-card-top { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 14px; }
.qr-card-top h3 { font-size: 15px; font-weight: 800; color: var(--ink); margin: 0; text-align: left; }
.qr-card-top span { font-size: 13px; color: var(--muted); }
.amharic-line { color: var(--muted); font-size: 13px; }
.qr-link { word-break: break-all; }
.no-print .btn { margin: 3px; }

/* ================================================================
   SETUP STEPS
   ================================================================ */
.setup-steps { display: grid; gap: 12px; }
.setup-steps > div { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; }
.setup-steps b { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: white; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }

/* ================================================================
   THEME PREVIEW
   ================================================================ */
.theme-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; margin-top: 8px; }
.theme-pill { background: var(--surface2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font-size: 12.5px; font-weight: 600; }
.theme-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); vertical-align: middle; margin-right: 5px; }

/* ================================================================
   NOTIFICATIONS
   ================================================================ */
.global-notify { position: fixed; right: 18px; top: 76px; z-index: 999; display: grid; gap: 10px; width: min(360px, 92vw); pointer-events: none; }
.notify-toast {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  padding: 14px 44px 14px 14px;
  color: var(--ink);
  position: relative;
  animation: slideInRight .22s ease;
  pointer-events: all;
}
.notify-toast b { display: block; font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.notify-toast span { display: block; color: var(--muted); font-size: 12.5px; }
.notify-toast a { display: inline-flex; margin-top: 8px; background: var(--accent); color: white; padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; box-shadow: none; transform: none; }
.notify-toast a:hover { filter: brightness(1.1); }
.notify-toast.cashier { border-left: 4px solid var(--amber); }
.notify-toast.payment { border-left: 4px solid var(--green); }
.notify-toast.new     { border-left: 4px solid var(--accent); }
.nt-close { position: absolute; right: 10px; top: 10px; width: 24px; height: 24px; padding: 0; border-radius: 50%; background: var(--surface2); color: var(--muted); font-size: 14px; display: grid; place-items: center; box-shadow: none; }
.nt-close:hover { background: var(--line); transform: none; }

.global-sound-btn {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 998;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
}
.popup {
  position: fixed;
  right: 20px; top: 76px;
  background: var(--ink);
  color: white;
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: none;
  max-width: 300px;
  font-size: 13.5px;
}
.popup.show { display: block; animation: slideInRight .22s ease; }

/* ================================================================
   REPORTS
   ================================================================ */
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 20px 0 12px; }
.section-title h2 { font-size: 15px; font-weight: 700; color: var(--ink); }

/* ================================================================
   MISC / COMPAT
   ================================================================ */
.hero { padding: 0; }
.hero-panel { padding: 24px; margin-bottom: 18px; }
.hero-panel h1 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.hero-panel p { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }
.hero-panel .btn { margin-right: 8px; margin-bottom: 8px; }
.dark-card { background: linear-gradient(135deg, var(--ink), #1e1e2e); color: white; }
.dark-card h1 { color: white; font-size: 20px; }
.dark-card p { color: rgba(255,255,255,.65); font-size: 13.5px; margin-top: 4px; }
.live-pill { background: rgba(22,163,74,.15); color: #4ade80; border: 1px solid rgba(74,222,128,.2); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.live-pill::before { content: ''; width: 6px; height: 6px; background: #4ade80; border-radius: 50%; animation: pulse 1.4s infinite; }

.cashier-history { display: grid; gap: 8px; margin-top: 14px; }
.remaining-box { background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 10px 0; font-weight: 700; }
.paid-summary { color: var(--green); }
.remaining-summary { color: var(--amber); }

.table-responsive { overflow-x: auto; }
.inline-form { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.inline-form select { width: auto; }
.small-date { width: 150px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.form-grid.compact { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

.container { width: min(1180px, 94vw); margin: auto; }

/* nav compat for old topbar */
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; }
.nav a:hover, .nav a.active { background: var(--accent-soft); color: var(--accent); }

/* old topbar compat (still used in admin_header shell) */
.topbar-inner { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.topbar small { color: var(--muted); }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 42px; height: 42px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: grid; place-items: center; color: white; font-size: 20px; box-shadow: var(--shadow-accent); }

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes pulseGlow { 0%,100% { box-shadow: var(--shadow-sm); } 50% { box-shadow: 0 0 0 4px var(--accent-glow), var(--shadow); } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes pop { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes steam { 50% { transform: translateY(-8px); opacity: .5; } }

/* ================================================================
   PRINT STYLES
   ================================================================ */
@media print {
  .sidebar, .topbar, .admin-card-actions, .no-print, .cartbar, .cart-panel, .global-notify, .global-sound-btn { display: none !important; }
  .main-content { margin-left: 0; }
  .qr-card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 220px; }
  .admin-menu-layout { grid-template-columns: 1fr; }
  .cashier-shell, .cashier-layout { grid-template-columns: 1fr; }
  .platform-shell { grid-template-columns: 1fr; }
  .payment-box { position: static; }
  .compact-panel { position: static; }
  .menu-admin-list { grid-template-columns: 1fr; }
  .landing-hero { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .page, .layout { padding: 16px; }
  .landing-nav { padding: 16px 20px; }
  .landing-hero { padding: 40px 20px; }
  .landing-cards { padding: 0 20px 40px; }
  .form-row, .admin-form-grid.two, .admin-form-grid.three { grid-template-columns: 1fr; }
  .admin-table thead { display: none; }
  .admin-table tr { display: block; margin-bottom: 10px; background: var(--surface); border-radius: var(--radius-sm); border: 1px solid var(--line); overflow: hidden; }
  .admin-table td { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
  .admin-table td:last-child { border-bottom: none; }
  .cashier-shell, .cashier-layout { grid-template-columns: 1fr; }
  .kitchen-grid-v14 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; }
  .topbar { flex-wrap: wrap; height: auto; padding: 12px 16px; gap: 10px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .menu-admin-list { grid-template-columns: 1fr; }
  .qr-card-grid { grid-template-columns: 1fr; }
}
