/* RIMS — black sidebar, white cards, one accent colour (set per restaurant as --accent). Works with no internet. */
:root {
  --accent: #c2410c;
  --accent-ink: #fff;
  --ink: #18181b;
  --muted: #71717a;
  --line: #e4e4e7;
  --paper: #f4f4f5;
  --card: #ffffff;
  --side: #0c0c0d;
  --side-ink: #d4d4d8;
  --side-active: #1f1f22;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { background: var(--paper); color: var(--ink); font-family: var(--font); }
body { font-size: .95rem; }
a { color: var(--accent); }
.text-muted, .muted { color: var(--muted) !important; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-accent:hover, .btn-accent:focus { background: color-mix(in srgb, var(--accent) 85%, #000); border-color: transparent; color: var(--accent-ink); }
.btn-outline-accent { color: var(--accent); border-color: var(--accent); }
.btn-outline-accent:hover { background: var(--accent); color: var(--accent-ink); }
.text-accent { color: var(--accent) !important; }
.bg-accent { background: var(--accent) !important; color: var(--accent-ink) !important; }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--accent) 22%, transparent); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }

/* ---------- staff app shell ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 240px; flex: 0 0 240px; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column;
        position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { display: flex; gap: .6rem; align-items: center; padding: 1rem 1rem .8rem; color: #fff; text-decoration: none; }
.side .brand img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: #fff; }
.side .brand .mark { width: 36px; height: 36px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; font-weight: 700; }
.side .brand b { display: block; line-height: 1.15; font-size: .95rem; }
.side .brand small { color: #8b8b93; font-size: .72rem; }
.side .grp { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #6b6b73; padding: .9rem 1rem .3rem; }
.side a.nl { display: flex; align-items: center; gap: .65rem; padding: .48rem 1rem; color: var(--side-ink); text-decoration: none; border-left: 3px solid transparent; }
.side a.nl:hover { background: var(--side-active); color: #fff; }
.side a.nl.on { background: var(--side-active); color: #fff; border-left-color: var(--accent); }
.side a.nl .bi { font-size: 1.05rem; opacity: .9; }
.side a.nl .pill { margin-left: auto; background: var(--accent); color: #fff; border-radius: 999px; padding: 0 .45rem; font-size: .7rem; }
.side .foot { margin-top: auto; padding: .8rem 1rem; font-size: .72rem; color: #6b6b73; border-top: 1px solid #1f1f22; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { background: var(--card); border-bottom: 1px solid var(--line); padding: .55rem 1.25rem; display: flex; gap: .75rem; align-items: center;
       position: sticky; top: 0; z-index: 20; }
.top .who { margin-left: auto; display: flex; gap: .75rem; align-items: center; font-size: .85rem; }
.top .menu-btn { display: none; }
.content { padding: 1.25rem; max-width: 1400px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.35rem; margin: 0; font-weight: 650; }
.page-head .acts { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: none; }
.card-h { padding: .8rem 1rem; border-bottom: 1px solid var(--line); font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.card-b { padding: 1rem; }
.stat { padding: 1rem; }
.stat .k { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat .v { font-size: 1.6rem; font-weight: 700; }
.table { --bs-table-bg: transparent; margin: 0; }
.table > :not(caption) > * > * { padding: .55rem .75rem; }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; border-bottom-width: 1px; }
.table-hover tbody tr:hover > * { background: #fafafa; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.banner { padding: .55rem 1.25rem; font-size: .85rem; }
.banner.trial { background: #eff6ff; color: #1e3a8a; border-bottom: 1px solid #dbeafe; }
.banner.warn { background: #fff7ed; color: #9a3412; border-bottom: 1px solid #fed7aa; }
.banner.cloud { background: #f5f3ff; color: #5b21b6; border-bottom: 1px solid #ede9fe; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .75rem; }
.tile { display: block; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); text-decoration: none; }
.tile:hover { border-color: var(--accent); }
.tile .bi { font-size: 1.4rem; color: var(--accent); }
.tile b { display: block; margin-top: .35rem; }
.tile small { color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: .5rem; height: 140px; }
.bars .b { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .25rem; font-size: .7rem; color: var(--muted); }
.bars .b .col { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.bars .b i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
@media (max-width: 900px) {
  .side { position: fixed; left: -260px; z-index: 50; transition: left .2s; }
  .side.open { left: 0; }
  .top .menu-btn { display: inline-block; }
  .content { padding: 1rem; }
}

/* ---------- order entry / cashier ---------- */
.pos { display: grid; grid-template-columns: 1fr 380px; gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .pos { grid-template-columns: 1fr; } }
.cats { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .75rem; }
.cats button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; }
.cats button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.prod { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: .7rem; text-align: left; min-height: 86px; }
.prod:hover { border-color: var(--accent); }
.prod b { display: block; font-size: .9rem; line-height: 1.2; }
.prod span { font-size: .78rem; color: var(--muted); }
.prod.off { opacity: .45; pointer-events: none; }
.ticket { position: sticky; top: 70px; }
.ticket .line { display: flex; gap: .5rem; align-items: center; padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.ticket .line .n { flex: 1; font-size: .88rem; }
.ticket .line .n small { display: block; color: var(--muted); }
.ticket .q { display: flex; align-items: center; gap: .25rem; }
.ticket .q button { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line); background: #fff; line-height: 1; }
.ticket .tot { font-size: 1.25rem; font-weight: 700; }

/* ---------- kitchen display ---------- */
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.kds .k { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); border-top: 5px solid #a1a1aa; }
.kds .k.pending, .kds .k.accepted { border-top-color: #f59e0b; }
.kds .k.preparing { border-top-color: #2563eb; }
.kds .k.ready { border-top-color: #16a34a; }
.kds .k.late { box-shadow: 0 0 0 2px #dc2626 inset; }
.kds .kh { padding: .6rem .8rem; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.kds .ki { padding: .45rem .8rem; display: flex; gap: .5rem; align-items: center; border-bottom: 1px dashed var(--line); cursor: pointer; }
.kds .ki.ready { text-decoration: line-through; color: var(--muted); }
.kds .ki.preparing b { color: #2563eb; }

/* ---------- receipts (80 mm) ---------- */
.receipt { width: 76mm; margin: 0 auto; font: 12px/1.35 ui-monospace, "Courier New", monospace; color: #000; background: #fff; padding: 4mm; }
.receipt h2 { font-size: 15px; text-align: center; margin: 0; }
.receipt .c { text-align: center; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { padding: 1px 0; vertical-align: top; }
.receipt .r { text-align: right; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: 4px 0; }
@media print {
  .no-print, .side, .top, .banner { display: none !important; }
  body, html { background: #fff; }
  .content { padding: 0; }
  .card { border: 0; }
}

/* ---------- public restaurant site ---------- */
.pub-hero { background: var(--ink); color: #fff; padding: 3rem 0 2.5rem; background-size: cover; background-position: center; position: relative; }
.pub-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.75)); }
.pub-hero > * { position: relative; }
.pub-hero img.logo { width: 76px; height: 76px; border-radius: 16px; object-fit: cover; background: #fff; }
.pub-nav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.menu-item { display: flex; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.menu-item img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; flex: 0 0 84px; }
.menu-item .info { flex: 1; min-width: 0; }
.menu-item .info p { color: var(--muted); font-size: .85rem; margin: .15rem 0 .4rem; }
.price-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .2rem .7rem; font-size: .85rem; margin: 0 .3rem .3rem 0; }
.price-btn:hover { border-color: var(--accent); color: var(--accent); }
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--ink); color: #fff; padding: .7rem 1rem; display: none; }
.cart-bar.show { display: block; }
.steps { display: flex; gap: .3rem; }
.steps div { flex: 1; text-align: center; font-size: .75rem; color: var(--muted); }
.steps div i { display: block; height: 6px; border-radius: 3px; background: var(--line); margin-bottom: .35rem; }
.steps div.on { color: var(--ink); font-weight: 600; }
.steps div.on i { background: var(--accent); }

/* ---------- product site & console ---------- */
.hub-nav { background: #fff; border-bottom: 1px solid var(--line); }
.hub-hero { padding: 4.5rem 0 3.5rem; background: radial-gradient(1200px 400px at 80% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent), var(--paper); }
.hub-hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 750; letter-spacing: -.02em; }
.feature .bi { font-size: 1.5rem; color: var(--accent); }
.console .side { background: #111827; }

.m-ticket { display: none; }
@media (max-width: 1000px) {
  .m-ticket { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--ink); color: #fff;
              padding: .65rem 1rem; align-items: center; gap: .75rem; }
  .has-m-ticket { padding-bottom: 4.5rem; }
  .ticket { position: static; }
}
