/* InkBar staff & admin dashboard — CRM layout */
body.staff {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #e7e8ec;
  --border-strong: #d6d8de;
  --text: #111827;
  --muted: #6b7280;
  --subtle: #9ca3af;
  --accent: #e5307c;
  --accent-hover: #cc236b;
  --accent-soft: #fdf0f6;
  --line: var(--border);
  --card: var(--surface);
  --paper: var(--bg);
  --paper-2: #eef0f3;
  --ink: #111827;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 1px 3px rgba(17, 24, 39, .06);
  --shadow-lg: 0 20px 50px rgba(17, 24, 39, .18);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
body.staff h1, body.staff h2, body.staff h3 { letter-spacing: -.01em; }

/* Buttons */
body.staff .btn { border-radius: 8px; min-height: 38px; padding: 0 14px; font: 600 14px var(--font); border-color: var(--border-strong); box-shadow: 0 1px 1px rgba(17,24,39,.03); }
body.staff .btn:hover { background: #f9fafb; }
body.staff .btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
body.staff .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
body.staff .btn-sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
body.staff .btn-lg { min-height: 46px; font-size: 15px; }
body.staff .btn-danger { color: #b42318; border-color: #f3c7c3; }
body.staff .btn-danger:hover { background: #fef3f2; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; flex: none; text-decoration: none; }
.icon-btn:hover { background: var(--paper-2); color: var(--text); }
.icon-btn.bordered { border-color: var(--border-strong); background: var(--surface); }
.icon-btn .i { width: 18px; height: 18px; }
.link-btn { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-weight: 600; font-size: 13px; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }
body.staff input, body.staff select, body.staff textarea { border-radius: 8px; border-color: var(--border-strong); font-size: 14px; min-height: 38px; padding: 8px 12px; }
body.staff input:focus, body.staff select:focus, body.staff textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(229, 48, 124, .15); }
body.staff label.field { font-size: 13px; font-weight: 600; color: #374151; }

/* Icons */
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Login */
.brand-logo { display: block; height: 52px; width: auto; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 20% 0%, #fde7f1 0, transparent 45%), var(--bg); }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px; display: grid; gap: 14px; box-shadow: var(--shadow-lg); }
.login .brand-logo { height: 72px; margin: 0 auto 4px; }
.login-head { text-align: center; margin-bottom: 10px; }
.login-head h1 { font-size: 22px; margin: 0 0 4px; }
.login-head p { margin: 0; font-size: 14px; }
.pw-field { position: relative; display: block; }
.pw-field input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pw-toggle:hover { color: var(--text); background: var(--paper-2); }
.pw-toggle .i { width: 18px; height: 18px; }
.form-error { color: #b42318; font-size: 13px; margin: 0; min-height: 1em; }

/* Shell */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100dvh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; z-index: 40; }
.side-brand { display: flex; justify-content: center; padding: 20px 20px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.sidebar nav { display: grid; gap: 2px; padding: 6px 12px; overflow-y: auto; }
.nav-label { margin: 14px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; color: #4b5563; text-decoration: none; font-weight: 600; }
.sidebar nav a .i { width: 18px; height: 18px; color: var(--subtle); }
.sidebar nav a:hover { background: var(--paper-2); color: var(--text); }
.sidebar nav a.on { background: var(--accent-soft); color: var(--accent); }
.sidebar nav a.on .i { color: var(--accent); }
.nav-count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; text-align: center; font-variant-numeric: tabular-nums; }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); }
.side-user-text { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.side-user-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-text small { color: var(--muted); font-size: 12px; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 13px var(--font); text-transform: uppercase; }
.scrim { position: fixed; inset: 0; background: rgba(17,24,39,.4); z-index: 35; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.menu-btn { display: none; }
.page-title { min-width: 0; flex: 1; }
.page-title h1 { font-size: 20px; margin: 0; }
.page-title p { margin: 2px 0 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.event-picker { position: relative; display: flex; align-items: center; }
.live { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--paper-2); font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--subtle); }
.live.on { background: #ecfdf3; color: #067647; }
.live.on .dot { background: #17b26a; box-shadow: 0 0 0 3px rgba(23,178,106,.2); }

.view { display: none; padding: 24px 28px 60px; }
.view.on { display: block; }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: 16px; margin: 0; }
.sub { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.panel-body { padding: 20px; }
.panel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 0 20px; border-bottom: 1px solid var(--border); }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; margin: 0; }

/* Tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; border: 0; border-bottom: 2px solid transparent; background: none; padding: 16px 10px 14px; font: 600 14px var(--font); color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.tabs button b { padding: 1px 8px; border-radius: 999px; background: var(--paper-2); color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.tabs button.on b { background: var(--accent-soft); color: var(--accent); }
.search { position: relative; flex: 0 1 280px; margin: 10px 0; }
.search .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--subtle); pointer-events: none; }
body.staff .search input { padding-left: 34px; }

/* Data tables */
.table-wrap { overflow-x: auto; }
.dt { width: 100%; border-collapse: collapse; }
.dt th { text-align: left; padding: 11px 20px; background: #fafafb; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.dt td { padding: 12px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.dt tbody tr:last-child td { border-bottom: 0; }
.dt tbody tr.clickable { cursor: pointer; }
.dt tbody tr.clickable:hover td { background: #fafafb; }
.dt tr.new td { animation: rowflash 2.4s ease-out; }
@keyframes rowflash { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
.dt .num { text-align: right; font-variant-numeric: tabular-nums; }
.dt .muted { color: var(--muted); }
.cell-main { display: flex; align-items: center; gap: 12px; }
.cell-main b { display: block; font-size: 14px; }
.cell-main small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.thumb { width: 24px; height: 48px; object-fit: cover; border-radius: 4px; background: var(--paper-2); border: 1px solid var(--border); flex: none; }
.qn { font-weight: 700; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.meta-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; }
.meta-tag .i { width: 14px; height: 14px; }
.meta-tag.ok { color: #067647; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--paper-2); color: #374151; }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.p-pending { background: #fffaeb; color: #b54708; }
.pill.p-printing { background: #eff8ff; color: #175cd3; }
.pill.p-ready { background: #ecfdf3; color: #067647; }
.pill.p-claimed { background: #f2f4f7; color: #475467; }
.pill.p-active { background: #ecfdf3; color: #067647; }
.pill.p-draft { background: #fffaeb; color: #b54708; }
.pill.p-closed { background: #f2f4f7; color: #475467; }
.pill.p-off { background: #fef3f2; color: #b42318; }
body.staff .badge { border-radius: 999px; font-weight: 600; }

/* Dashboard */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 12px; text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--border-strong); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--paper-2); color: #374151; }
.kpi-icon .i { width: 18px; height: 18px; }
.kpi-icon.pink { background: var(--accent-soft); color: var(--accent); }
.kpi-icon.amber { background: #fffaeb; color: #b54708; }
.kpi-icon.blue { background: #eff8ff; color: #175cd3; }
.kpi-icon.green { background: #ecfdf3; color: #067647; }
.kpi-value { font-size: 28px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.ov-side .panel { margin-bottom: 20px; }
.ev-summary { display: grid; gap: 14px; }
.ev-summary h3 { margin: 0; font-size: 17px; }
.info-list { display: grid; gap: 8px; margin: 0; }
.info-list div { display: flex; align-items: center; gap: 8px; color: #374151; }
.info-list .i { color: var(--subtle); }
.qr-box { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px dashed var(--border-strong); border-radius: 10px; }
.qr-box img { width: 92px; height: 92px; flex: none; }
.qr-box p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.link-box { display: flex; gap: 6px; }
body.staff .link-box input { font-size: 13px; min-height: 34px; padding: 6px 10px; color: var(--muted); background: #fafafb; }
.progress { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--paper-2); margin: 4px 0 14px; }
.progress span { display: block; height: 100%; }
.legend { display: grid; gap: 10px; margin: 0; }
.legend div { display: flex; align-items: center; gap: 10px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend span { flex: 1; color: #374151; }
.legend b { font-variant-numeric: tabular-nums; }
.c-pending { background: #f79009; } .c-printing { background: #2e90fa; } .c-ready { background: #17b26a; } .c-claimed { background: #98a2b3; }

/* Gallery */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.photo-grid a { display: block; border-radius: 8px; overflow: hidden; background: var(--paper-2); position: relative; border: 1px solid var(--border); }
.photo-grid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.photo-grid.strips img { aspect-ratio: 1/3; object-fit: contain; background: #fff; }
.photo-grid .cap { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; background: rgba(17,24,39,.7); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 6px; }
.photo-grid .cap .i { width: 12px; height: 12px; }
.inline-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; }
.inline-link .i { width: 14px; height: 14px; }

/* Templates */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.tpl-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: grid; background: var(--surface); }
.tpl-preview { display: grid; place-items: center; padding: 18px; background: #fafafb; border-bottom: 1px solid var(--border); }
.tpl-preview canvas { width: 92px; height: auto; border-radius: 3px; box-shadow: 0 4px 14px rgba(17,24,39,.15); background: #fff; }
.tpl-info { padding: 12px 14px; display: grid; gap: 6px; }
.tpl-info b { font-size: 14px; }
.tpl-info .small { font-size: 12px; color: var(--muted); margin: 0; }
.tpl-actions { display: flex; justify-content: center; gap: 8px; padding: 0 14px 14px; }
.icon-btn.danger:hover { color: #b42318; background: #fef3f2; border-color: #f3c7c3; }

/* Settings */
.settings-grid { display: grid; gap: 20px; max-width: 820px; }
.form-grid { display: grid; gap: 14px; }
.drive-status { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: #fafafb; }
.drive-status .kpi-icon { width: 40px; height: 40px; }
.stat-row { display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.stat-row b { color: var(--text); }
details.creds summary { cursor: pointer; font-weight: 600; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Forms (modals) */
.form-inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: end; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 6px; }
.check-grid label { display: flex; gap: 8px; align-items: center; border: 1px solid var(--border-strong); border-radius: 8px; padding: 9px 10px; font-size: 14px; font-weight: 500; cursor: pointer; }
.check-grid label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
body.staff .check-grid input { width: auto; min-height: 0; accent-color: var(--accent); }
code { background: var(--paper-2); padding: 2px 6px; border-radius: 6px; font-size: 12px; word-break: break-all; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(17,24,39,.45); display: grid; place-items: center; padding: 16px; overflow: auto; }
.modal-card { background: var(--surface); border-radius: 14px; padding: 24px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto; }
.modal-card.wide { width: min(980px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }

/* Drawer */
.drawer-host { position: fixed; inset: 0; z-index: 55; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(17,24,39,.35); animation: fade .15s ease-out; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slidein .2s ease-out; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.drawer-body { padding: 20px; overflow-y: auto; display: grid; gap: 20px; align-content: start; }
.drawer-foot { margin-top: auto; padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; }
.section-label { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); }
.strip-view { display: flex; gap: 18px; align-items: flex-start; }
.strip-view img { width: 120px; border-radius: 4px; box-shadow: 0 6px 20px rgba(17,24,39,.18); background: #fff; flex: none; }
.dl { display: grid; gap: 10px; margin: 0; flex: 1; min-width: 0; }
.dl div { display: grid; gap: 2px; }
.dl dt { font-size: 12px; color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.stepper button { border: 0; border-right: 1px solid var(--border-strong); background: var(--surface); padding: 9px 4px; font: 600 12px var(--font); color: var(--muted); cursor: pointer; }
.stepper button:last-child { border-right: 0; }
.stepper button:hover { background: #fafafb; color: var(--text); }
.stepper button.done { color: var(--text); background: #fafafb; }
.stepper button.on { background: var(--accent); color: #fff; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.timeline li { position: relative; padding-left: 20px; font-size: 13px; }
.timeline li::before { content: ''; position: absolute; left: 3px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.timeline li small { display: block; color: var(--muted); }
.qr-large { display: grid; justify-items: center; gap: 10px; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: #fafafb; }
.qr-large img { width: 180px; height: 180px; background: #fff; padding: 8px; border-radius: 8px; border: 1px solid var(--border); }
.stats-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats-3 div { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.stats-3 small { display: block; color: var(--muted); font-size: 12px; }
.stats-3 b { font-size: 20px; font-variant-numeric: tabular-nums; }
.action-list { display: grid; gap: 8px; }
.action-list .btn { justify-content: flex-start; }

/* Slot editor */
.slot-editor { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.slot-stage { position: relative; height: min(68dvh, 720px); aspect-ratio: var(--ar, 1/3); background: repeating-conic-gradient(#eceef1 0 25%, #fff 0 50%) 0 0/16px 16px; border-radius: 6px; overflow: hidden; touch-action: none; user-select: none; border: 1px solid var(--border); }
.slot-stage img, .slot-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.slot-box { position: absolute; border: 2px solid var(--accent); background: rgba(229,48,124,.16); cursor: move; display: grid; place-items: center; color: #fff; font: 800 22px var(--font); text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.slot-box .h { position: absolute; right: -8px; bottom: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; cursor: nwse-resize; }
.slot-fields { display: grid; gap: 10px; }
.slot-fields .row4 { display: grid; grid-template-columns: 26px repeat(4, 1fr); gap: 6px; align-items: center; font-size: 13px; }
body.staff .slot-fields .row4 input { min-height: 34px; padding: 4px 8px; font-size: 13px; }
.dpi { font-size: 13px; color: #067647; margin: 0; }
.dpi.bad { color: #b42318; }

/* Responsive */
@media (max-width: 1100px) {
  .ov-grid { grid-template-columns: 1fr; }
  .ov-side { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .ov-side .panel { margin-bottom: 0; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .topbar-right { width: 100%; order: 3; }
  .event-picker { flex: 1; }
  .view { padding: 16px 16px 60px; }
  .ov-side { grid-template-columns: 1fr; }
  .panel-head { flex-wrap: wrap; }
  .slot-editor { grid-template-columns: 1fr; }
  .slot-stage { height: 60dvh; margin: 0 auto; }
  .dt th, .dt td { padding: 10px 14px; }
  .dt .hide-sm { display: none; }
}
@media (max-width: 520px) {
  .live #liveLabel { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 24px; }
  .two { grid-template-columns: 1fr; }
  .strip-view { flex-direction: column; align-items: center; }
}

/* Facebook ready */
.tabs button .i { width: 15px; height: 15px; }
.fb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.fb-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); display: grid; }
.fb-card a { display: grid; place-items: center; padding: 14px; background: #fafafb; border-bottom: 1px solid var(--border); }
.fb-card img { height: 200px; width: auto; border-radius: 3px; box-shadow: 0 4px 14px rgba(17,24,39,.15); background: #fff; }
.fb-info { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 4px; }
.fb-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 12px 12px; }
body.staff .fb-actions .btn { padding: 0 8px; }

/* Finish event */
.thumb.gone { display: grid; place-items: center; color: var(--subtle); background: var(--paper-2); }
.thumb.gone .i { width: 14px; height: 14px; }
.strip-gone { display: grid; place-items: center; gap: 6px; width: 120px; height: 240px; flex: none; border: 1px dashed var(--border-strong); border-radius: 6px; color: var(--muted); background: #fafafb; align-content: center; }
.strip-gone .i { width: 26px; height: 26px; }
.strip-gone small { font-size: 12px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist li .i { width: 20px; height: 20px; margin-top: 1px; }
.checklist li.ok .i { color: #17b26a; }
.checklist li.bad .i { color: #d92d20; }
.checklist small { display: block; color: var(--muted); font-size: 12px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.notice .i { width: 18px; height: 18px; margin-top: 1px; }
.notice.ok { background: #ecfdf3; color: #067647; }
.notice.warn { background: #fffaeb; color: #b54708; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: #374151; cursor: pointer; }
body.staff .check-line input { width: 18px; height: 18px; min-height: 0; margin: 1px 0 0; padding: 0; flex: none; accent-color: var(--accent); }
body.staff .btn-danger-solid { background: #d92d20; border-color: #d92d20; color: #fff; }
body.staff .btn-danger-solid:hover { background: #b42318; border-color: #b42318; }
body.staff .btn-danger-solid:disabled { background: #fda29b; border-color: #fda29b; }

/* Event banner */
.banner-field { display: grid; gap: 8px; margin-top: 6px; }
.banner-preview { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 110px; border: 1px dashed var(--border-strong); border-radius: 10px; background: #fafafb; color: var(--muted); font-weight: 500; font-size: 13px; overflow: hidden; }
.banner-preview img { display: block; width: 100%; height: auto; max-height: 220px; object-fit: cover; }
.drawer-banner { display: block; width: 100%; border-radius: 10px; border: 1px solid var(--border); }

/* Guest app appearance */
.gu-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.gu-form .panel { margin-bottom: 16px; }
body.staff .gu-form textarea { min-height: 70px; resize: vertical; }
.gu-actions { display: grid; gap: 8px; width: 360px; margin: 0 auto; }
.color-field { display: flex; gap: 8px; align-items: center; }
body.staff .color-field input[type=color] { width: 48px; height: 38px; padding: 3px; cursor: pointer; }
body.staff .color-field input[type=text] { width: 110px; font-family: ui-monospace, Menlo, monospace; text-transform: uppercase; }
.gu-preview { position: sticky; top: 88px; display: grid; gap: 10px; }
.gu-preview .sub { margin: 0; }
.gu-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
body.staff .gu-preview-head select { width: auto; max-width: 220px; min-height: 32px; padding: 4px 10px; font-size: 13px; }
.phone { width: 360px; height: min(720px, calc(100dvh - 290px)); min-height: 460px; margin: 0 auto; padding: 10px; border-radius: 40px; background: #111827; box-shadow: var(--shadow-lg); }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 30px; background: #fff; }
@media (max-width: 1200px) { .gu-layout { grid-template-columns: 1fr; } .gu-preview { position: static; } }
.gu-main { min-width: 0; }
.gu-scope { border-color: var(--accent); }
body.staff .gu-scope select { font-weight: 600; margin-top: 4px; }
.gu-scope .sub { margin-top: 8px; }

.flash { animation: fieldflash 1.6s ease-out; border-radius: 8px; }
@keyframes fieldflash { 0%, 40% { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 6px var(--accent); } 100% { box-shadow: none; } }

/* Guest app sections: collapsed dropdowns */
.gu-section > summary { list-style: none; cursor: pointer; align-items: center; border-bottom: 0; user-select: none; }
.gu-section > summary::-webkit-details-marker { display: none; }
.gu-section > summary:hover { background: #fafafb; }
.gu-section[open] > summary { border-bottom: 1px solid var(--border); }
.gu-section .chev { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--muted); transition: transform .2s ease; }
.gu-section .chev .i { width: 18px; height: 18px; }
.gu-section[open] .chev { transform: rotate(90deg); color: var(--accent); }

/* Custom dropdown */
.cselect { position: relative; margin-top: 6px; }
.cs-button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.cs-button:hover { border-color: #b9bcc5; }
.cs-button:focus-visible, .cs-button[aria-expanded="true"] { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(229, 48, 124, .15); }
.cs-lead { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font: 700 13px var(--font); }
.cs-lead.avatar { border-radius: 50%; }
.cs-lead .i { width: 18px; height: 18px; }
.cs-text { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.cs-text b { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-text small { font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-chev { display: grid; place-items: center; color: var(--muted); transition: transform .15s; }
.cs-button[aria-expanded="true"] .cs-chev { transform: rotate(180deg); color: var(--accent); }
.cs-menu { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); max-height: 320px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); outline: none; animation: csopen .12s ease-out; }
@keyframes csopen { from { opacity: 0; transform: translateY(-4px); } }
.cs-menu li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.cs-menu li.active { background: var(--paper-2); }
.cs-menu li.on .cs-text b { color: var(--accent); }
.cs-check { display: grid; place-items: center; color: var(--accent); visibility: hidden; }
.cs-menu li.on .cs-check { visibility: visible; }
.cs-menu li + li { margin-top: 2px; }
.panel.gu-scope { overflow: visible; position: relative; z-index: 5; }

/* Styled dropdown for every <select> */
.cs-native { display: none !important; }
.cs-button:disabled { cursor: default; background: #fafafb; }
.cs-button:disabled .cs-chev { visibility: hidden; }
.cs-floating { position: fixed; z-index: 100; right: auto; }
.cs-dot { width: 10px; height: 10px; margin: 0 4px; flex: none; border-radius: 50%; }
.cselect.compact { margin-top: 0; display: inline-block; }
.cselect.compact .cs-button { width: auto; min-width: 160px; max-width: 280px; padding: 5px 10px; gap: 8px; border-radius: 8px; min-height: 38px; }
.cselect.compact .cs-button .cs-lead { width: 26px; height: 26px; font-size: 10px; border-radius: 7px; }
.cselect.compact .cs-button .cs-lead.avatar { border-radius: 50%; }
.cselect.compact .cs-button .cs-lead .i { width: 15px; height: 15px; }
.cselect.compact .cs-button .cs-text small { display: none; }
.event-picker .cselect.compact .cs-button { min-width: 200px; }
.gu-preview-head .cselect.compact .cs-button { min-width: 0; max-width: 200px; min-height: 32px; padding: 3px 8px; }
@media (max-width: 900px) { .event-picker .cselect, .event-picker .cselect .cs-button { width: 100%; max-width: none; } }

/* Guest app page: preview switch + queue board shown as a small TV */
.gu-preview-head .seg-tabs button { padding: 6px 12px; font-size: 12px; }
.phone.tv { width: 360px; height: 220px; min-height: 0; padding: 6px; border-radius: 14px; overflow: hidden; }
.phone.tv iframe { width: 1280px; height: 765px; border-radius: 8px; transform: scale(.271875); transform-origin: 0 0; }
.seg-tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--paper-2); }
.seg-tabs button { border: 0; background: none; border-radius: 8px; padding: 6px 12px; font: 600 12px var(--font); color: var(--muted); cursor: pointer; }
.seg-tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(17,24,39,.12); }

/* Facebook ready: select strips to download */
.fb-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fafafb; }
.fb-toolbar .sub { margin: 0; flex: 1; }
.photo-grid .pickable { position: relative; display: block; border-radius: 8px; overflow: hidden; background: var(--paper-2); border: 2px solid var(--border); cursor: pointer; transition: border-color .15s; }
.photo-grid .pickable input { position: absolute; opacity: 0; pointer-events: none; }
.photo-grid .pickable.picked { border-color: var(--accent); }
.pick-box { position: absolute; top: 8px; right: 8px; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; border: 2px solid #fff; background: rgba(17,24,39,.35); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.pick-box .i { width: 14px; height: 14px; stroke-width: 3; opacity: 0; }
.pickable.picked .pick-box { background: var(--accent); border-color: var(--accent); }
.pickable.picked .pick-box .i { opacity: 1; }
.pickable input:focus-visible + .pick-box { outline: 2px solid var(--accent); outline-offset: 2px; }
