:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f7f7f7;
  background: #111;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: #111; }
button, input, select { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #f4c430; outline-offset: 2px; }
.stage-banner { background:#f4c430; color:#111; text-align:center; font-weight:900; padding:8px 12px; letter-spacing:.04em; }
.topbar { display:flex; gap:16px; align-items:center; padding:16px max(16px, env(safe-area-inset-left)); background:#1c1c1c; border-bottom:1px solid #333; }
.logo { width:92px; max-height:72px; object-fit:contain; }
h1, h2, h3, p { margin:0; }
h3 { font-size: 1rem; }
.topbar p, .muted { margin-top:4px; color:#bbb; }
.build-version { display:inline-block; margin-top:5px; padding:3px 7px; border:1px solid #444; border-radius:999px; color:#aaa; font-size:.72rem; font-weight:800; }
main { padding:18px; max-width:1280px; margin:auto; }
.warning-card { display:flex; gap:10px; align-items:center; margin-bottom:16px; padding:12px 16px; border:1px solid #735f14; background:#2b260f; border-radius:12px; }
.warning-card strong { color:#f4c430; white-space:nowrap; }
.warning-card span { color:#ded7b3; }
.summary { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:18px; }
.summary.six { grid-template-columns:repeat(6,1fr); }
.summary article, .panel, .operator-strip, .basket-panel, .category { background:#1c1c1c; border:1px solid #333; border-radius:14px; }
.summary article { padding:16px; min-width:0; }
.summary span { display:block; color:#bbb; font-size:.85rem; }
.summary strong { display:block; margin-top:6px; font-size:clamp(1.25rem, 2.6vw, 1.75rem); overflow-wrap:anywhere; }
.admin-tabs { position:sticky; top:0; z-index:8; display:flex; gap:8px; overflow-x:auto; margin:0 0 18px; padding:10px; border:1px solid #333; border-radius:12px; background:rgba(20,20,20,.96); backdrop-filter:blur(10px); }
.admin-tab { flex:0 0 auto; padding:9px 13px; border:1px solid #444; border-radius:8px; color:#ddd; background:#292929; font-size:.9rem; font-weight:800; cursor:pointer; }
.admin-tab.active, .admin-tab[aria-selected="true"] { color:#111; background:#f4c430; border-color:#f4c430; }
[data-admin-tab][hidden] { display:none !important; }
.panel { padding:16px; margin-bottom:18px; scroll-margin-top:70px; }
details.panel > summary { cursor:pointer; list-style:none; display:flex; align-items:center; gap:10px; }
details.panel > summary::-webkit-details-marker { display:none; }
details.panel > summary::before { content:"▸"; color:#f4c430; font-size:1.2rem; transition:transform .15s ease; }
details.panel[open] > summary::before { transform:rotate(90deg); }
details.panel[open] > summary { margin-bottom:8px; }
.panel-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.button { color:#111; background:#fff; border:0; padding:10px 14px; border-radius:10px; text-decoration:none; font-weight:800; cursor:pointer; }
.button.secondary { background:#333; color:#fff; border:1px solid #555; }
.button.compact { padding:6px 9px; font-size:.82rem; }
.button.full { width:100%; margin-top:10px; }
.button:disabled { opacity:.45; cursor:not-allowed; }
.table-wrap { overflow-x:auto; margin-top:14px; }
table { width:100%; border-collapse:collapse; }
th, td { padding:12px 10px; text-align:left; border-bottom:1px solid #333; vertical-align:top; }
th { color:#bbb; font-size:.82rem; }
tfoot th { color:#fff; }
.status { display:inline-block; padding:4px 8px; border-radius:999px; background:#333; white-space:nowrap; }
.status.successful { background:#175c2e; }
.status.pending { background:#745d00; }
.status.failed { background:#7a2020; }
.status.cancelled { background:#555; }
.status.sync_pending { background:#744c00; }
.till-links { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-top:14px; }
.till-link { display:block; background:#2a2a2a; color:#fff; border:1px solid #444; border-radius:12px; padding:18px; text-decoration:none; transition:transform .12s ease,border-color .12s ease; }
.till-link:hover { transform:translateY(-2px); border-color:#777; }
.till-link strong, .till-link span { display:block; }
.till-link span { color:#aaa; margin-top:5px; font-size:.85rem; }
.report-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:14px; }
.report-card { min-width:0; padding:14px; border:1px solid #333; border-radius:12px; background:#181818; }
.daily-taking-days { display:grid; gap:10px; }
.daily-taking-day { border:1px solid #333; border-radius:10px; overflow:hidden; background:#131313; }
.daily-taking-day > summary { display:grid; grid-template-columns:minmax(150px,1.4fr) repeat(4,minmax(90px,auto)); gap:10px; align-items:center; padding:12px; cursor:pointer; list-style-position:inside; }
.daily-taking-day > summary:hover { background:#1c1c1c; }
.daily-taking-day .daily-total { color:#f4c430; font-weight:700; }
.daily-item-breakdown { padding:0 12px 12px; overflow-x:auto; }
.daily-item-breakdown .mini-table { margin-top:0; }
@media (max-width: 760px) {
  .daily-taking-day > summary { grid-template-columns:1fr 1fr; }
  .daily-taking-day > summary > strong, .daily-taking-day > summary .daily-total { grid-column:1 / -1; }
}
.report-card h3 { margin-bottom:8px; color:#f4c430; }
.mini-table td { padding:9px 6px; font-size:.9rem; }
.mini-table td:nth-child(2), .mini-table td:nth-child(3) { text-align:right; white-space:nowrap; }
.mini-table span { display:block; color:#888; font-size:.76rem; }
.editor-grid { display:grid; gap:8px; margin-top:14px; }
.product-row, .category-row, .user-row { display:grid; gap:0; align-items:end; background:#242424; padding:12px; border-radius:10px; border:1px solid transparent; }
.product-row:focus-within, .category-row:focus-within, .user-row:focus-within { border-color:#555; }
.product-row.expanded { grid-template-columns:auto 2fr 1.4fr .8fr auto auto auto; }
.category-row { grid-template-columns:auto 1.35fr auto 2.4fr auto; }
.user-row { grid-template-columns:1.25fr 1fr .75fr auto auto auto; }
.product-row label, .category-row label, .user-row label { color:#bbb; font-size:.78rem; }
.product-row input, .product-row select, .category-row input, .user-row input, .user-row select { width:100%; margin-top:4px; background:#111; color:#fff; border:1px solid #555; border-radius:8px; padding:9px; }
.check { align-self:center; white-space:nowrap; color:#ddd !important; }
.check input { width:auto !important; margin:0 5px 0 0 !important; }
.check-group { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.pill-check { display:inline-flex; align-items:center; padding:7px 9px; border:1px solid #444; border-radius:999px; background:#191919; font-size:.76rem !important; }
.account-state { align-self:center; color:#a9a9a9; font-size:.78rem; white-space:nowrap; }
.form-grid { display:grid; grid-template-columns:1fr 2fr 1fr auto; gap:10px; margin-top:18px; padding-top:16px; border-top:1px solid #333; }
.form-grid input, .form-grid select, .operator-strip select { min-width:0; background:#111; color:#fff; border:1px solid #555; border-radius:8px; padding:11px; }
.category-add { grid-template-columns:1.2fr .5fr 2fr auto; }
.product-add { grid-template-columns:1fr 1.5fr .65fr auto auto; }
.user-add { grid-template-columns:1.2fr 1fr .7fr auto; }
.detail-grid { display:grid; grid-template-columns:max-content minmax(0,1fr); gap:8px 14px; margin:16px 0; }
.detail-grid dt { color:#999; }
.detail-grid dd { margin:0; overflow-wrap:anywhere; }
.mono { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:.85rem; }
dialog { width:min(820px, calc(100% - 24px)); max-height:90vh; padding:0; border:1px solid #555; border-radius:14px; color:#fff; background:#191919; box-shadow:0 30px 90px rgba(0,0,0,.7); }
dialog::backdrop { background:rgba(0,0,0,.72); backdrop-filter:blur(3px); }
.dialog-shell { padding:18px; overflow:auto; max-height:90vh; }
.toast { position:fixed; z-index:100; right:18px; bottom:18px; max-width:min(420px,calc(100% - 36px)); padding:12px 16px; border-radius:10px; background:#277448; color:#fff; box-shadow:0 12px 35px rgba(0,0,0,.45); font-weight:700; }
.toast.error { background:#8d2727; }
.hidden { display:none !important; }

/* Till interface */
.till-main { max-width:none; display:grid; grid-template-columns:minmax(0,1fr) 380px; gap:16px; align-items:start; }
.operator-strip { grid-column:1/-1; display:flex; justify-content:space-between; align-items:center; padding:12px 16px; }
.catalogue { display:grid; gap:14px; }
.category { padding:14px; }
.category h2 { margin-bottom:12px; }
.product-buttons { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; }
.product-button { min-height:100px; border:2px solid #444; background:#292929; color:#fff; border-radius:14px; padding:12px; cursor:pointer; }
.product-button:active { transform:scale(.98); background:#3a3a3a; }
.product-button strong, .product-button span { display:block; }
.product-button strong { font-size:1.15rem; }
.product-button span { margin-top:10px; font-size:1.25rem; color:#f4c430; }
.product-button.supervisor { opacity:.45; }
.basket-panel { position:sticky; top:12px; padding:16px; }
.basket-row { display:grid; grid-template-columns:1fr auto auto; gap:10px; align-items:center; padding:12px 0; border-bottom:1px solid #333; }
.basket-row span { display:block; color:#aaa; font-size:.8rem; }
.qty { display:flex; align-items:center; gap:8px; }
.qty button { width:34px; height:34px; border:0; border-radius:50%; font-size:1.25rem; cursor:pointer; }
.basket-total { display:flex; justify-content:space-between; align-items:center; padding:18px 0; font-size:1.4rem; }
.payment-actions { display:grid; gap:10px; }
.pay { border:0; border-radius:14px; padding:20px 12px; font-weight:900; font-size:1.05rem; cursor:pointer; }
.pay:disabled { opacity:.4; cursor:not-allowed; }
.pay.cash { background:#2fb463; color:#08180e; }
.pay.card { background:#4a8ef0; color:#071221; }
.pay.fail { background:#d64242; color:#fff; }
.pay.cancel { background:#777; color:#fff; }
.result-screen { position:fixed; inset:0; z-index:50; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:20px; padding:24px; text-align:center; background:#173c24; }
.result-screen.failed { background:#6a1717; }
.result-screen.cancelled { background:#444; }
.result-screen.unknown { background:#7a5f00; }
.result-screen.card.test { background:#153660; }
.result-logo { width:min(300px,65vw); max-height:160px; }
.result-word { font-size:clamp(3rem,12vw,8rem); font-weight:1000; letter-spacing:.04em; }
.simulator { display:grid; gap:12px; width:min(480px,100%); background:rgba(0,0,0,.25); padding:18px; border-radius:14px; }
.admin-link { margin-left:auto; }

@media (max-width:1100px) {
  .summary.six { grid-template-columns:repeat(3,1fr); }
  .product-row.expanded { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .category-row { grid-template-columns:1fr .4fr auto; }
  .category-row .check-group { grid-column:1/-2; }
  .user-row { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:800px) {
  .summary, .summary.six { grid-template-columns:repeat(2,1fr); }
  .till-links { grid-template-columns:repeat(2,1fr); }
  .report-grid { grid-template-columns:1fr; }
  .product-row.expanded, .category-row, .user-row { grid-template-columns:1fr 1fr; }
  .product-row .button, .category-row .button, .user-row .button { width:100%; }
  .category-row .check-group { grid-column:1/-1; }
  .form-grid, .category-add, .product-add, .user-add { grid-template-columns:1fr; }
  .till-main { grid-template-columns:1fr; }
  .basket-panel { position:static; }
  .warning-card { align-items:flex-start; flex-direction:column; }
}
@media (max-width:520px) {
  main { padding:10px; }
  .summary, .summary.six, .till-links { grid-template-columns:1fr 1fr; }
  .topbar { align-items:flex-start; }
  .logo { width:72px; }
  .admin-link { padding:8px 10px; }
  .product-buttons { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .product-button { min-height:92px; }
  .till-main { padding:10px; }
  .operator-strip { align-items:flex-start; gap:10px; flex-direction:column; }
  .product-row.expanded, .category-row, .user-row { grid-template-columns:1fr; }
  .category-row .check-group { grid-column:auto; }
  .panel-heading { align-items:flex-start; flex-direction:column; }
  .detail-grid { grid-template-columns:1fr; gap:3px; }
  .detail-grid dd { margin-bottom:8px; }
}

/* Authentication */
.login-body { min-height:100vh; background:radial-gradient(circle at 50% 10%,rgba(165,24,24,.25),transparent 38%),#0d0d0d; }
.login-shell { width:min(480px,calc(100% - 24px)); min-height:calc(100vh - 35px); display:flex; flex-direction:column; justify-content:center; gap:22px; padding:32px 0; }
.login-logo { width:min(360px,90%); max-height:170px; object-fit:contain; align-self:center; }
.login-card { padding:22px; border:1px solid #3b3b3b; border-radius:16px; background:#1a1a1a; box-shadow:0 24px 70px rgba(0,0,0,.45); }
.login-form { display:grid; gap:14px; margin-top:18px; }
.login-form label { display:grid; gap:6px; color:#bbb; font-size:.85rem; }
.login-form input { width:100%; padding:13px; border:1px solid #555; border-radius:9px; color:#fff; background:#0f0f0f; }
.form-message { min-height:1.4em; margin-top:14px; color:#ff8f8f; }
.form-message.success { color:#82dda1; }
.auth-controls { margin-left:auto; display:flex; align-items:center; gap:9px; }
.auth-controls span { color:#bbb; font-size:.82rem; }
.action-group { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.token-output { margin-top:10px; padding:10px; border:1px solid #735f14; border-radius:9px; background:#2b260f; color:#f4df8d; overflow-wrap:anywhere; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:.78rem; }


/* Rally admin device and refund controls */
.device-row { display:grid; grid-template-columns:1fr 1.4fr 1.2fr auto auto; gap:10px; align-items:end; background:#242424; padding:12px; border-radius:10px; border:1px solid transparent; }
.device-row:focus-within { border-color:#555; }
.device-row > div:first-child { align-self:center; }
.device-row > div:first-child strong, .device-row > div:first-child span { display:block; }
.device-row > div:first-child span, .subtle { color:#999; font-size:.76rem; margin-top:3px; }
.device-row label { color:#bbb; font-size:.78rem; }
.device-row input, .device-row select { width:100%; margin-top:4px; background:#111; color:#fff; border:1px solid #555; border-radius:8px; padding:9px; }
.secret-value { margin:.55rem 0; padding:.65rem; background:#111; border-radius:7px; user-select:all; }
.status.requested { background:#745d00; }
.status.approved { background:#225b78; }
.status.rejected { background:#7a2020; }
.status.completed { background:#175c2e; }
@media (max-width:900px) { .device-row { grid-template-columns:1fr 1fr; } }
@media (max-width:520px) { .device-row { grid-template-columns:1fr; } }

.subheading { margin-top:18px; color:#f4c430; }
.till-row { display:grid; grid-template-columns:1fr 1.5fr auto auto; gap:10px; align-items:end; background:#242424; padding:12px; border-radius:10px; border:1px solid transparent; }
.till-row:focus-within { border-color:#555; }
.till-row > div strong, .till-row > div span { display:block; }
.till-row > div span { color:#999; font-size:.76rem; margin-top:3px; }
.till-row label { color:#bbb; font-size:.78rem; }
.till-row input { width:100%; margin-top:4px; background:#111; color:#fff; border:1px solid #555; border-radius:8px; padding:9px; }
@media (max-width:700px) { .till-row { grid-template-columns:1fr 1fr; } }
@media (max-width:520px) { .till-row { grid-template-columns:1fr; } }

.feedback-form { display:grid; grid-template-columns:1.3fr 1fr auto; gap:12px; align-items:end; margin:14px 0 20px; }
.feedback-form label { color:#bbb; font-size:.82rem; }
.feedback-form input, .feedback-form textarea { width:100%; margin-top:5px; background:#111; color:#fff; border:1px solid #555; border-radius:9px; padding:10px; font:inherit; }
.feedback-detail { grid-column:1 / -2; }
.feedback-form textarea { min-height:110px; resize:vertical; }
.feedback-list { display:grid; gap:12px; }
.feedback-item { background:#242424; border:1px solid #444; border-left:5px solid #f4c430; border-radius:12px; padding:14px; }
.feedback-item.status-planned { border-left-color:#61a7ff; }
.feedback-item.status-done { border-left-color:#66d08a; opacity:.85; }
.feedback-item.status-rejected { border-left-color:#888; opacity:.75; }
.feedback-heading { display:flex; justify-content:space-between; gap:14px; align-items:start; }
.feedback-heading h3 { margin:0 0 5px; }
.feedback-heading p, .feedback-copy { white-space:pre-wrap; overflow-wrap:anywhere; }
.feedback-heading p { margin:0; color:#aaa; font-size:.8rem; }
.feedback-heading label { min-width:135px; color:#bbb; font-size:.78rem; }
.feedback-heading select { width:100%; margin-top:4px; background:#111; color:#fff; border:1px solid #555; border-radius:8px; padding:8px; }
.feedback-copy { margin:14px 0 0; line-height:1.5; }
@media (max-width:720px) { .feedback-form { grid-template-columns:1fr; } .feedback-detail { grid-column:auto; } .feedback-heading { flex-direction:column; } .feedback-heading label { width:100%; } }

.payment-recovery { margin:9px 0; padding:11px 12px; border:2px solid #a83a3a; border-radius:10px; background:#321414; display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; }
.payment-recovery strong { color:#ff9d9d; font-size:.9rem; }
.payment-recovery span { color:#f0caca; font-size:.8rem; flex:1 1 260px; }
.payment-recovery .button { margin-left:auto; }
.button.danger { background:#7a2020; border-color:#a83a3a; color:#fff; }
.button.danger:hover { background:#962b2b; }
.actor-note { align-self:stretch; display:flex; flex-direction:column; justify-content:center; gap:4px; padding:9px 11px; border:1px solid #444; border-radius:8px; background:#1b1b1b; color:#aaa; font-size:.78rem; }
.actor-note strong { color:#fff; font-size:.9rem; }

.user-row.read-only { opacity:.82; border-color:#3d3d3d; }
.read-only-role { display:block; margin-top:4px; padding:9px; border:1px solid #444; border-radius:8px; background:#181818; color:#ddd; text-transform:capitalize; }

.till-permissions { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:8px 18px; border:1px solid #444; border-radius:9px; padding:9px 12px; min-width:0; }
.till-permissions legend { color:#bbb; padding:0 6px; }
.till-permissions .check { margin:0; min-width:120px; }
.all-tills-note { grid-column:1 / -1; color:#ddd; background:#1b1b1b; border:1px solid #444; border-radius:9px; padding:10px; }
.qr-dialog-shell { max-width:620px; text-align:center; }
.qr-code { background:#fff; border-radius:12px; padding:16px; margin:12px auto; width:min(82vw,420px); }
.qr-code svg { width:100%; height:auto; display:block; }
.qr-person { font-size:1.35rem; font-weight:700; }
.qr-steps { text-align:left; line-height:1.6; }


/* Scheduled Happy Hour and deal pricing */
.price-schedule-row { display:grid; gap:12px; margin-top:12px; padding:14px; border:1px solid #444; border-radius:12px; background:#242424; }
.price-schedule-row.active-now { border-color:#f4c430; box-shadow:0 0 0 1px #f4c430 inset; }
.deal-heading { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.deal-heading strong { color:#f4c430; }
.deal-heading span { color:#aaa; font-size:.82rem; }
.price-schedule-grid { display:grid; grid-template-columns:2fr repeat(4,minmax(120px,1fr)) auto; gap:10px; align-items:end; }
.price-schedule-grid label { color:#bbb; font-size:.78rem; }
.price-schedule-grid input { width:100%; margin-top:4px; background:#111; color:#fff; border:1px solid #555; border-radius:8px; padding:9px; }
.deal-weekdays, .deal-products { border:1px solid #444; border-radius:10px; padding:10px 12px; min-width:0; }
.deal-weekdays legend, .deal-products legend { color:#bbb; padding:0 6px; }
.deal-product-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.deal-product { display:grid; grid-template-columns:auto minmax(0,1fr) 110px; gap:9px; align-items:center; padding:8px; border:1px solid #3c3c3c; border-radius:9px; background:#1a1a1a; }
.deal-product span, .deal-product small { display:block; min-width:0; }
.deal-product small { margin-top:2px; color:#999; font-size:.72rem; }
.deal-product input[type="number"] { width:100%; min-width:0; background:#111; color:#fff; border:1px solid #555; border-radius:7px; padding:8px; }
.product-button .base-price { margin-top:3px; color:#999; font-size:.75rem; text-decoration:line-through; }
.product-button .deal-label { margin-top:3px; color:#9fe0ad; font-size:.72rem; font-weight:800; }
.basket-row .deal-basket { color:#9fe0ad; font-weight:700; }
@media (max-width:1000px) { .price-schedule-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:800px) { .deal-product-grid { grid-template-columns:1fr; } .price-schedule-grid { grid-template-columns:1fr 1fr; } }
@media (max-width:520px) { .price-schedule-grid { grid-template-columns:1fr; } .deal-heading { align-items:flex-start; flex-direction:column; } .deal-product { grid-template-columns:auto minmax(0,1fr); } .deal-product input[type="number"] { grid-column:2; } }


/* Production supervisor usability */
.quick-number { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#f4c430; color:#111; font-weight:900; }
.phone-guide { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:14px 0; }
.phone-guide article { padding:14px; border:1px solid #444; border-radius:12px; background:#222; }
.phone-guide strong { display:block; margin:5px 0 8px; font-size:1.05rem; }
.phone-guide ol { margin:0; padding-left:1.25rem; color:#ddd; line-height:1.55; }
.guide-label, .request-kicker { display:inline-block; color:#111; background:#f4c430; border-radius:999px; padding:4px 8px; font-size:.72rem; font-weight:900; text-transform:uppercase; letter-spacing:.03em; }
.onboarding-actions { margin:14px 0 2px; }
.advanced-box { margin-top:16px; padding:12px; border:1px solid #3e3e3e; border-radius:10px; background:#181818; }
.advanced-box > summary { cursor:pointer; }
.byod-approval-row, .phone-assignment-row, .operator-terminal-row { display:grid; grid-template-columns:minmax(220px,1.5fr) minmax(180px,1fr) auto; gap:10px; align-items:end; padding:13px; border:1px solid #444; border-radius:11px; background:#242424; }
.phone-request-copy strong, .phone-request-copy span { display:block; }
.phone-request-copy strong { margin-top:7px; font-size:1.05rem; }
.phone-request-copy span:last-child { margin-top:3px; color:#aaa; font-size:.8rem; }
.byod-approval-row label, .phone-assignment-row label { color:#bbb; font-size:.78rem; }
.byod-approval-row select, .phone-assignment-row select { width:100%; margin-top:4px; padding:9px; border:1px solid #555; border-radius:8px; background:#111; color:#fff; }
.empty-state { margin-top:10px; padding:12px; border:1px dashed #444; border-radius:10px; color:#aaa; background:#171717; }
@media (max-width:800px) { .phone-guide { grid-template-columns:1fr; } .byod-approval-row, .phone-assignment-row, .operator-terminal-row { grid-template-columns:1fr; } }

.drag-handle { align-self:center; cursor:grab; user-select:none; padding:9px 11px; border:1px solid #555; border-radius:8px; background:#181818; color:#ddd; font-size:1.25rem; line-height:1; }
.drag-handle:active { cursor:grabbing; }
.sortable-row.dragging { opacity:.45; border-color:#f4c430; }
@media (max-width:700px) { .category-row, .product-row.expanded { grid-template-columns:auto minmax(0,1fr); } .drag-handle { grid-row:1 / span 2; } }


/* Mobile-first supervisor admin: site use on iPhone/Android */
body { overflow-x:hidden; }
.admin-tabs { -webkit-overflow-scrolling:touch; scrollbar-width:none; overscroll-behavior-x:contain; }
.admin-tabs::-webkit-scrollbar { display:none; }
.drag-handle { touch-action:none; min-width:44px; min-height:44px; display:grid; place-items:center; }
body.ordering-active { user-select:none; -webkit-user-select:none; }
.table-wrap { -webkit-overflow-scrolling:touch; }

@media (max-width:760px) {
  html { scroll-padding-top:72px; }
  body { padding-bottom:env(safe-area-inset-bottom); }
  main { width:100%; padding:10px max(10px, env(safe-area-inset-right)) 18px max(10px, env(safe-area-inset-left)); }
  .topbar { flex-wrap:wrap; gap:9px 12px; padding:max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 10px max(10px, env(safe-area-inset-left)); }
  .topbar .logo { width:58px; height:auto; max-height:52px; }
  .topbar > div:not(.auth-controls) { flex:1 1 220px; min-width:0; }
  .topbar h1 { font-size:1.25rem; }
  .topbar p { font-size:.8rem; line-height:1.3; }
  .auth-controls { width:100%; margin-left:0; justify-content:space-between; min-width:0; }
  .auth-controls span { min-width:0; overflow-wrap:anywhere; }

  .admin-tabs { top:0; margin:0 -10px 12px; padding:8px max(10px, env(safe-area-inset-left)); border-left:0; border-right:0; border-radius:0; scroll-snap-type:x proximity; }
  .admin-tab { min-height:44px; padding:10px 14px; scroll-snap-align:start; }
  .panel { padding:12px; margin-bottom:12px; border-radius:12px; }
  details.panel > summary { min-height:44px; }
  details.panel > summary h2, .panel h2 { font-size:1.1rem; }

  input, select, textarea { font-size:16px !important; }
  .button, button { min-height:44px; }
  .button.compact { min-height:44px; padding:9px 11px; }
  .pill-check { min-height:44px; padding:9px 11px; }
  .check-group { gap:8px; }
  .account-state { white-space:normal; overflow-wrap:anywhere; }
  .till-permissions { padding:10px; gap:8px; }
  .till-permissions .check { flex:1 1 145px; min-width:0; }

  .category-row { grid-template-columns:44px minmax(0,1fr) auto !important; gap:6px 8px; align-items:start; padding:8px; }
  .category-row > .drag-handle { grid-column:1; grid-row:1 / span 3; align-self:start; }
  .category-row > label:not(.check) { grid-column:2 / 4 !important; grid-row:1; }
  .category-row > label.check { grid-column:2 !important; grid-row:2; align-self:center; }
  .category-row > .button { grid-column:3 !important; grid-row:2; width:auto; min-width:86px; padding-left:12px; padding-right:12px; }
  .category-row > .check-group { grid-column:2 / 4 !important; grid-row:3; gap:4px; }
  .category-row .pill-check { padding:7px 9px; }

  .product-row.expanded { grid-template-columns:44px minmax(0,1fr) !important; align-items:start; }
  .product-row.expanded > .drag-handle { grid-column:1; grid-row:1 / span 6; align-self:start; }
  .product-row.expanded > :not(.drag-handle):not(input[type="hidden"]) { grid-column:2; }

  .user-row, .device-row, .till-row, .byod-approval-row, .phone-assignment-row, .operator-terminal-row { grid-template-columns:1fr !important; }
  .action-group { width:100%; display:grid; grid-template-columns:1fr; gap:8px; }
  .action-group .button, .action-group button { width:100%; margin:0; }
  .form-grid, .category-add, .product-add, .user-add { grid-template-columns:1fr !important; }

  .summary, .summary.six { gap:8px; }
  .summary article { padding:11px; }
  .summary span { font-size:.76rem; }
  .summary strong { font-size:1.2rem; }

  .table-wrap { margin-left:-4px; margin-right:-4px; padding-bottom:4px; }
  .table-wrap > table { min-width:680px; }
  th, td { padding:10px 8px; }
  dialog { width:calc(100% - 12px); max-height:96dvh; border-radius:12px; }
  .dialog-shell { max-height:96dvh; padding:14px; }
  .qr-code { width:min(86vw,420px); padding:10px; }
  .toast { left:10px; right:10px; bottom:max(10px, env(safe-area-inset-bottom)); max-width:none; }
}

@media (max-width:430px) {
  .summary, .summary.six { grid-template-columns:1fr 1fr; }
  .admin-tab { font-size:.85rem; }
  .panel-heading { gap:8px; }
}


/* Shed temperature dashboard */
.summary.five { grid-template-columns:repeat(5,minmax(0,1fr)); }
.shed-temperature-panel { overflow:hidden; }
.shed-temperature-summary { margin:14px 0; }
.shed-temperature-summary article { min-height:104px; }
.shed-temperature-summary small { display:block; margin-top:7px; color:#999; line-height:1.3; }
.shed-temperature-ranges { flex-wrap:wrap; }
.temperature-range.active { color:#111; background:#f4c430; border-color:#f4c430; }
.temperature-chart-wrap { position:relative; width:100%; height:420px; margin-top:12px; border:1px solid #333; border-radius:12px; background:#141414; overflow:hidden; }
#shed-temperature-chart { display:block; width:100%; height:100%; }
.temperature-legend { display:flex; flex-wrap:wrap; gap:10px 18px; margin:12px 2px 0; color:#ccc; font-size:.9rem; }
.temperature-legend span { display:inline-flex; align-items:center; gap:7px; }
.temperature-legend i { width:18px; height:4px; border-radius:999px; background:var(--legend); box-shadow:0 0 0 1px rgba(255,255,255,.08); }
.temperature-explainer { max-width:1000px; margin-top:14px; line-height:1.45; }
@media (max-width:900px) {
  .summary.five { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .temperature-chart-wrap { height:360px; }
}
@media (max-width:520px) {
  .summary.five { grid-template-columns:1fr 1fr; }
  .temperature-chart-wrap { height:320px; margin-left:-4px; width:calc(100% + 8px); }
  .temperature-legend { gap:8px 12px; font-size:.8rem; }
}


/* Manual live backend switch */
.backend-switch-panel { border:1px solid #4a4a4a; }
.backend-switch-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:14px; }
.backend-switch-card { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:12px; align-items:center; padding:14px; border:1px solid #444; border-radius:12px; background:#202020; }
.backend-switch-card.active { border-color:#f4c430; box-shadow:0 0 0 1px #f4c430 inset; }
.backend-switch-card > div { min-width:0; display:flex; flex-direction:column; gap:4px; }
.backend-switch-card > div span { color:#aaa; font-size:.82rem; }
.backend-switch-card.active > div strong::after { content:" · LIVE"; color:#f4c430; }
.backend-switch-note { margin:12px 2px 0; }
@media (max-width:760px) {
  .backend-switch-grid { grid-template-columns:1fr; }
  .backend-switch-card { grid-template-columns:minmax(0,1fr) auto; }
  .backend-switch-card .button { grid-column:1 / -1; width:100%; }
}

/* Bar sales staffing trend */
.bar-sales-chart-wrap { position:relative; width:100%; height:440px; margin-top:12px; border:1px solid #333; border-radius:12px; background:#141414; overflow:hidden; }
#bar-sales-chart, #overall-sales-chart { display:block; width:100%; height:100%; }
.bar-sales-legend { display:flex; flex-wrap:wrap; gap:10px 18px; margin:12px 2px 0; color:#ccc; font-size:.9rem; }
.bar-sales-legend span { display:inline-flex; align-items:center; gap:7px; }
.bar-sales-legend i { width:18px; height:4px; border-radius:999px; background:var(--legend); box-shadow:0 0 0 1px rgba(255,255,255,.08); }
.bar-sales-daily { margin-top:14px; }
.bar-sales-explainer { margin-top:12px; }
@media (max-width: 760px) {
  .bar-sales-chart-wrap { height:360px; }
}
@media (max-width: 520px) {
  .bar-sales-chart-wrap { height:320px; margin-left:-4px; width:calc(100% + 8px); }
  .bar-sales-legend { gap:8px 12px; font-size:.8rem; }
}

.content-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}
.content-photo-card{background:#111;border:1px solid #34312d;border-radius:8px;overflow:hidden}
.content-photo-card img{display:block;width:100%;height:220px;object-fit:cover;background:#050505}
.content-card-body{padding:14px}
.content-card-body>strong{font-size:1.05rem}
.content-card-body p{margin:.55rem 0}
.content-review-card .feedback-heading{align-items:flex-start}
@media(max-width:700px){.content-photo-card img{height:190px}}

.ticket-stock-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.ticket-stock-grid article strong{font-size:2rem}
.ticket-stock-grid article small{display:block;margin-top:.35rem;color:var(--muted,#aaa)}
@media(max-width:700px){.ticket-stock-grid{grid-template-columns:1fr}}

.booking-list{display:grid;gap:14px}
.booking-card{background:#111;border:1px solid #34312d;border-radius:8px;padding:16px}
.booking-card.status-paid{border-left:4px solid #2f9d62}
.booking-card.status-checkout_pending{border-left:4px solid #d7952e}
.booking-card.status-cancelled,.booking-card.status-expired{opacity:.72}
.booking-heading{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.booking-heading h3{margin:.45rem 0 .1rem}
.booking-total{font:900 1.7rem "Barlow Condensed",Arial,sans-serif}
.booking-contact{display:flex;flex-wrap:wrap;gap:8px 16px;margin:10px 0 14px;color:#bdb6ac;font-size:.9rem}
.booking-items{border-top:1px solid #302d29}
.booking-line{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid #26231f}
.booking-line>div{min-width:0}
.booking-line small{display:block;margin-top:3px;color:#aaa}
.booking-actions{margin-top:14px}
@media(max-width:700px){.booking-heading,.booking-line{gap:10px}.booking-heading{flex-direction:column}.booking-total{font-size:1.45rem}}


/* Admin v38: cleaner navigation and compact catalogue */
.admin-page-link{flex:0 0 auto;padding:9px 13px;border:1px solid #555;border-radius:8px;color:#f4c430;background:#202020;font-size:.9rem;font-weight:800;text-decoration:none}
.admin-page-link:hover{border-color:#f4c430;background:#292929}
.admin-page-link.ticket-sales-link{background:#f4c430;color:#111;border-color:#f4c430}
.catalogue-items-panel{overflow:visible}
.add-product-box{margin:14px 0 18px;border:1px solid #444;border-radius:10px;background:#181818}
.add-product-box>summary{cursor:pointer;padding:12px 14px}
.add-product-box .product-add{margin:0;padding:14px;border-top:1px solid #333}
.catalogue-product-group+.catalogue-product-group{margin-top:24px;padding-top:20px;border-top:1px solid #393939}
.catalogue-group-heading{display:flex;align-items:center;gap:9px;margin-bottom:10px}
.catalogue-group-heading h3{font-size:1.05rem}
.catalogue-group-heading span{display:inline-grid;place-items:center;min-width:25px;height:25px;padding:0 7px;border-radius:999px;background:#333;color:#ddd;font-size:.75rem;font-weight:900}
.product-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px;align-items:start}
.product-card{min-width:0;border:1px solid #3c3c3c;border-radius:11px;background:#202020;overflow:hidden}
.product-card[open]{grid-column:span 2;border-color:#686868}
.product-card.disabled{opacity:.78;background:#171717;border-style:dashed}
.product-card-summary{
  display:grid !important;
  grid-template-columns:34px minmax(0,1fr) !important;
  grid-template-rows:auto 34px !important;
  gap:7px 9px !important;
  align-items:center !important;
  align-content:start !important;
  min-height:88px !important;
  padding:9px 10px !important;
  cursor:pointer;
  list-style:none;
}
.product-card-summary::-webkit-details-marker{display:none}
.product-card-summary::marker{content:""}
.product-card-summary .drag-handle{
  grid-column:1 !important;
  grid-row:2 !important;
  width:34px;
  min-width:34px;
  min-height:34px;
  height:34px;
  padding:0;
  font-size:1rem;
}
.product-card-name{
  grid-column:1 / -1 !important;
  grid-row:1 !important;
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 0 7px !important;
  border-bottom:1px solid #353535;
  color:#f2f2f2 !important;
  font-size:.78rem !important;
  line-height:1.15 !important;
  font-weight:800 !important;
  letter-spacing:0 !important;
  text-transform:none !important;
  white-space:normal !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  max-height:2.45em !important;
}
.product-card-price{
  grid-column:2 !important;
  grid-row:2 !important;
  justify-self:end !important;
  align-self:center !important;
  color:#f4c430 !important;
  white-space:nowrap !important;
  font-size:1rem !important;
  line-height:1 !important;
}
.product-disabled-mark{display:grid;place-items:center;min-width:34px;height:28px;border-radius:999px;background:#3b2525;color:#ffb4b4;font-size:.65rem;font-weight:900;text-transform:uppercase}
.product-editor{display:grid;grid-template-columns:1.3fr .65fr 1fr;gap:10px;padding:12px;border-top:1px solid #3b3b3b;background:#181818}
.product-editor label:not(.check),.product-till-block>span{color:#bbb;font-size:.76rem}
.product-editor input:not([type="checkbox"]),.product-editor select{width:100%;margin-top:4px;padding:9px;border:1px solid #555;border-radius:8px;background:#101010;color:#fff}
.product-editor .check{align-self:center}
.product-till-block{grid-column:1/-1}
.product-till-block>span{display:block;margin-bottom:7px}
.product-card-actions{grid-column:1/-1;display:flex;gap:9px;justify-content:flex-end}
.disabled-products>.muted{margin-bottom:10px;max-width:850px}
body.ordering-active #products details.product-card{pointer-events:none}
body.ordering-active #products .drag-handle{pointer-events:auto}
@media(max-width:760px){
  .product-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .product-card[open]{grid-column:1/-1}
  .product-card-summary{grid-template-columns:34px minmax(0,1fr) !important;grid-template-rows:auto 34px !important;min-height:86px !important}
  .product-card-name{font-size:.72rem !important}
  .product-card-price{grid-column:2 !important;grid-row:2 !important;font-size:.92rem !important}
  .product-editor{grid-template-columns:1fr}
  .product-till-block,.product-card-actions{grid-column:1}
}


/* Environment safety banner */
.environment-banner{
  position:sticky;
  top:0;
  z-index:1000;
  padding:9px 14px;
  background:#ffd84d;
  color:#111;
  border-bottom:2px solid #111;
  text-align:center;
  font-weight:950;
  font-size:.88rem;
  letter-spacing:.055em;
  text-transform:uppercase;
}
.environment-banner[hidden]{display:none}
body.environment-dev .topbar{border-top:0}

.newsletter-subscriber-form{display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:10px;align-items:end;margin-bottom:12px}
.newsletter-subscriber-form label{display:grid;gap:6px}
.newsletter-subscriber-form input{min-width:0;background:#111;color:#fff;border:1px solid #555;border-radius:8px;padding:11px}
.newsletter-subscriber-meta{font-size:.78rem;color:#aaa;margin:6px 0 0}
@media(max-width:700px){.newsletter-subscriber-form{grid-template-columns:1fr}.newsletter-subscriber-form .action-group{grid-template-columns:1fr 1fr}}

.admin-photo-bulk-form{display:grid;grid-template-columns:150px minmax(260px,1fr) auto auto;gap:12px;align-items:end;margin-top:16px}
.admin-photo-bulk-form label{display:grid;gap:6px;font-weight:750}
.admin-photo-bulk-form select,.admin-photo-bulk-form input[type="file"]{min-width:0;background:#111;color:#fff;border:1px solid #555;border-radius:8px;padding:10px}
.admin-photo-auto{display:flex!important;grid-template-columns:auto 1fr;align-items:center!important;gap:8px!important;padding-bottom:11px}
@media(max-width:900px){.admin-photo-bulk-form{grid-template-columns:1fr 1fr}.admin-photo-auto{padding-bottom:0}}
@media(max-width:620px){.admin-photo-bulk-form{grid-template-columns:1fr}.admin-photo-bulk-form .button{width:100%}}

.photo-caption-edit{display:grid;gap:5px;margin:10px 0 8px;color:#bbb;font-size:.78rem;font-weight:800}
.photo-caption-edit textarea{width:100%;resize:vertical;min-height:58px;padding:9px;border:1px solid #555;border-radius:8px;background:#0d0d0d;color:#fff;font:inherit}


.admin-menu-label{display:none}
.content-photo-caption-wrap{display:grid;gap:6px;margin:12px 0;color:#bbb;font-size:.78rem;font-weight:700}
.content-photo-caption{width:100%;min-height:66px;resize:vertical;background:#090909;color:#fff;border:1px solid #555;border-radius:8px;padding:9px;font:inherit;line-height:1.35}
.content-photo-caption:focus-visible{outline:3px solid #f4c430;outline-offset:2px}
@media (min-width:901px){
  .admin-main{max-width:1480px;display:grid;grid-template-columns:190px minmax(0,1fr);column-gap:18px;align-items:start}
  .admin-main>.admin-tabs{grid-column:1;grid-row:1 / span 250;position:sticky;top:18px;align-self:start;display:flex;flex-direction:column;gap:5px;overflow-y:auto;overflow-x:hidden;max-height:calc(100vh - 36px);margin:0;padding:10px;background:rgba(20,20,20,.98)}
  .admin-main>.admin-tabs .admin-menu-label{display:block;margin:11px 8px 4px;color:#777;font-size:.67rem;font-weight:900;text-transform:uppercase;letter-spacing:.1em}
  .admin-main>.admin-tabs .admin-menu-label:first-child{margin-top:3px}
  .admin-main>.admin-tabs .admin-tab{width:100%;text-align:left;padding:3px 5px;border-radius:0}
  .admin-main>:not(.admin-tabs){grid-column:2;min-width:0}
}

.admin-menu-toggle{display:none}
@media(max-width:900px){
  .admin-main{display:block}
  .admin-menu-toggle{
    position:fixed;
    top:10px;
    right:10px;
    z-index:40;
    display:flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:38px;
    margin:0;
    padding:0;
    border:1px solid #4b4b4b;
    border-radius:0;
    background:#161616;
    color:#fff;
    font-size:0;
    line-height:1;
    box-shadow:0 4px 14px rgba(0,0,0,.45);
  }
  .admin-menu-toggle span{font-size:1.35rem;line-height:1}
  .admin-main>.admin-tabs{
    display:none;
    position:fixed;
    top:54px;
    right:10px;
    z-index:39;
    width:min(280px,calc(100vw - 20px));
    max-height:calc(100vh - 64px);
    overflow-y:auto;
    margin:0;
    padding:8px;
    border:1px solid #3b3b3b;
    background:rgba(16,16,16,.98);
    box-shadow:0 12px 28px rgba(0,0,0,.55);
  }
  .admin-main>.admin-tabs.mobile-open{display:flex;flex-direction:column;gap:3px}
  .admin-main>.admin-tabs .admin-menu-label{display:block;margin:9px 5px 3px;color:#777;font-size:.67rem;font-weight:900;text-transform:uppercase;letter-spacing:.1em}
  .admin-main>.admin-tabs .admin-menu-label:first-child{margin-top:2px}
  .admin-main>.admin-tabs .admin-tab{width:100%;text-align:left;padding:8px 9px;border-radius:0}
}

.review-admin-section{margin-top:22px;padding-top:18px;border-top:1px solid #3a3a3a}
.review-admin-section:first-of-type{margin-top:6px;padding-top:0;border-top:0}
.review-admin-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.review-order-title{display:flex;align-items:center;gap:12px}
.review-drag-handle{font-size:1.25rem;color:#aaa;cursor:grab;user-select:none}
.published-review-card{cursor:grab}
.published-review-card.dragging{opacity:.5;border-style:dashed}
.review-order-list{display:grid;gap:10px}


/* Compact square admin UI. */
body.admin-dashboard{
  font-size:13px;
}
body.admin-dashboard *{
  border-radius:0 !important;
}
body.admin-dashboard main{
  padding:12px;
}
body.admin-dashboard .topbar{
  gap:10px;
  padding:10px 12px;
}
body.admin-dashboard .logo{
  width:78px;
  max-height:58px;
}
body.admin-dashboard h1{font-size:1.2rem}
body.admin-dashboard h2{font-size:1rem}
body.admin-dashboard h3{font-size:.84rem}
body.admin-dashboard .panel{
  padding:10px;
  margin-bottom:10px;
}
body.admin-dashboard .summary{
  gap:8px;
  margin-bottom:10px;
}
body.admin-dashboard .summary article{
  padding:10px;
}
body.admin-dashboard .summary span{
  font-size:.7rem;
}
body.admin-dashboard .summary strong{
  margin-top:3px;
  font-size:1.05rem;
}
body.admin-dashboard .panel-heading{
  gap:8px;
}
body.admin-dashboard .button{
  padding:7px 10px;
  font-size:.74rem;
}
body.admin-dashboard .button.compact{
  padding:4px 7px;
  font-size:.68rem;
}
body.admin-dashboard input:not([type="checkbox"]):not([type="radio"]),
body.admin-dashboard select,
body.admin-dashboard textarea{
  padding:7px 8px !important;
  font-size:.78rem !important;
}
body.admin-dashboard th,
body.admin-dashboard td{
  padding:8px 7px;
  font-size:.76rem;
}
body.admin-dashboard .feedback-item,
body.admin-dashboard .product-row,
body.admin-dashboard .category-row,
body.admin-dashboard .user-row,
body.admin-dashboard .device-row,
body.admin-dashboard .till-row,
body.admin-dashboard .price-schedule-row,
body.admin-dashboard .backend-switch-card,
body.admin-dashboard .booking-card{
  padding:0;
}
body.admin-dashboard .report-card{
  padding:9px;
}
body.admin-dashboard .form-grid{
  gap:7px;
  margin-top:11px;
  padding-top:10px;
}
body.admin-dashboard .editor-grid,
body.admin-dashboard .report-grid{
  gap:7px;
  margin-top:9px;
}
body.admin-dashboard .action-group{
  gap:4px;
}
body.admin-dashboard .programme-card-summary,
body.admin-dashboard .partner-card-summary,
body.admin-dashboard .raffle-card-summary{
  padding:8px 9px !important;
}
body.admin-dashboard .programme-card-body,
body.admin-dashboard .partner-card-body,
body.admin-dashboard .raffle-card-body{
  padding:0 9px 9px !important;
}
body.admin-dashboard .programme-card-order,
body.admin-dashboard .partner-card-order,
body.admin-dashboard .raffle-card-order{
  padding:6px 0 0 !important;
}
body.admin-dashboard .programme-add-grid,
body.admin-dashboard .partner-add-grid,
body.admin-dashboard .raffle-add-grid,
body.admin-dashboard .programme-edit-grid,
body.admin-dashboard .partner-edit-grid,
body.admin-dashboard .raffle-edit-grid{
  gap:7px !important;
}
body.admin-dashboard .muted,
body.admin-dashboard .subtle{
  font-size:.72rem;
}
body.admin-dashboard .admin-main>.admin-tabs{
  padding:6px;
}
body.admin-dashboard .admin-main>.admin-tabs .admin-menu-label{
  margin:8px 5px 2px;
  font-size:.58rem;
}
body.admin-dashboard .admin-main>.admin-tabs .admin-tab{
  font-size:.72rem;
  line-height:1.15;
}
@media(max-width:900px){
  body.admin-dashboard main{padding:8px}
  body.admin-dashboard .admin-menu-toggle{
    padding:7px 9px;
    font-size:.74rem;
  }
  body.admin-dashboard .admin-main>.admin-tabs{
    padding:5px;
  }
  body.admin-dashboard .admin-main>.admin-tabs .admin-tab{
    padding:6px 7px;
    font-size:.72rem;
  }
}


/* Compact side-by-side sales trends. */
.sales-trends-layout{min-width:0}
.sales-trends-overview{padding:8px!important;margin-bottom:8px!important}
.sales-trends-overview .panel-heading{align-items:center}
.sales-trends-overview .bar-sales-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:7px 0 0}
.sales-trends-overview .bar-sales-summary article{padding:6px 8px}
.sales-trends-overview .bar-sales-summary span{font-size:.66rem}
.sales-trends-overview .bar-sales-summary strong{font-size:.95rem;margin-top:1px}
.sales-trends-overview .bar-sales-summary small{display:block;margin-top:1px;color:#8f8f8f;font-size:.62rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sales-trends-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:start}
.sales-trends-grid>.panel{min-width:0;margin:0!important;padding:8px!important}
.sales-chart-heading h2{font-size:.92rem}
.sales-chart-heading .muted{margin-top:2px;font-size:.68rem}
.sales-chart-status{min-height:1.1em;margin:5px 0 0!important;font-size:.65rem!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sales-trends-grid .bar-sales-chart-wrap{height:250px;margin-top:6px;border-radius:0}
.sales-trends-grid .bar-sales-legend{gap:5px 9px;margin:6px 0 0;font-size:.64rem;line-height:1.15}
.sales-trends-grid .bar-sales-legend span{gap:4px}
.sales-trends-grid .bar-sales-legend i{width:12px;height:3px}
.sales-trends-details{margin-top:7px;border-top:1px solid #333;padding-top:5px}
.sales-trends-details>summary{cursor:pointer;color:#aaa;font-size:.66rem;font-weight:800;list-style-position:inside}
.sales-trends-details .bar-sales-daily{margin-top:5px}
.sales-trends-details .bar-sales-explainer{margin-top:5px;font-size:.64rem!important;line-height:1.3}
.sales-trends-details .table-wrap{margin-top:4px}
.sales-trends-details th,.sales-trends-details td{padding:5px 4px!important;font-size:.67rem!important}
@media(max-width:1100px){
  .sales-trends-grid .bar-sales-chart-wrap{height:230px}
}
@media(max-width:850px){
  .sales-trends-grid{grid-template-columns:1fr}
  .sales-trends-grid .bar-sales-chart-wrap{height:260px}
}
@media(max-width:520px){
  .sales-trends-overview .bar-sales-summary{grid-template-columns:1fr 1fr 1fr}
  .sales-trends-overview .bar-sales-summary small{display:none}
  .sales-trends-grid .bar-sales-chart-wrap{height:230px;margin-left:0;width:100%}
}


/* Keep navigation below the DEV banner. */
@media(min-width:901px){
  body.environment-dev .admin-main>.admin-tabs{top:52px;max-height:calc(100vh - 66px)}
}
@media(max-width:900px){
  body.environment-dev .admin-menu-toggle{top:48px}
  body.environment-dev .admin-main>.admin-tabs{top:92px;max-height:calc(100vh - 102px)}
}

/* Compact Staff layout. */
body.admin-dashboard #people-panel{padding:8px!important}
body.admin-dashboard #people-panel>summary{margin-bottom:4px}
body.admin-dashboard #people-panel>.muted{margin:2px 0 6px!important;font-size:.66rem!important}
body.admin-dashboard #users.editor-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-top:6px}
body.admin-dashboard #users .user-row{
  grid-template-columns:minmax(120px,1.2fr) minmax(100px,1fr) minmax(90px,.72fr) auto;
  gap:3px 5px;
  align-items:end;
  padding:5px!important;
  background:#181818;
  border:1px solid #333;
}
body.admin-dashboard #users .user-row label{font-size:.62rem!important}
body.admin-dashboard #users .user-row input,
body.admin-dashboard #users .user-row select{margin-top:1px!important;padding:4px 5px!important;font-size:.68rem!important;min-height:26px}
body.admin-dashboard #users .user-row>.check{padding:0 2px 5px;font-size:.66rem!important}
body.admin-dashboard #users .all-tills-note{grid-column:1/-1;padding:4px 6px;font-size:.63rem;border-color:#333;background:#141414}
body.admin-dashboard #users .till-permissions{grid-column:1/-1;padding:4px 6px;gap:3px 10px;font-size:.63rem;border-color:#333}
body.admin-dashboard #users .till-permissions legend{padding:0 3px;font-size:.61rem}
body.admin-dashboard #users .till-permissions .check{min-width:auto;font-size:.63rem!important}
body.admin-dashboard #users .account-state{grid-column:1/2;font-size:.61rem;align-self:center}
body.admin-dashboard #users .action-group{grid-column:2/-1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:3px}
body.admin-dashboard #users .action-group .button{padding:3px 5px!important;font-size:.61rem!important}
body.admin-dashboard #add-user.user-add{
  display:grid;
  grid-template-columns:minmax(130px,1.2fr) minmax(120px,1fr) minmax(90px,.7fr) auto;
  gap:5px;
  align-items:end;
  margin-top:7px;
  padding-top:7px;
  border-top:1px solid #333;
}
body.admin-dashboard #add-user.user-add input,
body.admin-dashboard #add-user.user-add select{padding:5px 6px!important;font-size:.68rem!important}
body.admin-dashboard #add-user.user-add .till-permissions{grid-column:1/-1;padding:4px 6px;gap:3px 10px;font-size:.63rem}
body.admin-dashboard #add-user.user-add>.button{justify-self:start;padding:4px 7px!important;font-size:.64rem!important}
@media(max-width:1200px){
  body.admin-dashboard #users.editor-grid{grid-template-columns:1fr}
}
@media(max-width:700px){
  body.admin-dashboard #users .user-row{grid-template-columns:1fr 1fr}
  body.admin-dashboard #users .account-state{grid-column:1/-1}
  body.admin-dashboard #users .action-group{grid-column:1/-1;justify-content:flex-start}
  body.admin-dashboard #add-user.user-add{grid-template-columns:1fr 1fr}
}
@media(max-width:520px){
  body.admin-dashboard #users .user-row,
  body.admin-dashboard #add-user.user-add{grid-template-columns:1fr}
}
