/* ============================================================
   SilaOrder — Restaurant Revenue Operating System
   Design system · v3 multi-branch
   ============================================================ */

:root {
  --brand-900: #052e26;
  --brand-800: #064e40;
  --brand-700: #0a6b56;
  --brand-600: #0d8266;
  --brand-500: #109a78;
  --brand-100: #d2f2e8;
  --brand-50:  #ecfaf5;

  --amber-500: #f59e0b;
  --amber-100: #fef3c7;
  --red-500: #ef4444;
  --red-100: #fee2e2;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --violet-500: #8b5cf6;
  --violet-100: #ede9fe;
  --teal-500: #14b8a6;
  --teal-100: #ccfbf1;
  --green-600: #16a34a;
  --green-100: #dcfce7;

  --ink-900: #0f1e1a;
  --ink-700: #33433e;
  --ink-500: #5f6f6a;
  --ink-400: #8a9994;
  --ink-200: #dbe4e1;
  --ink-100: #eef2f1;

  --bg: #f3f6f5;
  --card: #ffffff;
  --sidebar-w: 264px;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(10, 40, 30, .04), 0 4px 16px rgba(10, 40, 30, .06);
  --shadow-lg: 0 8px 40px rgba(5, 40, 30, .16);

  --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink-900);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.015em; }

/* ---------- App shell ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #062e26 0%, #05201b 100%);
  color: #cfe3dd;
  position: fixed; inset: 0 auto 0 0;
  display: flex; flex-direction: column;
  z-index: 50;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}

.sidebar .brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 22px 18px;
}
.brand-badge {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  display: grid; place-items: center; font-size: 21px;
  box-shadow: 0 4px 14px rgba(16, 154, 120, .35);
}
.brand-name { font-size: 17px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.brand-sub { font-size: 10.5px; color: #7fa79d; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; }

.nav-scroll { flex: 1; overflow-y: auto; padding: 6px 14px 20px; }
.nav-scroll::-webkit-scrollbar { width: 4px; }
.nav-scroll::-webkit-scrollbar-thumb { background: #14453a; border-radius: 4px; }

.nav-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em;
  color: #5d857a; font-weight: 700; margin: 18px 10px 6px;
}

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 10px;
  color: #b9d4cc; font-weight: 600; font-size: 13.5px;
  margin-bottom: 2px; transition: background .15s, color .15s;
}
.nav-item .ico { width: 21px; text-align: center; font-size: 15px; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(16,154,120,.28), rgba(16,154,120,.10));
  color: #fff; box-shadow: inset 3px 0 0 var(--brand-500);
}

.sidebar-foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.07); }

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

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 28px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ink-200);
  position: sticky; top: 0; z-index: 40;
}
.topbar h1 { font-size: 19px; }
.topbar .crumb { color: var(--ink-400); font-size: 12.5px; font-weight: 600; }

.burger {
  display: none; border: 1px solid var(--ink-200); background: #fff;
  border-radius: 9px; width: 38px; height: 38px; cursor: pointer; font-size: 16px;
}

.content { padding: 26px 28px 60px; max-width: 1440px; width: 100%; }

/* ---------- Cards & stats ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid rgba(15,60,48,.05);
  padding: 20px 22px;
}
.card + .card { margin-top: 18px; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.card-sub { color: var(--ink-400); font-size: 12.5px; font-weight: 500; }

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid.cols-6 { grid-template-columns: repeat(6, 1fr); }

.stat {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid rgba(15,60,48,.05);
  padding: 18px 20px; position: relative; overflow: hidden;
}
.stat .s-label { font-size: 12px; color: var(--ink-500); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.stat .s-value { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; }
.stat .s-note { font-size: 12px; color: var(--ink-400); margin-top: 3px; font-weight: 600; }
.stat .s-ico {
  position: absolute; right: 14px; top: 14px;
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; font-size: 19px;
  background: var(--brand-50);
}
.stat.accent { background: linear-gradient(135deg, var(--brand-700), var(--brand-800)); color: #fff; border: 0; }
.stat.accent .s-label { color: #9fd8c8; }
.stat.accent .s-note { color: #8fd0be; }
.stat.accent .s-ico { background: rgba(255,255,255,.14); }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.tbl th {
  text-align: left; padding: 9px 12px; color: var(--ink-500);
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em;
  border-bottom: 1.5px solid var(--ink-200); white-space: nowrap;
}
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--ink-100); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: #fafcfb; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl th.num { text-align: right; }

/* ---------- Badges & pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px;
  white-space: nowrap;
}
.badge.gray   { background: var(--ink-100);   color: var(--ink-500); }
.badge.green  { background: var(--green-100); color: var(--green-600); }
.badge.amber  { background: var(--amber-100); color: #b45309; }
.badge.red    { background: var(--red-100);   color: #b91c1c; }
.badge.blue   { background: var(--blue-100);  color: #1d4ed8; }
.badge.violet { background: var(--violet-100);color: #6d28d9; }
.badge.teal   { background: var(--teal-100);  color: #0f766e; }
.badge.brand  { background: var(--brand-100); color: var(--brand-700); }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 700; font-size: 13.5px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: all .15s;
  text-decoration: none; white-space: nowrap;
}
.btn.primary { background: var(--brand-600); color: #fff; box-shadow: 0 2px 8px rgba(13,130,102,.3); }
.btn.primary:hover { background: var(--brand-700); color: #fff; }
.btn.ghost { background: #fff; border-color: var(--ink-200); color: var(--ink-700); }
.btn.ghost:hover { border-color: var(--brand-500); color: var(--brand-600); }
.btn.danger { background: var(--red-100); color: #b91c1c; }
.btn.danger:hover { background: #fecaca; }
.btn.amber { background: var(--amber-100); color: #92400e; }
.btn.soft { background: var(--brand-50); color: var(--brand-700); }
.btn.soft:hover { background: var(--brand-100); }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { padding: 13px 24px; font-size: 15px; border-radius: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Forms ---------- */
label.lbl { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-700); margin: 0 0 5px; }
.input, .select, textarea.input {
  width: 100%; font-family: var(--font); font-size: 14px;
  padding: 9px 13px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--ink-200); background: #fff; color: var(--ink-900);
  transition: border .15s, box-shadow .15s;
}
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(16,154,120,.14);
}
.field { margin-bottom: 14px; }
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }
.err { color: #b91c1c; font-size: 12.5px; margin-top: 4px; font-weight: 600; }

.check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; font-weight: 600; color: var(--ink-700); }
.check input { width: 16px; height: 16px; accent-color: var(--brand-600); }

/* ---------- Chips / filter bar ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 6px 14px; border-radius: 99px; font-size: 12.5px; font-weight: 700;
  background: #fff; border: 1.5px solid var(--ink-200); color: var(--ink-500);
  cursor: pointer; transition: all .15s; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--brand-500); color: var(--brand-600); }
.chip.on { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }

.filterbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.filterbar .field { margin: 0; min-width: 150px; }

/* ---------- Modal ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(6, 30, 24, .5);
  backdrop-filter: blur(3px); z-index: 90;
  display: none; align-items: flex-start; justify-content: center;
  padding: 6vh 16px; overflow-y: auto;
}
.modal-back.open { display: flex; }
.modal {
  background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px; padding: 26px;
  animation: pop .22s cubic-bezier(.34,1.4,.64,1);
}
.modal.wide { max-width: 780px; }
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.modal h3 { font-size: 17px; margin-bottom: 16px; }

/* ---------- Toast ---------- */
.toast-zone { position: fixed; right: 20px; top: 20px; z-index: 120; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--ink-900); color: #fff; font-weight: 600; font-size: 13.5px;
  padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg);
  display: flex; gap: 10px; align-items: center; max-width: 380px;
  animation: slidein .3s cubic-bezier(.34,1.3,.64,1);
}
.toast.ok { background: var(--brand-700); }
.toast.error { background: #b91c1c; }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }

/* ---------- Charts ---------- */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 8px; }
.bars .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bars .bar {
  width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-700));
  transition: height .5s cubic-bezier(.34,1,.64,1); position: relative; min-height: 3px;
}
.bars .bar.amber { background: linear-gradient(180deg, #fbbf24, #d97706); }
.bars .bar-lbl { font-size: 11px; font-weight: 700; color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bars .bar-val { font-size: 10.5px; font-weight: 800; color: var(--ink-700); font-variant-numeric: tabular-nums; }

.spark { width: 100%; height: 120px; }

.hbar { margin-bottom: 12px; }
.hbar .hb-top { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; margin-bottom: 4px; }
.hbar .hb-track { height: 9px; background: var(--ink-100); border-radius: 99px; overflow: hidden; }
.hbar .hb-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-500), var(--brand-600)); }

/* ---------- Rank list ---------- */
.rank { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ink-100); }
.rank:last-child { border-bottom: 0; }
.rank .rk-no {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
  background: var(--ink-100); color: var(--ink-500);
}
.rank:nth-child(1) .rk-no { background: linear-gradient(135deg,#fde68a,#f59e0b); color: #78350f; }
.rank:nth-child(2) .rk-no { background: #e5e7eb; color: #374151; }
.rank:nth-child(3) .rk-no { background: #fed7aa; color: #9a3412; }

/* ---------- Avatar ---------- */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-100), var(--brand-50));
  color: var(--brand-700); font-weight: 800; font-size: 13px;
  display: inline-grid; place-items: center; flex: 0 0 auto;
}

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 44px 20px; color: var(--ink-400); }
.empty .e-ico { font-size: 40px; margin-bottom: 10px; }
.empty .e-title { font-weight: 800; font-size: 15px; color: var(--ink-500); }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; border: 1px solid var(--ink-200);
  background: #fff; color: var(--ink-700);
}
.pagination .active span { background: var(--brand-700); color: #fff; border-color: var(--brand-700); }
.pagination a:hover { border-color: var(--brand-500); }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: flex; }
.auth-hero {
  flex: 1.1; background:
    radial-gradient(1200px 700px at 85% -10%, rgba(16,154,120,.5), transparent 55%),
    radial-gradient(900px 500px at -10% 110%, rgba(245,158,11,.25), transparent 50%),
    linear-gradient(160deg, #04231d, #062e26 55%, #05201b);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-hero h2 { font-size: 34px; line-height: 1.2; letter-spacing: -.03em; max-width: 480px; }
.auth-hero .feat { display: flex; gap: 10px; align-items: center; margin-top: 14px; color: #bfe0d6; font-weight: 600; font-size: 14px; }
.auth-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; }

.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-btn {
  text-align: left; padding: 9px 12px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--ink-200); background: #fff; font-family: var(--font);
  transition: all .15s;
}
.demo-btn:hover { border-color: var(--brand-500); background: var(--brand-50); }
.demo-btn .d-role { font-size: 12.5px; font-weight: 800; color: var(--ink-900); }
.demo-btn .d-mail { font-size: 11px; color: var(--ink-400); }

/* ---------- Kitchen board ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.kanban .kol { background: var(--ink-100); border-radius: var(--radius); padding: 12px; }
.kanban .kol-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 13.5px; padding: 4px 6px 10px; }
.ticket { background: #fff; border-radius: 13px; box-shadow: var(--shadow); padding: 14px; margin-bottom: 10px; }
.ticket .t-no { font-weight: 800; font-size: 15px; }
.ticket .t-meta { font-size: 11.5px; color: var(--ink-400); font-weight: 600; }
.ticket ul { list-style: none; margin: 8px 0; }
.ticket li { padding: 3px 0; font-size: 13px; font-weight: 600; display: flex; gap: 8px; }
.ticket li .q { color: var(--brand-600); font-weight: 800; min-width: 26px; }
.ticket .t-age { font-size: 11px; font-weight: 800; }

/* ---------- POS ---------- */
.pos-grid { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
.pos-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pos-item {
  background: #fff; border: 1.5px solid var(--ink-200); border-radius: 14px;
  padding: 12px; cursor: pointer; transition: all .12s; text-align: left; font-family: var(--font);
}
.pos-item:hover { border-color: var(--brand-500); box-shadow: var(--shadow); transform: translateY(-1px); }
.pos-item .pi-emoji { font-size: 26px; }
.pos-item .pi-name { font-weight: 700; font-size: 12.8px; margin-top: 6px; line-height: 1.3; }
.pos-item .pi-price { color: var(--brand-600); font-weight: 800; font-size: 13px; margin-top: 3px; }
.pos-cart { position: sticky; top: 84px; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--ink-100); }
.cart-line .cl-name { flex: 1; font-weight: 700; font-size: 13px; }
.qty-btn {
  width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--ink-200);
  background: #fff; font-weight: 800; cursor: pointer; font-size: 14px; line-height: 1;
}
.qty-btn:hover { border-color: var(--brand-500); color: var(--brand-600); }

/* ---------- Terminal (kiosk) ---------- */
.kiosk {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(16,154,120,.35), transparent 55%),
    linear-gradient(160deg, #04231d, #062e26 60%, #05201b);
  padding: 24px;
}
.kiosk-card { background: #fff; border-radius: 26px; box-shadow: var(--shadow-lg); width: 100%; max-width: 420px; padding: 30px; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.pinpad button {
  height: 62px; border-radius: 16px; font-size: 22px; font-weight: 800;
  border: 1.5px solid var(--ink-200); background: #fff; cursor: pointer;
  font-family: var(--font); transition: all .1s;
}
.pinpad button:hover { background: var(--brand-50); border-color: var(--brand-500); }
.pin-dots { display: flex; gap: 12px; justify-content: center; margin: 18px 0 4px; min-height: 16px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; background: var(--ink-200); }
.pin-dots span.full { background: var(--brand-600); }

.scan-result { text-align: center; padding: 10px 0; }
.scan-result .sr-ico { font-size: 52px; }
.scan-result .sr-name { font-size: 20px; font-weight: 800; margin-top: 8px; }
.scan-result .sr-type { font-size: 14px; font-weight: 700; margin-top: 2px; }

/* ---------- Public ordering ---------- */
.pub-wrap { max-width: 560px; margin: 0 auto; min-height: 100vh; background: #fff; box-shadow: 0 0 60px rgba(0,0,0,.07); position: relative; }
.pub-hero {
  background: linear-gradient(150deg, var(--brand-700), var(--brand-900));
  color: #fff; padding: 26px 22px 22px; border-radius: 0 0 26px 26px;
}
.pub-hero h1 { font-size: 22px; }
.pub-cats {
  display: flex; gap: 8px; overflow-x: auto; padding: 14px 18px;
  position: sticky; top: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  z-index: 30; scrollbar-width: none;
}
.pub-cats::-webkit-scrollbar { display: none; }
.menu-item {
  display: flex; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--ink-100);
  align-items: center;
}
.menu-item .mi-emoji {
  width: 58px; height: 58px; border-radius: 15px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand-50), var(--brand-100));
  display: grid; place-items: center; font-size: 28px;
}
.menu-item .mi-name { font-weight: 800; font-size: 14.5px; }
.menu-item .mi-desc { font-size: 12px; color: var(--ink-400); margin-top: 2px; }
.menu-item .mi-price { color: var(--brand-700); font-weight: 800; margin-top: 4px; font-size: 14px; }
.add-btn {
  width: 38px; height: 38px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--brand-600); color: #fff; font-size: 20px; font-weight: 800;
  box-shadow: 0 3px 10px rgba(13,130,102,.35); flex: 0 0 auto;
}
.cart-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 560px; z-index: 60;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--ink-200);
}

/* ---------- Chat simulator ---------- */
.phone {
  width: 100%; max-width: 380px; background: #0b141a; border-radius: 30px;
  padding: 14px; box-shadow: var(--shadow-lg);
}
.phone-screen { background: #0f1c24 url('') center/cover; border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; height: 600px; }
.wa-head { background: #1f2c34; color: #e9edef; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.wa-body { flex: 1; overflow-y: auto; padding: 14px 12px; background: #0b141a; display: flex; flex-direction: column; gap: 8px; }
.wa-msg { max-width: 82%; padding: 8px 12px; border-radius: 12px; font-size: 13px; white-space: pre-wrap; line-height: 1.45; }
.wa-msg.in { background: #1f2c34; color: #e9edef; align-self: flex-start; border-top-left-radius: 3px; }
.wa-msg.out { background: #005c4b; color: #e7f5ef; align-self: flex-end; border-top-right-radius: 3px; }
.wa-foot { display: flex; gap: 8px; padding: 10px; background: #1f2c34; }
.wa-foot input {
  flex: 1; border: 0; border-radius: 99px; padding: 10px 16px;
  background: #2a3942; color: #e9edef; font-family: var(--font); font-size: 13.5px;
}
.wa-foot input:focus { outline: none; }

/* ---------- Receipt ---------- */
.receipt {
  max-width: 380px; margin: 30px auto; background: #fff; padding: 26px;
  font-family: 'Consolas', 'Courier New', monospace; font-size: 12.5px;
  box-shadow: var(--shadow); border-radius: 6px;
}
.receipt hr { border: 0; border-top: 1.5px dashed #bbb; margin: 10px 0; }
.receipt .r-row { display: flex; justify-content: space-between; padding: 1.5px 0; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--ink-200); }
.timeline li { position: relative; padding: 0 0 14px; }
.timeline li::before {
  content: ''; position: absolute; left: -24px; top: 5px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand-500); border: 2.5px solid #fff; box-shadow: 0 0 0 2px var(--brand-100);
}

/* ---------- Utilities ---------- */
.flex { display: flex; } .aic { align-items: center; } .jcb { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.muted { color: var(--ink-400); } .small { font-size: 12px; } .bold { font-weight: 800; }
.right { text-align: right; } .center { text-align: center; }
.brand-txt { color: var(--brand-600); }
.wrap-anywhere { overflow-wrap: anywhere; }
.money { font-variant-numeric: tabular-nums; font-weight: 800; }

/* ---------- Print ---------- */
@media print {
  .sidebar, .topbar, .no-print, .toast-zone { display: none !important; }
  .main { margin: 0 !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid.cols-4, .grid.cols-5, .grid.cols-6 { grid-template-columns: repeat(3, 1fr); }
  .pos-grid { grid-template-columns: 1fr; }
  .pos-cart { position: static; }
  .kanban { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: 30px 0 80px rgba(0,0,0,.35); }
  .main { margin-left: 0; }
  .burger { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar-back { position: fixed; inset: 0; background: rgba(6,30,24,.5); z-index: 45; display: none; }
  .sidebar-back.open { display: block; }
}

@media (max-width: 760px) {
  .content { padding: 18px 14px 80px; }
  .topbar { padding: 12px 14px; }
  .topbar h1 { font-size: 16.5px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid.cols-5, .grid.cols-6 { grid-template-columns: repeat(2, 1fr); }
  .auth-hero { display: none; }
  .stat .s-value { font-size: 21px; }
  .form-row { flex-direction: column; gap: 0; }
  .filterbar .field { min-width: calc(50% - 5px); }
  .bars { gap: 5px; height: 130px; }
  .demo-grid { grid-template-columns: 1fr; }
  .modal { padding: 20px; }
}

@media (max-width: 420px) {
  .grid.cols-4, .grid.cols-5, .grid.cols-6 { grid-template-columns: repeat(2, 1fr); }
}
