/* Back office — builds on app.css (same tokens and components). */
.dialog.wide { width: min(100%, 640px); }
.bo2 { display: grid; gap: 16px; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); align-items: start; }
@media (max-width: 820px) { .bo2 { grid-template-columns: minmax(0, 1fr); } }
.catlist { display: grid; gap: 4px; }
.catrow { display: flex; align-items: center; gap: 4px; border-radius: 9px; }
.catrow.on { background: var(--sunk); box-shadow: inset 3px 0 0 var(--brand); }
.catname { flex: 1; display: flex; justify-content: space-between; gap: 8px; border: 0; background: none; text-align: left; padding: 9px 10px; font-weight: 600; }
.mgrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.mitem { display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--surface); }
.mitem:hover { border-color: var(--brand); }
.mitem.off { opacity: 0.6; }
.mitem img, .noimg { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; background: var(--sunk); }
.noimg { display: inline-block; background: repeating-linear-gradient(45deg, var(--sunk), var(--sunk) 6px, var(--bg) 6px, var(--bg) 12px); }
.photo { display: grid; gap: 6px; justify-items: start; }
.photo img, .noimg.big { width: 120px; height: 120px; border-radius: 12px; object-fit: cover; }
fieldset.box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; margin: 0; }
fieldset.box legend { font-weight: 600; padding: 0 4px; }
fieldset.box label.row { align-items: flex-start; flex-wrap: nowrap; }
.optrow { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.optrow.off { opacity: 0.6; }
.optedit { flex-wrap: nowrap; }
.optedit input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); min-width: 0; }
.optedit .o-name { flex: 2; } .optedit .o-price { flex: 1; max-width: 120px; }
.tbl.off { opacity: 0.55; border-style: dashed; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.switch input { width: 40px; height: 22px; appearance: none; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background 0.15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left 0.15s; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { left: 21px; }
.switch input:disabled { opacity: 0.5; cursor: not-allowed; }
.setlist { display: grid; }
.setrow { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.setrow:first-child { border-top: 0; }
.setrow > .stack { flex: 1 1 260px; }
.setctl select, .setctl input:not([type="checkbox"]) { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); min-height: 40px; max-width: 280px; }
.setctl input[type="number"] { width: 110px; }
.outletpick { min-width: 180px; }
.outletpick select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); min-height: 40px; }
.logoprev { max-height: 56px; max-width: 160px; border-radius: 6px; background: var(--sunk); padding: 4px; }
.bprev { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.bprev-top { background: var(--p); color: var(--p-on, #fff); padding: 10px 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bprev-top img { height: 26px; border-radius: 4px; }
.bprev-top b { font-family: var(--display); font-size: 1.1rem; }
.bprev-top span { font-size: 0.8rem; opacity: 0.85; }
.bprev-body { padding: 14px 12px; display: flex; gap: 8px; background: var(--bg); }
.bprev-btn { background: var(--p); color: var(--p-on, #fff); border-radius: 9px; padding: 8px 14px; font-weight: 600; font-size: 0.9rem; }
.field textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); width: 100%; resize: vertical; }

.mover { display: inline-flex; gap: 2px; }
.mover .btn { min-width: 32px; padding-inline: 6px; }
.mover .btn:disabled { opacity: 0.3; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; background: var(--bg); }
.kpi b { font-size: 1.15rem; }
td.r, th.r { text-align: right; }
@media print { header.top, .btn, select, .field input, nav.tabs { display: none !important; } .panel { break-inside: avoid; border: 0; box-shadow: none; } }
.start { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.startlist { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.startlist li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.startlist .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; }
.startlist li.done .tick { background: var(--good); border-color: var(--good); color: #fff; }
.startlist li.done b { text-decoration: line-through; color: var(--muted); }
.slotedit { display: grid; gap: 8px; }
.slotedit .s-name { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); min-width: 0; font-weight: 600; }
.choiceedit .c-item { flex: 2; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); min-width: 0; }
.choiceedit .c-extra { flex: 1; max-width: 120px; }

/* polish */
.mitem { border-color: var(--hairline); border-radius: 14px; box-shadow: var(--shadow-1); transition: transform .15s var(--ease), box-shadow .2s, border-color .2s; }
.mitem:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.mitem img, .noimg { border-radius: 10px; }
.catrow { transition: background .15s; }
.catrow:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.catrow.on { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent); }
.kpi { border-color: var(--hairline); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-1); padding: 12px 14px; }
.kpi b { font-family: var(--display); font-size: 1.3rem; letter-spacing: -0.01em; }
fieldset.box { border-color: var(--hairline); border-radius: 14px; }
.start { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 7%, var(--surface)), var(--surface) 60%); }
.bprev { box-shadow: var(--shadow-1); border-radius: 14px; }
.switch input { box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.15); }
.switch input::after { box-shadow: 0 1px 3px rgb(0 0 0 / 0.3); }

/* delivery apps: price lists */
.plrow { padding-left: 10px; padding-right: 10px; border-radius: 10px; }
.plrow.on { background: var(--sunk); box-shadow: inset 3px 0 0 var(--brand); }
.pltable td { vertical-align: middle; }
.pltable .cathead td { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding-top: 14px; }
.pltable .r { text-align: right; } .pltable .c { text-align: center; }
.plprice { width: 120px; text-align: right; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.plprice::placeholder { color: var(--muted); opacity: .75; }
.plprice.set { border-color: var(--brand, var(--accent)); font-weight: 600; }
.chip.good { background: var(--good-bg); color: var(--good); }

/* account safety */
.confirmbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--info-bg, #E5EDFA); color: var(--info, #2F5DA8); border-top: 1px solid currentColor; padding: 8px 16px; font-size: 0.9rem; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 10px; background: var(--sunk); font-size: 1rem; }
.chip.warn { background: var(--warn-bg, #FBF0DC); color: var(--warn, #8A5300); }

/* billing */
.plancard { display: grid; gap: 2px; padding: 12px 16px 12px 40px; border: 1px solid var(--line); border-radius: 12px; position: relative; min-width: 180px; cursor: pointer; background: var(--surface); }
.plancard input { position: absolute; left: 14px; top: 15px; }
.plancard.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.bankbox { background: var(--sunk); border-radius: 10px; padding: 12px 14px; font-family: var(--mono); font-size: 0.9rem; line-height: 1.6; }
.receipt.plain { background: none; box-shadow: none; padding: 0; -webkit-mask: none; mask: none; }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.rolepick { padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }

/* QR menu */
.qrgrid { align-items: start; }
.tplpick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
@media (max-width: 640px) { .tplpick { grid-template-columns: 1fr; } }
.tpl { display: grid; gap: 4px; text-align: left; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.tpl.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.tpl .sw { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; height: 54px; padding: 6px; border-radius: 8px; }
.tpl .sw i { border-radius: 4px; }
.tpl-modern .sw { background: #F5F4F1; } .tpl-modern .sw i { background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.tpl-modern .sw i:nth-child(3) { background: var(--brand); grid-column: 1 / -1; height: 6px; align-self: end; }
.tpl-classic .sw { background: #F7F1E6; grid-template-columns: 1fr; } .tpl-classic .sw i { border-bottom: 2px dotted #b9a68d; border-radius: 0; }
.tpl-night .sw { background: #0E0D0C; grid-template-columns: 1fr; } .tpl-night .sw i { border-bottom: 1px solid #3a3530; border-radius: 0; }
.tpl-night .sw i:first-child { border-bottom-color: #D9B26A; }
.previewpanel .phone { width: 300px; max-width: 100%; height: 560px; margin: 8px auto; border-radius: 34px; border: 10px solid #1b1d1c; overflow: hidden; background: #fff; box-shadow: 0 10px 30px rgb(0 0 0 / .18); }
.previewpanel iframe { width: 100%; height: 100%; border: 0; }
.qrlist { display: grid; gap: 12px; }
.qrcard { display: flex; gap: 16px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.qrimg { background: #fff; padding: 6px; border-radius: 8px; line-height: 0; }

/* Your data: closing the account */
.panel.closing { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.panel.closing h2 { color: var(--bad); }
/* many tabs for an owner: wrap to a second line on wide screens rather than hide off the edge */
@media (min-width: 900px) { nav.tabs { flex-wrap: wrap; row-gap: 2px; } }

/* Printers */
ul.plain { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.cmdline { display: inline-block; margin-top: 4px; padding: 4px 8px; border-radius: 6px; background: var(--surface-2, rgb(0 0 0 / .05)); border: 1px solid var(--line); word-break: break-all; }
.samplebar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.agents { display: grid; gap: 10px; margin-bottom: 12px; }
.agent { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.found { margin-top: 6px; }
.foundrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px dashed var(--line); }
ol.steps { padding-left: 20px; line-height: 1.7; display: grid; gap: 6px; }
ol.steps .btn { display: inline-block; text-decoration: none; }

/* Your plan: three plan cards */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; }
.plan { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.plan.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.plan h3 { margin: 0; font-family: var(--display); }
.plan .price { margin: 0; } .plan .price b { font-size: 1.35rem; }
.plan .feat { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 4px; font-size: 0.9rem; }
.plan .feat li:first-child:not(:only-child) { list-style: none; margin-left: -18px; color: var(--muted); }
.usage { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.meter { display: inline-block; width: 90px; height: 7px; border-radius: 4px; background: var(--sunk); vertical-align: middle; overflow: hidden; margin-left: 4px; }
.meter i { display: block; height: 100%; background: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font: inherit; font-size: 0.85rem; cursor: pointer; color: var(--ink); }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
