/* EduSmart Hospitality portal — one stylesheet for landing, auth and workspace */

:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-2: #edf3f1;
  --ink: #10211e;
  --muted: #566864;
  --line: #dbe4e1;
  --brand: #0a6b5b;
  --brand-600: #08594c;
  --brand-ink: #ffffff;
  --brand-soft: #dcf1ec;
  --accent: #d99a1c;
  --accent-soft: #fbf0d6;
  --ok: #0b7a4b;
  --ok-soft: #dcf4e8;
  --warn: #8a5100;
  --warn-soft: #fdf0d5;
  --bad: #b3261e;
  --bad-soft: #fde4e1;
  --info: #1d5fa8;
  --info-soft: #e0edfb;
  --hero-1: #06352d;
  --hero-2: #0a6b5b;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 33, 30, .06), 0 8px 24px rgba(16, 33, 30, .07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1614;
    --surface: #132320;
    --surface-2: #1a2f2b;
    --ink: #e7f1ee;
    --muted: #9bb2ac;
    --line: #25403b;
    --brand: #3cc2a8;
    --brand-600: #5fd4bc;
    --brand-ink: #04211b;
    --brand-soft: #173d36;
    --accent: #f0b73e;
    --accent-soft: #3a2f12;
    --ok: #55d69a;
    --ok-soft: #12362a;
    --warn: #f0b24a;
    --warn-soft: #38290c;
    --bad: #ff8f86;
    --bad-soft: #3d1a17;
    --info: #7db6f2;
    --info-soft: #14304f;
    --hero-1: #04120f;
    --hero-2: #0b3d34;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0c1614;
  --surface: #132320;
  --surface-2: #1a2f2b;
  --ink: #e7f1ee;
  --muted: #9bb2ac;
  --line: #25403b;
  --brand: #3cc2a8;
  --brand-600: #5fd4bc;
  --brand-ink: #04211b;
  --brand-soft: #173d36;
  --accent: #f0b73e;
  --accent-soft: #3a2f12;
  --ok: #55d69a;
  --ok-soft: #12362a;
  --warn: #f0b24a;
  --warn-soft: #38290c;
  --bad: #ff8f86;
  --bad-soft: #3d1a17;
  --info: #7db6f2;
  --info-soft: #14304f;
  --hero-1: #04120f;
  --hero-2: #0b3d34;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
img, svg { max-width: 100%; }
a { color: var(--brand); }
a:hover { color: var(--brand-600); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.i { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.25em; }
.i-lg { width: 1.75em; height: 1.75em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 999px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; background: var(--brand); color: var(--brand-ink); transition: background .15s, transform .05s; }
.btn:hover { background: var(--brand-600); color: var(--brand-ink); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-light { background: #fff; color: #06352d; }
.btn-light:hover { background: #e9f6f2; color: #06352d; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #8f1d17; color: #fff; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .9rem; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------- Landing ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .container { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--hero-2), var(--brand)); display: grid; place-items: center; color: #fff; }
.nav { display: none; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav .btn { color: var(--brand-ink); margin-left: 6px; }
.nav .btn:hover { color: var(--brand-ink); background: var(--brand-600); }
.nav-toggle { margin-left: auto; }
.nav.open { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); padding: 12px var(--gutter) 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.nav.open .btn { margin: 6px 0 0; }
@media (min-width: 860px) { .nav { display: flex; } .nav-toggle { display: none; } }

.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(217, 154, 28, .22), transparent 60%), linear-gradient(160deg, var(--hero-1), var(--hero-2)); color: #fff; padding: 64px 0 72px; overflow: hidden; }
.hero .grid { display: grid; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 800; }
.hero p.lead { font-size: 1.12rem; color: rgba(255, 255, 255, .86); max-width: 56ch; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #ffe2a3; background: rgba(255, 255, 255, .1); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-note { margin-top: 16px; font-size: .9rem; color: rgba(255, 255, 255, .72); }
@media (min-width: 900px) { .hero .grid { grid-template-columns: 1.1fr .9fr; } }

.mock { background: var(--surface); color: var(--ink); border-radius: 18px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); padding: 16px; border: 1px solid rgba(255, 255, 255, .12); }
.mock-bar { display: flex; gap: 6px; margin-bottom: 14px; }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.mock-kpi { background: var(--surface-2); border-radius: 10px; padding: 10px; }
.mock-kpi b { display: block; font-size: 1.25rem; }
.mock-kpi small { color: var(--muted); }
.mock-rooms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mock-room { border-radius: 8px; padding: 8px 4px; text-align: center; font-weight: 700; font-size: .85rem; }
.mock-room.a { background: var(--ok-soft); color: var(--ok); }
.mock-room.o { background: var(--info-soft); color: var(--info); }
.mock-room.c { background: var(--warn-soft); color: var(--warn); }
.mock-room.m { background: var(--bad-soft); color: var(--bad); }

section.block { padding: 64px 0; }
section.block.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 62ch; margin: 0 auto 36px; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
.section-head p { color: var(--muted); }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.08rem; margin: 12px 0 6px; }
.card p { color: var(--muted); margin: 0; font-size: .96rem; }
.card ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: .92rem; }
.ico { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }

.steps { display: grid; gap: 16px; counter-reset: step; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step { position: relative; padding: 20px 20px 20px 64px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 18px; top: 18px; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--warn); font-weight: 800; display: grid; place-items: center; }
.step h3 { font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); }

.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan.featured { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand), var(--shadow); }
.plan .price { font-size: 1.7rem; font-weight: 800; margin: 6px 0 2px; }
.plan ul { list-style: none; padding: 0; margin: 14px 0 20px; display: grid; gap: 8px; color: var(--ink); }
.plan li { display: flex; gap: 8px; align-items: flex-start; font-size: .95rem; }
.plan li .i { color: var(--ok); margin-top: 3px; }
.plan .btn { margin-top: auto; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--warn); }

details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq p { margin: 10px 0 0; color: var(--muted); }

.cta-band { background: linear-gradient(160deg, var(--hero-1), var(--hero-2)); color: #fff; border-radius: 22px; padding: 40px 24px; text-align: center; }
.cta-band p { color: rgba(255, 255, 255, .85); }
.cta-band .cta-row { justify-content: center; }

footer.site { padding: 32px 0 40px; color: var(--muted); font-size: .92rem; }
footer.site .container { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer.site a { color: var(--muted); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px var(--gutter); background: radial-gradient(900px 400px at 50% -10%, var(--brand-soft), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 28px 24px; }
.auth-card h1 { font-size: 1.5rem; margin-top: 18px; }
.auth-card .sub { color: var(--muted); margin-bottom: 20px; }
.auth-foot { margin-top: 18px; text-align: center; color: var(--muted); font-size: .95rem; }
.demo-banner { background: var(--info-soft); color: var(--info); border-radius: var(--radius-sm); padding: 10px 12px; font-size: .88rem; margin-bottom: 16px; }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.form-error { background: var(--bad-soft); color: var(--bad); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 14px; font-size: .92rem; }
.field-error { color: var(--bad); font-size: .85rem; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }

/* ---------- Workspace ---------- */
.shell { display: grid; min-height: 100vh; grid-template-columns: 1fr; }
.side { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); background: var(--surface); border-right: 1px solid var(--line); transform: translateX(-102%); transition: transform .2s; z-index: 40; display: flex; flex-direction: column; padding: 16px 12px; overflow-y: auto; }
.side.open { transform: none; box-shadow: var(--shadow); }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 35; }
.side .brand { padding: 4px 8px 14px; }
.side nav { display: grid; gap: 2px; }
.side .nav-label { margin: 16px 10px 6px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side a.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.side a.nav-item:hover { background: var(--surface-2); }
.side a.nav-item[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.nav-empty { padding: 0 12px; }
.side-foot { margin-top: auto; padding-top: 16px; display: grid; gap: 8px; }
.side-foot .btn { justify-content: flex-start; }
.main { min-width: 0; }
.app-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px var(--gutter); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.app-top .who { margin-left: auto; text-align: right; line-height: 1.25; min-width: 0; }
.app-top .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.app-top .who small { color: var(--muted); }
.page { padding: 20px var(--gutter) 60px; max-width: 1180px; margin: 0 auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 18px; }
.page-head h1 { font-size: 1.5rem; margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
@media (min-width: 980px) {
  .shell { grid-template-columns: 270px 1fr; }
  .side { position: sticky; top: 0; height: 100vh; transform: none; width: auto; }
  .scrim, .menu-btn { display: none !important; }
  .page { padding: 28px 32px 60px; }
  .app-top { padding-inline: 32px; }
}

.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi small { color: var(--muted); display: flex; gap: 6px; align-items: center; }
.kpi b { display: block; font-size: 1.55rem; margin-top: 4px; letter-spacing: -.02em; }
.kpi span.sub { color: var(--muted); font-size: .85rem; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 18px; }
.panel h2 { font-size: 1.05rem; margin-bottom: 12px; }
.two-col { display: grid; gap: 18px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1.2fr .8fr; } }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 16px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.tabs a { white-space: nowrap; padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.tabs a:hover { color: var(--ink); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.toolbar .search { flex: 1 1 220px; position: relative; }
.toolbar .search .i { position: absolute; left: 12px; top: 12px; color: var(--muted); }
.toolbar .search input { padding-left: 38px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.actions { text-align: right; white-space: nowrap; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .i { width: 2.4em; height: 2.4em; color: var(--brand); margin-bottom: 8px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }

.service-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.service { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.service.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); }
.service .meta { flex: 1; min-width: 0; }
.service h3 { font-size: 1.02rem; margin: 0 0 4px; }
.service p { margin: 0 0 10px; color: var(--muted); font-size: .92rem; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: .92rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 44px; height: 26px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid var(--accent); outline-offset: 2px; }

.board { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 12px; text-align: left; cursor: pointer; font: inherit; color: inherit; background: var(--surface); }
.tile b { display: block; font-size: 1.15rem; }
.tile small { display: block; color: var(--muted); margin-bottom: 8px; }
.tile.ok { background: var(--ok-soft); border-color: transparent; }
.tile.info { background: var(--info-soft); border-color: transparent; }
.tile.warn { background: var(--warn-soft); border-color: transparent; }
.tile.bad { background: var(--bad-soft); border-color: transparent; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

/* POS */
.pos { display: grid; gap: 16px; }
@media (min-width: 900px) { .pos { grid-template-columns: 1fr 360px; align-items: start; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer; min-height: 36px; }
.chip[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.items { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.item { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 12px; cursor: pointer; font: inherit; color: inherit; min-height: 84px; display: flex; flex-direction: column; gap: 4px; }
.item:hover:not([disabled]) { border-color: var(--brand); }
.item[disabled] { opacity: .5; cursor: not-allowed; }
.item b { font-size: .98rem; }
.item span { color: var(--muted); font-size: .88rem; }
.cart { position: sticky; top: 76px; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.totals { display: grid; gap: 4px; margin: 12px 0; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 1.3rem; font-weight: 800; }

/* Dialog */
dialog { border: 1px solid var(--line); border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(0, 0, 0, .5); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { margin: 0; font-size: 1.15rem; }
.dlg-body { padding: 18px 20px; max-height: 70vh; overflow-y: auto; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.form-grid { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.receipt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.receipt .line { display: flex; justify-content: space-between; gap: 12px; }
.receipt hr { border: 0; border-top: 1px dashed var(--line); margin: 10px 0; }

.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; width: min(92vw, 420px); }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 500; }
.toast.err { background: var(--bad); color: #fff; }

.bars { display: block; width: 100%; height: auto; }
.bars text { fill: var(--muted); font: 11px var(--font); }
.bars rect.bar { fill: var(--brand); }
.bars line { stroke: var(--line); }

@media print {
  body * { visibility: hidden; }
  .receipt, .receipt * { visibility: visible; }
  .receipt { position: absolute; left: 0; top: 0; width: 100%; color: #000; }
}

.narrow { max-width: 760px; }

/* let grid children shrink so wide tables scroll inside their wrapper instead of the page */
.two-col > *, .pos > *, .shell > * , .kpis > * { min-width: 0; }
