/* The dashboard's additions to the live demo's app.css (which it shares). */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Sign-in */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.signin-box { width: min(440px, 100%); display: flex; flex-direction: column; gap: 14px; }
.signin-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; margin: 0; }
.signin-box h1 { margin: 4px 0 0; }
.signin .banner { margin: 0; }

/* A master key visit (ADR-0085): across the top of every page, above the shop's name */
.top .visitbar { flex-basis: 100%; padding: 8px 12px; }
.visitbar p { margin: 0; }
.visitbar form { margin: 0; }
.qr img { display: block; width: 200px; height: 200px; background: #FFFFFF; padding: 8px; border-radius: 8px; }
.totp-key { font-size: 15px; letter-spacing: 0.04em; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; padding: 0; list-style: none; }
.codes code { font-size: 15px; }

/* Pop-up forms (the demo's dialogs): under their button's right-hand end, over everything (the screen
   view, z-index 60, too). */
details.pop { position: relative; }
details.pop > summary { list-style: none; }
details.pop > summary::-webkit-details-marker { display: none; }
.popbox { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; width: min(360px, 88vw); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2); }
form.inline { display: inline-flex; gap: 2px; margin: 0; }
.row form { margin: 0; }
.row.wrap { flex-wrap: wrap; }

/* Choices drawn as pictures: the radio is hidden, the label is the button */
.tplopt { cursor: pointer; }
.tplopt:has(input:checked) { outline: 2px solid var(--ink); outline-offset: 1px; }
.tplopt:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--mustard); }
.swatches form { display: contents; }
.swatch { cursor: pointer; }
.swatch:has(input:checked) { outline: 2px solid var(--ink); outline-offset: 2px; }
.wire { display: block; }
.fchip { cursor: pointer; }
.fchip input { position: absolute; opacity: 0; pointer-events: none; }
.fchip:has(input:checked) { background: var(--ink); color: #FFFFFF; }

/* Menu editor */
.draghandle { cursor: grab; color: var(--muted); display: inline-flex; padding: 4px; }
.irows .sortable-ghost { opacity: 0.4; }
/* Adding an item (ADR-0075): a drawn picture is a radio, its label the button */
label.picopt { position: relative; }
.picopt input { position: absolute; opacity: 0; pointer-events: none; }
.picopt:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.picopt:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--mustard); }

/* Device page */
.healthbars { display: grid; grid-template-columns: repeat(24, 1fr); align-items: end; gap: 2px; height: 48px; margin: 8px 0; }
.hb { display: block; background: var(--ok, #2E7D4F); border-radius: 2px; min-height: 2px; }
.hb.l0 { height: 2px; background: var(--line); }
.hb.l1 { height: 25%; } .hb.l2 { height: 50%; } .hb.l3 { height: 75%; } .hb.l4 { height: 100%; }
.shot { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.feature { padding: 8px 0; border-top: 1px solid var(--line); }
.feature h3 { margin: 0; font-size: 15px; }

/* Phones and tablets: across the screen, scrolling inside when it's taller than the screen (a phone on
   its side), so its last field and button can always be reached. */
@media (max-width: 980px) {
  .popbox { position: fixed; left: 16px; right: 16px; top: 80px; width: auto; max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 980px) and (max-height: 560px) {
  .popbox { top: 12px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
}

/* The screen view (ADR-0040): the demo's panel, plus "On the TV" or "After you publish" */
.v-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: 9px; background: #1F1F23; border: 1px solid #3A3A41; }
.v-mode button { min-height: 28px; border: 0; border-radius: 7px; background: none; color: #C9C6BC; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.v-mode button[aria-pressed="true"] { background: var(--mustard); color: var(--ink); }
/* An upright TV (ADR-0009): its picture, with the menu drawn turned on it, turned back as the TV hangs. */
.v-tv { container-type: size; }
.v-tv[data-turn^="portrait"] .v-frame { inset: auto; left: 50%; top: 0; width: 100cqh; height: calc(100cqh * 9 / 16); transform-origin: 0 0; }
.v-tv[data-turn="portrait"] .v-frame { transform: translateX(calc(100cqh * 9 / 32)) rotate(90deg); }
.v-tv[data-turn="portrait-flipped"] .v-frame { transform: translate(calc(100cqh * -9 / 32), 100cqh) rotate(-90deg); }
.v-tv[data-turn="landscape-flipped"] .v-frame { transform: rotate(180deg); transform-origin: 50% 50%; }
.v-full { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #C9C6BC; text-decoration: none; }
.v-full:hover { color: #FFFFFF; }
.v-full .ic { width: 15px; height: 15px; }
/* Not live (ADR-0136): the corner on After you publish says so along the foot of the picture (the panel grows no taller),
   and offers the way back */
.v-notlive { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 3px 5px 3px 8px; background: var(--mustard); color: var(--ink); font-size: 12px; font-weight: 700; }
.v-notlive[hidden] { display: none; }
.v-notlive .v-why { flex: 1; }
.v-notlive .v-live { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 0 8px; border: 1px solid var(--ink); border-radius: 6px; background: var(--ink); color: #FFFFFF; font: inherit; font-size: 11.5px; cursor: pointer; }
.v-notlive .ic { width: 14px; height: 14px; flex: none; }
.v-notlive .v-live .ic { width: 13px; height: 13px; }

/* Full size (ADR-0136): the player in a tab of its own, with its strip of controls */
.fs { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: #000000; color: #FFFFFF; font-size: 14px; }
.fs [hidden] { display: none !important; }
.fs-stage { flex: 1; position: relative; min-height: 0; }
/* The player gets no clicks: a click would put the keyboard inside it, where the page cannot hear the arrows. */
.fs-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; pointer-events: none; }
.fs-notlive { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; background: var(--mustard); color: var(--ink); font-weight: 600; }
.fs-notlive .ic { width: 18px; height: 18px; flex: none; }
.fs-live { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); color: #FFFFFF; font: inherit; font-weight: 700; cursor: pointer; }
.fs-live .ic { width: 16px; height: 16px; }
.fs-bar { position: fixed; left: 0; right: 0; bottom: 16px; margin: 0 auto; width: max-content; z-index: 5; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; max-width: calc(100vw - 24px); padding: 8px 12px; border-radius: 14px; background: rgba(17, 17, 20, 0.92); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); transition: opacity 0.3s; }
.fs.idle .fs-bar:not(:focus-within) { opacity: 0; }
.fs-slides { display: flex; align-items: center; gap: 8px; }
.fs-label { min-width: 92px; text-align: center; font-weight: 600; }
.fs-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid #3A3A41; border-radius: 9px; background: #1F1F23; color: #FFFFFF; font: inherit; font-weight: 600; cursor: pointer; }
.fs-btn:hover:not(:disabled) { background: #2A2A30; }
.fs-btn:disabled { opacity: 0.4; cursor: default; }
.fs-btn .ic { width: 16px; height: 16px; }
.fs-pick { min-height: 36px; max-width: 220px; border-radius: 9px; border: 1px solid #3A3A41; background: #1F1F23; color: #FFFFFF; padding: 0 8px; font: inherit; }
.fs-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: 9px; background: #1F1F23; border: 1px solid #3A3A41; }
.fs-mode button { min-height: 28px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: #C9C6BC; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fs-mode button[aria-pressed="true"] { background: var(--mustard); color: var(--ink); }
.fs-keys { margin: 0; flex: 1 1 100%; text-align: center; font-size: 12px; color: #A9A69C; }

/* Your Artwork: a video the worker is getting ready, or couldn't use (ADR-0057). */
.artnote { display: block; font-size: 12.5px; color: var(--muted); white-space: normal; }
.artnote.bad { color: var(--bad); }

/* A pick (the featured item or a special): its menu, then the item, and a new item's name and price. */
.pick { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; margin: 0; }
.pickbody { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; margin: 0; }
.pickrow, .newpick { flex-wrap: nowrap; }
.pickrow > select, .newpick > input { flex: 1 1 0; min-width: 0; }
.pickrow > select[data-pick-menu] { flex: 0 1 38%; }
.newpick > input.money { flex: 0 0 90px; }
.newpick[hidden], optgroup[hidden] { display: none; }
.daytabs { margin: 6px 0 2px; gap: 6px; }
.daytabs input[type="date"] { width: auto; }

/* Effects (ADR-0084): the rows and their parts are styled in the demo's app.css; an effect no longer given says so
   under its box, in line with where its parts would be. */
.fxgone { margin-left: 24px; }

/* The typing check's note (dash.js typingCheck, ?typingcheck=1): across the top, over everything. */
.typingcheck { position: fixed; left: 8px; right: 8px; top: 8px; z-index: 1000; max-height: 45vh; overflow-y: auto; padding: 10px 12px; border-radius: 10px; background: var(--ink); color: #FFFFFF; font: 12px/1.45 var(--mono); white-space: pre-wrap; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }

/* Your templates (ADR-0086): Make a template's starters, a radio each, its label the button */
.tplstarts { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tplstart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.tplstart { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #FFFFFF; cursor: pointer; min-height: 44px; }
.tplstart input { position: absolute; opacity: 0; pointer-events: none; }
.tplstart:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.tplstart:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--mustard); }
.tplstart-name { font-weight: 700; }
.tplstart-desc { color: var(--muted); font-size: 12.5px; }
.tplstart.pictured { gap: 6px; padding: 8px 8px 10px; }  /* a starter drawn with a screen's menu (views/entry.py) */
.tplstart-grid:has(.pictured) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.tplarchived > summary { cursor: pointer; }
.tplarchived[open] > summary { margin-bottom: 4px; }

/* Themes (ADR-0041): each card's buttons along its foot, whatever the words above them take. */
.tplcard > .row:last-child { margin-top: auto; }

/* Link-Join (ADR-0102): the Wi-Fi names and passwords typed from the new TVs, and the steps beside them. */
.mono { font-family: var(--mono); }
.steps { margin: 0 0 8px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }

/* A new shop's first steps on Home (usability review, 2026-10-09): what to do, in order, with a button for the step it is on. */
.startsteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.firstday { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.startstep { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.startn { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #FFFFFF; display: grid; place-items: center; font-weight: 700; }
.startn .ic { width: 18px; height: 18px; }
.startstep.done .startn { background: var(--green); }
.startbody { flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.startstep > .btn { flex: none; }

/* Simple Screen branding (ADR-0159): a store with it on wears a plainer, professional CMS look. Only colours, type
   and the brand mark change, through the same variables; layout, copy and behaviour are the dashboard's own. */
.brand-simple {
  --bg: #F5F7FA; --card: #FFFFFF; --ink: #1B2430; --ink-2: #3C4857; --muted: #5B6675;
  --line: #E1E6EC; --line-2: #CDD4DD; --side: #FFFFFF; --side-2: #EEF2F7;
  --mustard: #2457D6; --mute-bg: #EBEEF3;
  --display: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.brand-simple .side { color: var(--ink); border-right: 1px solid var(--line); }
.brand-simple .brand, .brand-simple .brand:hover { color: var(--ink); font-weight: 700; letter-spacing: 0; }
.brand-simple .brand-mark { background: var(--mustard); color: #FFFFFF; border-radius: 6px; }
.brand-simple .nav { color: var(--ink-2); }
.brand-simple .nav:hover { background: var(--side-2); color: var(--ink); }
.brand-simple .nav.on { background: #E4ECFC; color: #173B94; }
.brand-simple .navh { color: var(--muted); }
.brand-simple .who > summary:hover, .brand-simple .who[open] > summary { background: var(--side-2); }
.brand-simple h1, .brand-simple h2, .brand-simple h3 { font-family: var(--display); letter-spacing: 0; }
.brand-simple .btn.pri { background: var(--mustard); border-color: var(--mustard); color: #FFFFFF; }
.brand-simple .btn.pri:hover { background: #1C45B0; color: #FFFFFF; }
.brand-simple .fchip:has(input:checked), .brand-simple .tplopt:has(input:checked) { background: var(--mustard); color: #FFFFFF; }
.brand-simple .card { border-radius: 8px; box-shadow: none; border: 1px solid var(--line); }
.brand-simple .side { color: var(--ink); }
.brand-simple .shopbox, .brand-simple .locsw > summary { border-color: var(--line); background: var(--bg); }
.brand-simple .lk, .brand-simple .ls { color: var(--muted); }
.brand-simple .who { border-top-color: var(--line); }
.brand-simple .avatar { background: #DCE3EE; color: var(--ink); }

/* The Media gallery page (ADR-0158, ADR-0170): the room it takes, and each upload with its Delete. */
.gallerymeter { display: block; width: 100%; height: 8px; margin: 4px 0 8px; }
.gallerylist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.galleryrow { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; }
.galleryrow .gallerytext { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }

/* Edit all (batch editing): a grid of every item, one row each, saved together. */
.batch { display: flex; flex-direction: column; gap: 14px; }
.batchbar { display: flex; align-items: center; gap: 10px; }
.batchbar .grow { flex: 1; }
.batchwrap { overflow-x: auto; }
.batchtable { width: 100%; border-collapse: collapse; }
.batchtable th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #6E6C64; padding: 2px 6px 4px; }
.batchtable td { padding: 4px 6px; border-top: 1px solid #EFECE5; vertical-align: middle; }
.batchtable td:nth-child(1) { min-width: 180px; }
.batchtable td:nth-child(2) { min-width: 220px; }
.batchtable td .inp { width: 100%; }
.batchtable td .inp.money { width: 84px; }
.batchtable .batchprices { white-space: nowrap; }
.batchtable .batchprices .pricein { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; }
.batchtable tr.out td:nth-child(1) .inp { text-decoration: line-through; }
.batchadj .adjrow { display: flex; flex-wrap: wrap; gap: 16px; margin: 8px 0; }
.batchadj .adjmenus { border: 0; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ScranBot (ADR-0174): what it can do, as tiles to pick from. */
.bot-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 8px; margin-bottom: 16px; }
.bot-tile { display: flex; align-items: flex-start; gap: 10px; padding: 14px; color: var(--ink); text-decoration: none; }
.bot-tile > span { display: flex; flex-direction: column; gap: 2px; }
.bot-tile .ic { flex: none; width: 22px; height: 22px; }

.staff-qr{max-width:14rem;background:#fff;padding:.5rem}
.staff-qr svg{display:block;width:100%;height:auto}

/* Billing (ADR-0222): the next monthly payment, said big */
.bill-due { font-size: 20px; line-height: 1.3; margin: 6px 0; }
.bill-due strong { font-family: var(--display); font-size: 26px; }
.bill-lines { list-style: none; margin: 4px 0 8px; padding: 0; max-width: 560px; }
.bill-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }

/* The Services Agreement, as shown and as kept (ADR-0287). */
.agreement { max-height: 28em; overflow: auto; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; line-height: 1.5; background: var(--bg, #fff); }
.agreement h2 { font-size: 18px; margin: 14px 0 6px; } .agreement h3 { font-size: 15px; margin: 12px 0 4px; }
.agreement table.form { width: 100%; max-width: none; display: table; border-collapse: collapse; margin: 4px 0 8px; }
.agreement table.form th, .agreement table.form td { text-align: left; vertical-align: top; padding: 4px 8px; border-top: 1px solid var(--line); }
.agreement table.form th { width: 34%; font-weight: 600; }
.agreement ol.terms { list-style: none; margin: 0; padding: 0; } .agreement ol.terms li { margin: 0 0 6px; padding-left: 2.6em; text-indent: -2.6em; }
.agreement .no { display: inline-block; width: 2.2em; margin-right: .4em; text-indent: 0; font-weight: 600; }
.bad-text { color: var(--bad, #b3261e); }
@media print { .agreement { max-height: none; overflow: visible; border: 0; } }

/* Opening hours, a row a day (ADR-0231). */
.hoursrow{gap:8px;align-items:center;flex-wrap:wrap}.hoursrow .check{min-width:5.5em}.hoursrow .inp{width:auto}

/* The Direct Debit screen's bill (ADR-0290). */
.firstbill { margin: 0 0 16px; }
.firstbill h3 { margin: 4px 0 8px; }
.firstbill p { margin: 12px 0 0; }
.skipform { margin-top: 10px; }

/* The preview beside a menu steps through its slides (_menu_preview.html). */
.pv-step { align-items: center; margin-top: 8px; }
.pv-step .center { text-align: center; }
