/* نظام الكافيه — الهوية البصرية: زجاج الشاي بالنعناع (أخضر عميق)، صينية النحاس (ذهبي دافئ)، جمر الشيشة (أحمر) */
@font-face { font-family: "Plex Arabic"; src: url("../fonts/plex-arabic-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("../fonts/plex-arabic-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("../fonts/plex-arabic-700.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --ink: #0e3534;          /* أخضر النعناع الغامق: القائمة الجانبية والعناوين */
  --ink-2: #164b48;
  --mint: #1c7a5e;         /* الإجراء الأساسي */
  --mint-soft: #e2f1ea;
  --brass: #b9791c;        /* النحاس: المشغول والتنبيه */
  --brass-soft: #fbefd9;
  --ember: #bf3b25;        /* الجمر: الإلغاء والخطر */
  --ember-soft: #fbe6e1;
  --smoke: #6a4c93;        /* دخان الشيشة: قسم الشيشة والمحجوز */
  --smoke-soft: #ece5f5;
  --bg: #f1f5f2;
  --card: #ffffff;
  --line: #d6e0da;
  --text: #15211f;
  --muted: #5d6e69;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(14, 53, 52, .08), 0 6px 18px rgba(14, 53, 52, .06);
  --nav-w: 232px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Plex Arabic", Tahoma, "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); }
h1, h2, h3 { margin: 0; line-height: 1.3; color: var(--ink); }
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .6em; }
/* أسماء طويلة بلا مسافات لا تكسر عرض الصفحة على الموبايل */
h1, h2, h3, p, .pbtn, .nm, .line-note, .ticket .t, .tag, .toast, .banner, .card, dd, dt { overflow-wrap: anywhere; }
.pbtn, .tbtn { min-width: 0; }
a { color: var(--mint); }
.num, td.n, th.n { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; border-radius: 6px; }

/* ---------- الأزرار ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--mint); border-color: var(--mint); color: #fff; }
.btn.primary:hover { background: #166650; }
.btn.brass { background: var(--brass); border-color: var(--brass); color: #fff; }
.btn.danger { background: var(--card); border-color: var(--ember); color: var(--ember); }
.btn.danger.solid { background: var(--ember); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 36px; padding: .25rem .7rem; font-size: .9rem; }
.btn.lg { min-height: 56px; font-size: 1.1rem; padding: .6rem 1.4rem; }
.btn.block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- الحقول ---------- */
label.f { display: block; margin-bottom: .8rem; }
label.f > span { display: block; font-size: .9rem; font-weight: 500; margin-bottom: .25rem; color: var(--ink); }
label.f small { display: block; color: var(--muted); font-size: .8rem; margin-top: .2rem; }
input, select, textarea { font: inherit; color: var(--text); background: #fff; border: 1px solid #b9c8c0; border-radius: 9px; padding: .55rem .7rem; width: 100%; min-height: 44px; }
textarea { min-height: 76px; resize: vertical; }
input[type=checkbox] { width: 22px; height: 22px; min-height: 0; accent-color: var(--mint); vertical-align: middle; }
label.check { display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; cursor: pointer; }
input[dir=ltr], input[type=number], input[type=date], input[type=datetime-local], input[type=password] { direction: ltr; text-align: right; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .8rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: 1rem; }
.filters label.f { margin: 0; min-width: 140px; flex: 1 1 140px; max-width: 220px; }

/* ---------- الهيكل ---------- */
.app { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100vh; }
.app > div { min-width: 0; }
.side { background: var(--ink); color: #dbe9e4; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { padding: 1.1rem 1rem .9rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand b { display: block; color: #fff; font-size: 1.15rem; }
.brand span { font-size: .8rem; opacity: .75; }
.nav { padding: .5rem; flex: 1; }
.nav a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .75rem; border-radius: 9px; color: #dbe9e4; text-decoration: none; font-size: .97rem; }
.nav a:hover { background: rgba(255,255,255,.07); }
.nav a.on { background: #fff; color: var(--ink); font-weight: 700; }
.badge { display: inline-block; min-width: 22px; padding: 0 .4rem; border-radius: 11px; background: var(--ember); color: #fff; font-size: .75rem; font-weight: 700; text-align: center; line-height: 22px; }
.side-foot { padding: .75rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; }
.side-foot .who { margin-bottom: .5rem; }
.side-foot .btn { background: transparent; color: #dbe9e4; border-color: rgba(255,255,255,.25); }
.main { min-width: 0; padding: 1.25rem 1.5rem 3rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.topbar { display: none; }
.banner { padding: .6rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 500; }
.banner.warn { background: var(--brass-soft); color: #6d4508; border: 1px solid #e8c98d; }
.banner.bad { background: var(--ember-soft); color: #7c2213; border: 1px solid #e9b1a5; }
.banner.ok { background: var(--mint-soft); color: #0f4d3a; border: 1px solid #a9d6c3; }
#offline { position: fixed; top: 0; inset-inline: 0; z-index: 90; background: var(--ember); color: #fff; text-align: center; padding: .4rem; font-weight: 700; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.card + .card { margin-top: 1rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.cards .card + .card { margin-top: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; border-inline-start: 5px solid var(--ink); }
.stat > span { display: block; font-size: .85rem; color: var(--muted); }
.stat b { font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.stat.good { border-inline-start-color: var(--mint); }
.stat.warn { border-inline-start-color: var(--brass); }
.stat.bad { border-inline-start-color: var(--ember); }
.stat.smoke { border-inline-start-color: var(--smoke); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.cols .card + .card { margin-top: 0; }

/* ---------- الجداول ---------- */
.tbl-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th { text-align: start; font-weight: 700; color: var(--ink); background: #e8efeb; padding: .6rem .75rem; white-space: nowrap; position: sticky; top: 0; }
.tbl td { padding: .55rem .75rem; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tr.off td { color: var(--muted); }
.tbl tr.struck td:not(:last-child) { text-decoration: line-through; color: var(--muted); }
.tbl tfoot td { font-weight: 700; background: #f4f8f6; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }
.tag { display: inline-block; padding: .05rem .55rem; border-radius: 20px; font-size: .8rem; font-weight: 500; background: #e8efeb; color: var(--ink); }
.tag.good { background: var(--mint-soft); color: #0f4d3a; }
.tag.warn { background: var(--brass-soft); color: #6d4508; }
.tag.bad { background: var(--ember-soft); color: #7c2213; }
.tag.smoke { background: var(--smoke-soft); color: #45306a; }
.in { color: #0f6a4c; font-weight: 700; }
.out { color: var(--ember); font-weight: 700; }

/* ---------- الترابيزات: أقراص مستديرة مثل سطح ترابيزة القهوة ---------- */
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 1.1rem; }
.tbtn { position: relative; aspect-ratio: 1; border-radius: 50%; border: 5px solid #9fc9b6; background: #fff; color: var(--ink); font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .5rem; text-align: center; box-shadow: var(--shadow); }
.tbtn b { font-size: 1.7rem; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbtn span { font-size: .8rem; color: var(--muted); max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbtn .amt { font-weight: 700; color: var(--ink); font-size: .95rem; }
.tbtn.occupied { border-color: var(--brass); background: var(--brass-soft); }
.tbtn.reserved { border-color: var(--smoke); background: var(--smoke-soft); border-style: dashed; }
.tbtn.off { opacity: .45; border-style: dotted; }
.tbtn.other { opacity: .6; }
.tbtn .dot { position: absolute; top: 4px; inset-inline-end: 4px; background: var(--mint); color: #fff; border-radius: 14px; min-width: 28px; height: 28px; line-height: 28px; font-size: .8rem; font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 3px solid; vertical-align: -2px; margin-inline-end: .3rem; }

/* ---------- شاشة الأوردر ---------- */
.order { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 1rem; align-items: start; }
.catbar { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: .6rem; }
.catbar .btn { white-space: nowrap; flex: 0 0 auto; overflow-wrap: normal; }
.catbar .btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: .6rem; }
.pbtn { border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; padding: .6rem .5rem; min-height: 84px; display: flex; flex-direction: column; justify-content: space-between; text-align: start; border-inline-start: 5px solid var(--mint); color: var(--text); }
.pbtn.shisha { border-inline-start-color: var(--smoke); }
.pbtn b { font-weight: 500; line-height: 1.3; }
.pbtn span { font-weight: 700; color: var(--ink); }
.pbtn:disabled { opacity: .45; cursor: not-allowed; }
.pbtn img { width: 100%; height: 64px; object-fit: cover; border-radius: 8px; margin-bottom: .3rem; }
.pbtn:active { transform: scale(.97); }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.lines li:last-child { border-bottom: 0; }
.line-top { display: flex; align-items: center; gap: .5rem; justify-content: space-between; }
.line-top .nm { flex: 1; min-width: 0; font-weight: 500; }
.line-note { font-size: .85rem; color: var(--brass); margin-top: .15rem; }
.qty { display: inline-flex; align-items: center; gap: .25rem; }
.qty button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 1.2rem; font-weight: 700; cursor: pointer; color: var(--ink); }
.qty b { min-width: 28px; text-align: center; }
.lines li.cancelled .nm, .lines li.cancelled .lt { text-decoration: line-through; color: var(--muted); }
.totals { border-top: 2px solid var(--ink); margin-top: .5rem; padding-top: .5rem; }
.totals div { display: flex; justify-content: space-between; padding: .1rem 0; }
.totals .grand { font-size: 1.35rem; font-weight: 700; color: var(--ink); }
.sendbar { position: sticky; bottom: 0; background: var(--card); padding-top: .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0 .6rem; }
.chips button { border: 1px solid var(--line); background: #f4f8f6; border-radius: 16px; padding: .2rem .7rem; font: inherit; font-size: .85rem; cursor: pointer; min-height: 34px; }

/* ---------- شاشة البار والشيشة ---------- */
body.kds { background: #0b2726; }
.kds-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; color: #fff; padding: .9rem 1.2rem; background: var(--ink); position: sticky; top: 0; z-index: 5; }
.kds-head h1 { color: #fff; }
.kds-head .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; padding: 1.2rem; align-items: start; }
.ticket { background: #fff; border-radius: 14px; overflow: hidden; border-top: 8px solid var(--brass); }
.ticket.preparing { border-top-color: #2b7fc4; }
.ticket.ready { border-top-color: var(--mint); }
.ticket.done { opacity: .55; border-top-color: #9aa; }
.ticket.late { box-shadow: 0 0 0 4px var(--ember); }
.ticket header { display: flex; justify-content: space-between; align-items: baseline; padding: .6rem .9rem; background: #eef4f1; }
.ticket header b { font-size: 1.4rem; color: var(--ink); }
.ticket ul { list-style: none; margin: 0; padding: .3rem .9rem; }
.ticket li { padding: .45rem 0; border-bottom: 1px dashed var(--line); display: flex; gap: .5rem; align-items: flex-start; justify-content: space-between; }
.ticket li .q { font-size: 1.25rem; font-weight: 700; min-width: 2.2rem; color: var(--ink); }
.ticket li .t { flex: 1; font-size: 1.1rem; font-weight: 500; }
.ticket li .t small { display: block; color: var(--brass); font-weight: 700; font-size: .95rem; }
.ticket li.cancelled .t, .ticket li.cancelled .q { text-decoration: line-through; color: var(--ember); }
.ticket li.served .t { color: var(--muted); }
.ticket footer { padding: .6rem .9rem .9rem; display: flex; gap: .5rem; }
.ticket footer .btn { flex: 1; }
.tnote { margin: .4rem .9rem 0; padding: .35rem .6rem; background: var(--brass-soft); border-radius: 8px; font-weight: 500; }

/* ---------- النوافذ والتنبيهات ---------- */
.overlay { position: fixed; inset: 0; background: rgba(8, 30, 29, .55); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow-y: auto; z-index: 50; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 520px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { max-width: 860px; }
.modal > header { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.modal > .body { padding: 1.1rem; }
.modal > footer { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-start; padding: .9rem 1.1rem; border-top: 1px solid var(--line); background: #f6faf8; border-radius: 0 0 16px 16px; }
.x { border: 0; background: transparent; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); width: 40px; height: 40px; }
.form-err { background: var(--ember-soft); color: #7c2213; border-radius: 8px; padding: .5rem .7rem; margin-bottom: .8rem; font-weight: 500; }
#toasts { position: fixed; top: 1rem; inset-inline-end: 1rem; z-index: 100; display: flex; flex-direction: column; gap: .5rem; max-width: min(420px, calc(100vw - 2rem)); }
.toast { background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 10px; box-shadow: var(--shadow); font-weight: 500; border-inline-start: 6px solid var(--mint); }
.toast.bad { border-inline-start-color: var(--ember); background: #4a1a12; }
.toast.warn { border-inline-start-color: var(--brass); }

/* ---------- الدخول ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--ink); }
.login .box { background: #fff; border-radius: 18px; padding: 1.75rem 1.5rem; width: 100%; max-width: 400px; }
.login h1 { margin-bottom: .25rem; }
.login .ring { width: 64px; height: 64px; border-radius: 50%; border: 6px solid var(--brass); background: var(--brass-soft); margin-bottom: 1rem; }

/* ---------- الشارتات ---------- */
.bars { display: grid; gap: .45rem; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 150px) 1fr auto; gap: .6rem; align-items: center; font-size: .92rem; }
.bar-row .track { background: #e8efeb; border-radius: 6px; height: 18px; overflow: hidden; }
.bar-row .fill { height: 100%; background: var(--mint); border-radius: 6px; min-width: 2px; }
.bar-row .fill.b2 { background: var(--brass); }
.bar-row .fill.b3 { background: var(--smoke); }
.colchart { display: flex; align-items: flex-end; gap: .4rem; height: 170px; padding-top: 1.2rem; }
.colchart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.colchart .col i { width: 100%; max-width: 46px; background: var(--mint); border-radius: 6px 6px 0 0; min-height: 2px; }
.colchart .col b { font-size: .72rem; font-weight: 500; }
.colchart .col span { font-size: .72rem; color: var(--muted); white-space: nowrap; }

.kv { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; text-align: end; }
.kv .sep { grid-column: 1 / -1; border-top: 1px solid var(--line); margin: .2rem 0; }
.qrbox { display: inline-block; background: #fff; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.qrbox svg { display: block; width: 190px; height: 190px; }
.url { direction: ltr; font-weight: 700; font-size: 1.05rem; background: #e8efeb; padding: .5rem .8rem; border-radius: 8px; word-break: break-all; user-select: all; }
.pager { display: flex; gap: .5rem; align-items: center; justify-content: center; margin-top: 1rem; }
details.d { border-top: 1px solid var(--line); padding: .4rem 0; }
pre.j { direction: ltr; text-align: left; background: #f4f8f6; padding: .5rem; border-radius: 8px; overflow-x: auto; font-size: .8rem; margin: .3rem 0 0; white-space: pre-wrap; word-break: break-word; }
.sup-card h3 { font-size: 1.1rem; }
.sup-card .debt { font-size: 1.5rem; font-weight: 700; color: var(--ember); }
.sup-card .debt.zero { color: var(--mint); }
.bigtime { font-size: 2.2rem; font-weight: 700; color: var(--ink); }

/* ---------- واجهة الموبايل للنادل ---------- */
.mobile { display: block; min-height: 100vh; padding-bottom: 76px; }
.mobile .mtop { position: sticky; top: 0; z-index: 10; background: var(--ink); color: #fff; padding: .7rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.mobile .mtop b { font-size: 1.1rem; }
.mobile .mtop span { font-size: .8rem; opacity: .8; }
.mobile .mmain { padding: 1rem; }
.mnav { position: fixed; bottom: 0; inset-inline: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding-bottom: env(safe-area-inset-bottom); }
.mnav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; min-height: 60px; text-decoration: none; color: var(--muted); font-size: .78rem; font-weight: 500; text-align: center; padding: .2rem; }
.mnav a i { width: 26px; height: 5px; border-radius: 3px; background: transparent; }
.mnav a.on { color: var(--ink); font-weight: 700; }
.mnav a.on i { background: var(--brass); }
.mnav .badge { position: absolute; top: 4px; inset-inline-end: 18%; }
.mobile .order { grid-template-columns: minmax(0, 1fr); }
.order > *, .cols > * { min-width: 0; }
.mmain { min-width: 0; overflow-x: clip; }
.mobile .sendbar { position: static; }
.mobile .tables { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .8rem; }
.mobile .tbtn b { font-size: 1.45rem; }

/* ---------- التجاوب ---------- */
@media (max-width: 980px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(280px, 84vw); z-index: 40; transform: translateX(100%); transition: transform .2s; }
  [dir=rtl] .side { transform: translateX(100%); }
  .app.open .side { transform: none; }
  .app.open::after { content: ""; position: fixed; inset: 0; background: rgba(8,30,29,.5); z-index: 30; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; background: var(--ink); color: #fff; padding: .6rem 1rem; position: sticky; top: 0; z-index: 20; }
  .topbar .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
  .main { padding: 1rem 1rem 3rem; }
  .order, .cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .grid2 { grid-template-columns: 1fr; }
  .btn { white-space: normal; }
  .line-top { flex-wrap: wrap; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat b { font-size: 1.2rem; }
  .overlay { padding: 0; align-items: stretch; }
  .modal, .modal.wide { max-width: none; border-radius: 0; min-height: 100%; display: flex; flex-direction: column; }
  .modal > .body { flex: 1; }
  .modal > footer { border-radius: 0; position: sticky; bottom: 0; }
  .modal > footer .btn { flex: 1; }
  .products { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .filters label.f { max-width: none; }
  .kds-grid { padding: .75rem; grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { body > *:not(#printroot) { display: none !important; } }
