/* STARS — Seating Arrangement System
   Visual language: transit signage + departure boards + boarding passes. */
:root {
  --paper: #eeebe3; --paper-2: #e6e2d7; --card: #fbfaf6; --line: #d8d3c6; --line-2: #c9c3b3;
  --ink: #12112a; --ink-2: #3a3956; --muted: #6d6b80; --navy: #1d1b6b; --navy-2: #2d2b8f;
  --amber: #f5a524; --amber-ink: #6b4300; --amber-soft: #fff1d4;
  --green: #1e9e6a; --green-soft: #dff3ea; --red: #d64545; --red-soft: #fbe3e3;
  --st-empty: #fbfaf6; --st-empty-line: #bdb7a6; --st-assigned: #2d2b8f; --st-seated: #1e9e6a; --st-absent: #d64545; --st-blocked: #9a968a;
  --night: #0e0d1f; --night-2: #17162f; --night-3: #22213f; --night-line: #2f2d52;
  --r: 14px; --r-sm: 9px;
  --shadow: 0 1px 0 rgba(18,17,42,.04), 0 8px 24px -12px rgba(18,17,42,.18);
  --f-ui: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --f-code: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-variant-numeric: tabular-nums; font: 15px/1.45 var(--f-ui); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--navy-2); }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); }
.ic { width: 18px; height: 18px; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--amber); outline-offset: 2px; }
::selection { background: var(--amber); color: var(--ink); }

/* ---------- type helpers */
.display { font-weight: 800; letter-spacing: -.01em; line-height: .95; }
.eyebrow { font: 700 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- logo */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { display: grid; grid-template-columns: repeat(3, 7px); gap: 2.5px; padding: 6px; border-radius: 9px; background: var(--ink); }
.logo-mark i { width: 7px; height: 7px; border-radius: 2px; background: rgba(245,165,36,.35); }
.logo-mark i.on { background: var(--amber); }
.logo-word { font-weight: 800; font-size: 20px; letter-spacing: .04em; display: flex; flex-direction: column; line-height: 1; }
.logo-word small { font: 600 9.5px/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; opacity: .6; margin-top: 3px; }

/* ---------- buttons & fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); font-weight: 650; font-size: 14px; cursor: pointer; transition: transform .12s var(--ease), background .15s, border-color .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--navy); }
.btn.amber { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(18,17,42,.06); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 52px; font-size: 16px; border-radius: 12px; }
.btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: rgba(18,17,42,.07); color: var(--ink); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font: 700 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea, .input { width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.field textarea { height: auto; padding: 11px 13px; min-height: 120px; resize: vertical; font-family: var(--f-mono); font-size: 13px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(245,165,36,.28); }
.row { display: flex; gap: 12px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; background: var(--paper-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip.amber { background: var(--amber-soft); color: var(--amber-ink); }
.chip.green { background: var(--green-soft); color: #0e6b46; }
.chip.red { background: var(--red-soft); color: #9b2323; }
.chip.navy { background: #e4e3f6; color: var(--navy); }
.dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }
.dot.empty { background: var(--st-empty); box-shadow: inset 0 0 0 1.5px var(--st-empty-line); }
.dot.assigned { background: var(--st-assigned); } .dot.seated { background: var(--st-seated); } .dot.absent { background: var(--st-absent); }
.dot.blocked { background: repeating-linear-gradient(45deg, #9a968a 0 2px, #d9d4c7 2px 4px); } .dot.me { background: var(--amber); }

/* ---------- toasts & modals */
#toasts { position: fixed; z-index: 90; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; width: min(92vw, 460px); }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 550; box-shadow: 0 18px 40px -16px rgba(0,0,0,.5); transform: translateY(16px); opacity: 0; transition: all .28s var(--ease); }
.toast.in { transform: none; opacity: 1; }
.toast-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--green); flex: none; }
.toast-err .toast-dot { background: var(--red); } .toast-warn .toast-dot { background: var(--amber); }
.modal-wrap { position: fixed; inset: 0; z-index: 80; background: rgba(14,13,31,.45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 18px; opacity: 0; transition: opacity .2s; }
.modal-wrap.in { opacity: 1; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 36px); display: flex; flex-direction: column; background: var(--card); border-radius: 18px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.55); transform: translateY(12px) scale(.98); transition: transform .25s var(--ease); }
.modal-wide { width: min(980px, 100%); }
.modal-wrap.in .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px; }
.modal-head h3 { margin: 0; font-size: 19px; font-weight: 800; }
.modal-body { padding: 6px 20px 14px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.shake { animation: shake .42s; }
@keyframes shake { 20%,60% { transform: translateX(-7px); } 40%,80% { transform: translateX(7px); } }

/* ---------- split-flap */
.flap-c { display: inline-grid; place-items: center; width: .78em; height: 1.22em; margin-right: 2px; border-radius: 3px; background: linear-gradient(#25243f 0 49%, #1b1a33 51%); color: #ffd27a; font-family: var(--f-code); font-weight: 800; position: relative; overflow: hidden; }
.flap-c::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.6); }
.flap-c.sp { background: transparent; } .flap-c.sp::after { display: none; }
.flap-c.flip b { animation: flip .1s linear; }
.flap-c.done { color: #ffcc66; }
@keyframes flip { from { transform: scaleY(.2); opacity: .4; } to { transform: none; opacity: 1; } }

/* ================================================================ LOGIN */
body.is-login { background: var(--night); }
.login { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; }
.login-hero { position: relative; overflow: hidden; padding: 34px 48px; color: #fff; display: flex; flex-direction: column; gap: 34px; background: radial-gradient(120% 80% at 0% 0%, #23205e 0%, transparent 55%), radial-gradient(90% 70% at 100% 100%, #3a1f2b 0%, transparent 60%), var(--night); }
.login-hero .logo-mark { background: #000; }
.hero-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
.hero-tag { font: 600 11px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; opacity: .55; }
.board { position: relative; z-index: 2; background: #0a0918; border: 1px solid #26244a; border-radius: 16px; padding: 14px 16px 10px; box-shadow: 0 40px 80px -40px #000, inset 0 1px 0 rgba(255,255,255,.04); max-width: 620px; }
.board-head { display: flex; justify-content: space-between; font: 700 10.5px var(--f-mono); letter-spacing: .16em; color: #8986b8; padding: 0 2px 10px; border-bottom: 1px dashed #2a2850; margin-bottom: 6px; }
.board-clock { color: var(--amber); }
.board-row { display: grid; grid-template-columns: 9.5em 1fr auto; align-items: center; gap: 12px; padding: 7px 0; font-size: clamp(15px, 1.7vw, 22px); border-bottom: 1px solid #16152c; }
.board-row:last-child { border: 0; }
.board-st { font: 700 10.5px var(--f-mono); letter-spacing: .14em; color: #6f6c9a; }
.board-st.go { color: var(--amber); animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.hero-copy { position: relative; z-index: 2; margin-top: auto; }
.hero-copy h1 { margin: 0 0 14px; font-size: clamp(40px, 5.4vw, 78px); font-weight: 800; line-height: .9; letter-spacing: -.035em; }
.hero-copy p { max-width: 520px; margin: 0; color: #b9b7d6; font-size: 16px; }
.hero-seats { position: absolute; right: -60px; top: 120px; display: grid; grid-template-columns: repeat(6, 34px); gap: 9px; transform: perspective(700px) rotateY(-28deg) rotateX(18deg); opacity: .5; z-index: 1; }
.hero-seats i { width: 34px; height: 34px; border-radius: 8px; border: 1.5px solid #3b3970; animation: seatpulse 4.6s calc(var(--d) * .2s) infinite; }
.hero-seats i:nth-child(7n+3) { background: #2d2b8f; border-color: #2d2b8f; }
.hero-seats i:nth-child(11n+5) { background: var(--green); border-color: var(--green); }
@keyframes seatpulse { 0%, 85%, 100% { box-shadow: none; } 90% { box-shadow: 0 0 0 3px var(--amber), 0 0 24px var(--amber); } }
.login-panel { background: var(--paper); display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 6vw, 84px); gap: 22px; }
.login-mobile-logo { display: none; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 13px; background: var(--paper-2); }
.tabs button { display: flex; align-items: center; justify-content: center; gap: 7px; height: 42px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; cursor: pointer; color: var(--muted); }
.tabs button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.login-form h2 { margin: 6px 0 6px; font-size: 32px; font-weight: 800; letter-spacing: -.01em; }
.login-form > p { margin: 0 0 22px; }
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 18px; }
.code-boxes input { height: 64px; text-align: center; font: 800 28px var(--f-code); border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; text-transform: uppercase; }
.code-boxes input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(245,165,36,.3); }
.login-foot { font: 600 10.5px var(--f-mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; margin-top: 10px; }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 22px 20px 26px; gap: 18px; }
  .login-hero .hero-top { display: none; }
  .hero-copy h1 { font-size: 40px; } .hero-copy p { font-size: 14.5px; }
  .hero-seats { display: none; }
  .board-row { font-size: 15px; }
  .login-panel { padding: 26px 20px 40px; order: -1; }
  .login-mobile-logo { display: block; }
  .code-boxes input { height: 56px; font-size: 24px; }
}

/* ================================================================ APP SHELL (panitia) */
.shell { display: grid; grid-template-columns: 236px 1fr; height: 100vh; }
.side { background: var(--ink); color: #e9e8f5; display: flex; flex-direction: column; padding: 18px 12px 14px; gap: 18px; overflow: auto; }
.side .logo { padding: 0 8px; } .side .logo-mark { background: #000; }
.ev-switch { padding: 10px; border-radius: 12px; background: #1d1c38; border: 1px solid #2c2a50; cursor: pointer; text-align: left; width: 100%; color: inherit; }
.ev-switch .eyebrow { color: #8b89b6; }
.ev-switch b { display: block; margin-top: 5px; font-size: 14.5px; line-height: 1.25; }
.ev-switch small { color: #a5a3c9; font-size: 12px; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #b9b7d8; text-decoration: none; font-weight: 600; font-size: 14.5px; }
.nav a:hover { background: #1d1c38; color: #fff; }
.nav a.on { background: var(--amber); color: var(--ink); }
.nav a .count { margin-left: auto; font: 700 11px var(--f-mono); opacity: .7; }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid #262448; }
.side-foot .who { display: flex; align-items: center; gap: 10px; padding: 4px 6px; font-size: 13px; }
.avatar { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #2d2b8f; color: #fff; font: 800 12px var(--f-mono); flex: none; }
.side-foot .btn { background: transparent; color: #c7c5e5; border-color: #2c2a50; height: 36px; }
.side-foot .btn:hover { border-color: #5a58a0; color: #fff; }
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 16px 22px 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.topbar h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.topbar .sub { color: var(--muted); font-size: 13px; }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.page { flex: 1; overflow: auto; padding: 22px; }
.page.flush { padding: 0; overflow: hidden; }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 60; transform: translateX(-100%); transition: transform .25s var(--ease); }
  .shell.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(14,13,31,.4); }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 12px 14px; } .topbar h1 { font-size: 18px; }
  .page { padding: 14px; }
}

/* ---------- plotting workspace */
.plot { display: grid; grid-template-columns: 250px minmax(0, 1fr) 330px; height: 100%; }
.rail { border-right: 1px solid var(--line); overflow: auto; padding: 14px 12px; background: var(--paper); }
.rail h4 { display: flex; align-items: center; justify-content: space-between; margin: 6px 4px 8px; }
.unit-card { display: block; width: 100%; text-align: left; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); margin-bottom: 8px; cursor: pointer; transition: border-color .15s, transform .15s var(--ease); }
.unit-card:hover { border-color: var(--ink-2); }
.unit-card.on { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(245,165,36,.45); }
.unit-card .uc-top { display: flex; align-items: center; gap: 8px; }
.unit-card .uc-top b { font-weight: 800; font-size: 15px; }
.unit-card .uc-top .ic { color: var(--muted); }
.unit-card .uc-meta { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.bar { position: relative; height: 7px; border-radius: 99px; background: var(--paper-2); overflow: hidden; display: flex; }
.bar i { height: 100%; display: block; }
.bar .b-seated { background: var(--st-seated); } .bar .b-assigned { background: var(--st-assigned); } .bar .b-absent { background: var(--st-absent); }
.uc-nums { display: flex; justify-content: space-between; font: 600 11px var(--f-mono); color: var(--muted); margin-top: 6px; }
.add-unit { display: flex; gap: 6px; margin: 4px 0 18px; }
.add-unit .btn { flex: 1; height: 34px; font-size: 12.5px; border-style: dashed; background: transparent; }
.stage-area { display: flex; flex-direction: column; min-width: 0; position: relative; background: var(--paper-2); }
.map-tools { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--paper); flex-wrap: wrap; }
.map-tools .title { font-weight: 800; font-size: 17px; }
.map-tools .tmpl { font-size: 12.5px; color: var(--muted); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--paper-2); gap: 2px; }
.seg button { height: 30px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; font-weight: 650; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 8px 14px; border-top: 1px solid var(--line); background: var(--paper); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-host { flex: 1; min-height: 0; position: relative; }
.armed-bar { position: absolute; z-index: 5; left: 50%; top: 68px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 13.5px; box-shadow: 0 14px 30px -12px rgba(0,0,0,.5); max-width: calc(100% - 24px); }
.armed-bar b { color: var(--amber); }
.armed-bar .btn { height: 30px; background: #2a2948; border-color: #2a2948; color: #fff; }
.seat-pop { position: absolute; z-index: 6; right: 14px; bottom: 14px; width: 300px; background: var(--card); border-radius: 16px; box-shadow: 0 24px 50px -20px rgba(18,17,42,.5); border: 1px solid var(--line); overflow: hidden; animation: popin .22s var(--ease); }
@keyframes popin { from { transform: translateY(10px); opacity: 0; } }
.seat-pop .sp-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 10px; }
.seat-badge { min-width: 52px; height: 52px; padding: 0 8px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: var(--amber); font: 800 20px var(--f-mono); }
.seat-badge.small { min-width: 40px; height: 34px; font-size: 14px; border-radius: 9px; }
.seat-pop .sp-name { font-weight: 800; font-size: 16px; line-height: 1.2; }
.seat-pop .sp-meta { font-size: 12.5px; color: var(--muted); }
.seat-pop .sp-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 14px; border-top: 1px dashed var(--line); }
.people { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--card); }
.people-head { padding: 14px 14px 10px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 38px; height: 40px; width: 100%; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; }
.search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(245,165,36,.25); }
.people-list { flex: 1; overflow: auto; padding: 6px 8px 12px; }
.grp-h { position: sticky; top: -6px; z-index: 1; background: var(--card); padding: 10px 8px 6px; display: flex; justify-content: space-between; align-items: center; }
.grp-h .btn { height: 26px; font-size: 11.5px; padding: 0 8px; }
.person { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: grab; user-select: none; border: 1px solid transparent; }
.person:hover { background: var(--paper); }
.person.on { background: var(--amber-soft); border-color: var(--amber); }
.person .avatar { width: 30px; height: 30px; font-size: 11px; background: var(--paper-2); color: var(--ink-2); }
.person.placed .avatar { background: var(--navy); color: #fff; }
.person .p-name { font-weight: 650; font-size: 14px; line-height: 1.2; }
.person .p-meta { font-size: 12px; color: var(--muted); }
.person .p-seat { margin-left: auto; font: 700 11.5px var(--f-mono); color: var(--navy); white-space: nowrap; }
.person.dragging { opacity: .4; }
.people-foot { padding: 10px 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state .ic { width: 34px; height: 34px; color: var(--line-2); margin-bottom: 8px; }
.empty-state h3 { color: var(--ink); margin: 0 0 6px; }
@media (max-width: 1280px) { .plot { grid-template-columns: 220px minmax(0, 1fr) 290px; } }
@media (max-width: 980px) {
  .page.flush { overflow: auto; }
  .plot { grid-template-columns: 1fr; height: auto; }
  .rail { border: 0; display: flex; gap: 8px; overflow-x: auto; padding: 10px; }
  .rail h4, .add-unit { display: none; }
  .unit-card { min-width: 190px; margin: 0; }
  .stage-area { height: 72vh; }
  .people { border: 0; height: 70vh; }
  .seat-pop { left: 10px; right: 10px; width: auto; }
}

/* ---------- seat map (shared) */
.seatmap { position: relative; width: 100%; height: 100%; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.seatmap.panning { cursor: grabbing; }
.map-svg { display: block; width: 100%; height: 100%; }
.map-ctl { position: absolute; left: 12px; bottom: 12px; display: grid; gap: 4px; }
.map-ctl button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); font: 700 17px/1 var(--f-mono); cursor: pointer; color: var(--ink); box-shadow: var(--shadow); }
.seat { cursor: pointer; }
.seat .seat-body { fill: var(--st-empty); stroke: var(--st-empty-line); stroke-width: 1.5; transition: fill .2s, stroke .2s; }
.seat .seat-back { fill: rgba(18,17,42,.12); }
.seat .seat-no { font: 800 13px var(--f-mono); fill: var(--ink-2); text-anchor: middle; pointer-events: none; }
.seat .seat-name { font: 650 7.6px var(--f-ui); fill: rgba(255,255,255,.9); text-anchor: middle; pointer-events: none; }
.seat:hover .seat-body { stroke: var(--ink); stroke-width: 2; }
.seat.st-assigned .seat-body { fill: var(--st-assigned); stroke: var(--st-assigned); }
.seat.st-seated .seat-body { fill: var(--st-seated); stroke: var(--st-seated); }
.seat.st-absent .seat-body { fill: var(--st-absent); stroke: var(--st-absent); }
.seat.st-blocked .seat-body { fill: url(#none); fill: #cfcabd; stroke: #9a968a; stroke-dasharray: 3 3; }
.seat.st-assigned .seat-no, .seat.st-seated .seat-no, .seat.st-absent .seat-no { fill: #fff; }
.seat.st-assigned .seat-back, .seat.st-seated .seat-back, .seat.st-absent .seat-back { fill: rgba(0,0,0,.22); }
.seat.st-blocked .seat-no { fill: #77736a; }
.seat.is-sel .seat-body { stroke: var(--amber); stroke-width: 3.5; }
.seat.is-hint .seat-body { stroke: var(--amber); stroke-width: 2; stroke-dasharray: 4 3; }
.seat.is-drop .seat-body { stroke: var(--amber); stroke-width: 4; fill: var(--amber-soft); }
.seat.is-me .seat-body { fill: var(--amber); stroke: #fff; stroke-width: 3; animation: mePulse 1.6s infinite; }
.seat.is-me .seat-no { fill: var(--ink); }
.seat.is-dim { opacity: .35; }
@keyframes mePulse { 50% { stroke: var(--amber); stroke-width: 6; } }
.bus-body { fill: #fff; stroke: var(--ink); stroke-width: 2.5; }
.bus-glass { fill: none; stroke: #9fb6d8; stroke-width: 5; stroke-linecap: round; }
.bus-wheel { fill: var(--ink); } .bus-mirror { fill: var(--ink-2); }
.bus-aisle { stroke: var(--line-2); stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; }
.row-no { font: 600 10px var(--f-mono); fill: var(--muted); text-anchor: middle; }
.front-label { font: 800 10px var(--f-mono); letter-spacing: .3em; fill: var(--muted); text-anchor: middle; }
.door-gap { fill: var(--amber); }
.door-arrow { fill: none; stroke: var(--amber-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fx-label { font: 700 9.5px var(--f-ui); fill: var(--ink-2); }
.fx-driver rect, .fx-tl rect { fill: var(--paper-2); stroke: var(--ink-2); stroke-width: 1.5; }
.fx-driver .wheel { fill: none; stroke: var(--ink); stroke-width: 3; }
.fx-driver text, .fx-tl text { font: 800 10px var(--f-mono); fill: var(--ink-2); text-anchor: middle; }
.fx-tl text { font-size: 13px; }
/* ballroom */
.room-floor { fill: #f4efe4; stroke: var(--ink); stroke-width: 2.5; }
.carpet-line { stroke: rgba(18,17,42,.04); stroke-width: 1; }
.fx-stage rect { fill: var(--ink); } .fx-stage .stage-lip { fill: var(--amber); }
.fx-stage text { font: 800 15px var(--f-ui); letter-spacing: .3em; fill: #fff; text-anchor: middle; }
.fx-screen { fill: #5a6bff; }
.fx-foh rect { fill: var(--paper-2); stroke: var(--ink-2); stroke-width: 1.5; } .fx-foh text { font: 800 11px var(--f-mono); fill: var(--ink-2); text-anchor: middle; }
.fx-rdoor rect { fill: var(--amber); } .fx-rdoor text { font: 700 10px var(--f-ui); fill: var(--amber-ink); text-anchor: middle; }
.fx-dance { fill: none; stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 6 6; }
.fx-dance-l { font: 700 9.5px var(--f-mono); letter-spacing: .25em; fill: var(--muted); text-anchor: middle; }
.rtable .table-top { fill: #fff; stroke: var(--ink-2); stroke-width: 1.6; }
.rtable.vip .table-top { fill: #fbefd2; stroke: #b8862b; stroke-width: 2.2; }
.rtable .table-no { font: 800 17px var(--f-mono); fill: var(--ink); text-anchor: middle; pointer-events: none; }
.rtable .table-vip { font: 800 7.5px var(--f-mono); letter-spacing: .15em; fill: #8a6114; text-anchor: middle; }
.rtable.t-me .table-top { fill: var(--amber-soft); stroke: var(--amber); stroke-width: 3; }
.chair .seat-body { stroke-width: 1.2; }
.chair .seat-no { font-size: 6.5px; opacity: 0; transition: opacity .2s; }
.seatmap.zoomed .chair .seat-no { opacity: 1; }
/* dark map theme (attendee) */
.seatmap.dark { --st-empty: #23223f; --st-empty-line: #3b3966; --st-assigned: #4a4794; }
.seatmap.dark .bus-body { fill: #15142b; stroke: #4a4880; }
.seatmap.dark .seat .seat-no { fill: #a8a6cf; }
.seatmap.dark .seat-back { fill: rgba(255,255,255,.06); }
.seatmap.dark .bus-aisle { stroke: #3b3966; }
.seatmap.dark .fx-driver rect, .seatmap.dark .fx-tl rect { fill: #1e1d38; stroke: #4a4880; }
.seatmap.dark .fx-driver text, .seatmap.dark .fx-tl text, .seatmap.dark .fx-label, .seatmap.dark .row-no, .seatmap.dark .front-label { fill: #8c8ab8; }
.seatmap.dark .fx-driver .wheel { stroke: #8c8ab8; }
.seatmap.dark .bus-wheel { fill: #000; }
.seatmap.dark .room-floor { fill: #1a1930; stroke: #3b3966; }
.seatmap.dark .carpet-line { stroke: rgba(255,255,255,.025); }
.seatmap.dark .rtable .table-top { fill: #26254a; stroke: #4a4880; }
.seatmap.dark .rtable .table-no { fill: #d7d5f2; }
.seatmap.dark .rtable.vip .table-top { fill: #3a3020; stroke: #b8862b; }
.seatmap.dark .rtable.t-me .table-top { fill: #4a3612; stroke: var(--amber); }
.seatmap.dark .fx-foh rect { fill: #1e1d38; stroke: #4a4880; } .seatmap.dark .fx-foh text { fill: #8c8ab8; }
.seatmap.dark .fx-dance { stroke: #3b3966; } .seatmap.dark .fx-dance-l { fill: #6d6b9c; }
.seatmap.dark .map-ctl button { background: #1e1d38; border-color: #34325c; color: #fff; }
.seatmap.dark .seat.is-me .seat-body { stroke: #0e0d1f; }

/* ---------- 3D */
.scene3d { position: relative; width: 100%; height: 100%; background: var(--night); overflow: hidden; }
.scene3d canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; }
.s3-loading { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 12px; color: #a8a6cf; font: 600 13px var(--f-mono); }
.s3-loading span { width: 26px; height: 26px; border-radius: 99px; border: 2.5px solid #34325c; border-top-color: var(--amber); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.s3-hud { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 6px 12px; border-radius: 99px; background: rgba(14,13,31,.7); color: #c9c7e8; font: 600 11.5px var(--f-mono); pointer-events: none; white-space: nowrap; backdrop-filter: blur(6px); }

/* ---------- tables & cards (panitia pages) */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-h h3 { margin: 0; font-size: 16px; font-weight: 800; }
.card-b { padding: 16px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { width: min(320px, 100%); }
.toolbar select { height: 40px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px; background: #fff; }
.tbl-wrap { overflow: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 700 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 11px 12px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid #ece8de; vertical-align: middle; }
.tbl tr:hover td { background: #f6f4ee; }
.tbl .code { font: 700 13px var(--f-code); letter-spacing: .08em; background: var(--paper-2); padding: 3px 7px; border-radius: 6px; cursor: pointer; }
.tbl .acts { white-space: nowrap; text-align: right; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); position: relative; overflow: hidden; }
.kpi .v { font-size: 36px; font-weight: 800; line-height: 1; margin: 10px 0 4px; letter-spacing: -.035em; }
.kpi .v small { font-size: 16px; color: var(--muted); font-weight: 700; }
.kpi .s { font-size: 12.5px; color: var(--muted); }
.kpi.dark { background: var(--ink); color: #fff; border-color: var(--ink); } .kpi.dark .eyebrow, .kpi.dark .s { color: #a5a3c9; }
.kpi .spark { position: absolute; right: 14px; top: 14px; }
.report-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.feed { max-height: 560px; overflow: auto; }
.feed-item { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #ece8de; font-size: 13.5px; }
.feed-item time { font: 600 11.5px var(--f-mono); color: var(--muted); padding-top: 2px; }
.feed-item .who { font: 700 11px var(--f-mono); color: var(--navy); text-transform: uppercase; letter-spacing: .06em; }
.matrix td.n { font: 700 13px var(--f-mono); text-align: center; }
.matrix td.n.z { color: var(--line-2); }
.unit-row-bar { width: 160px; }
.lo-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.lo-card { padding: 16px; }
.lo-card .row { margin-bottom: 10px; }
.lo-card .chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 12px; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.check-list label { display: flex; gap: 8px; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.check-list input { accent-color: var(--ink); width: 16px; height: 16px; }
.preview-box { height: 340px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper-2); overflow: hidden; }
.unit-form { display: grid; grid-template-columns: 1fr 1.1fr; gap: 18px; }
@media (max-width: 980px) { .kpis { grid-template-columns: 1fr 1fr; } .report-grid, .unit-form { grid-template-columns: 1fr; } .grid3 { grid-template-columns: 1fr 1fr; } }

/* ================================================================ LO (mobile-first, daylight) */
.lo { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
.lo-top { position: sticky; top: 0; z-index: 10; background: var(--ink); color: #fff; padding: 12px 14px 0; padding-top: max(12px, env(safe-area-inset-top)); }
.lo-top .row { justify-content: space-between; }
.lo-top .logo-mark { background: #000; } .lo-top .logo-word { font-size: 16px; }
.lo-top .icon-btn { color: #c7c5e5; } .lo-top .icon-btn:hover { background: #24234a; color: #fff; }
.unit-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.unit-tabs button { flex: none; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid #34325c; background: transparent; color: #c7c5e5; font-weight: 700; cursor: pointer; display: inline-flex; gap: 7px; align-items: center; }
.unit-tabs button.on { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.lo-progress { padding: 16px 14px 6px; }
.lo-big { display: flex; align-items: flex-end; gap: 10px; }
.lo-big .n { font-size: 56px; font-weight: 800; line-height: .9; letter-spacing: -.045em; }
.lo-big .of { font-size: 18px; font-weight: 700; color: var(--muted); padding-bottom: 6px; }
.lo-big .pct { margin-left: auto; text-align: right; }
.lo-big .pct b { display: block; font: 800 26px var(--f-mono); }
.lo-bar { height: 12px; border-radius: 99px; margin: 12px 0 8px; }
.lo-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.lo-stats button { padding: 9px 6px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); text-align: left; cursor: pointer; }
.lo-stats button.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--amber); }
.lo-stats b { display: block; font: 800 19px var(--f-mono); }
.lo-stats span { font-size: 11.5px; color: var(--muted); display: flex; gap: 5px; align-items: center; }
.lo-mode { display: flex; gap: 8px; align-items: center; padding: 10px 14px; }
.lo-mode .seg { flex: 1; } .lo-mode .seg button { flex: 1; justify-content: center; }
.lo-map { height: 64vh; min-height: 420px; margin: 0 10px; border-radius: 16px; background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; }
.quick { display: flex; align-items: center; gap: 10px; padding: 10px 14px 4px; font-size: 13.5px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 99px; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + i { background: var(--green); } .switch input:checked + i::after { transform: translateX(18px); }
.lo-list { padding: 4px 10px 120px; }
.lo-item { display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.lo-item .seat-badge { min-width: 50px; height: 46px; font-size: 16px; }
.lo-item.seated .seat-badge { background: var(--green); color: #fff; }
.lo-item.absent .seat-badge { background: var(--red); color: #fff; }
.lo-item .nm { font-weight: 750; line-height: 1.2; }
.lo-item .mt { font-size: 12.5px; color: var(--muted); }
.lo-item .go { margin-left: auto; display: flex; gap: 6px; }
.tick { width: 46px; height: 46px; border-radius: 13px; border: 1.5px solid var(--line-2); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.tick .ic { width: 22px; height: 22px; }
.tick.on { background: var(--green); border-color: var(--green); color: #fff; }
.tick.abs.on { background: var(--red); border-color: var(--red); }
.sheet-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(14,13,31,.4); opacity: 0; transition: opacity .2s; }
.sheet-wrap.in { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--card); border-radius: 22px 22px 0 0; padding: 10px 16px max(18px, env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .28s var(--ease); max-width: 560px; margin: 0 auto; }
.sheet-wrap.in .sheet { transform: none; }
.sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: var(--line-2); margin: 0 auto 14px; }
.sheet .sh-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.sheet .sh-head .seat-badge { min-width: 64px; height: 64px; font-size: 22px; }
.sheet .sh-name { font-size: 20px; font-weight: 800; line-height: 1.15; }
.sheet .sh-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet .sh-acts .btn { height: 52px; }
.sheet dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 16px; font-size: 14px; }
.sheet dt { color: var(--muted); }
.sheet dd { margin: 0; font-weight: 600; }
@media (min-width: 900px) { .lo-body { display: grid; grid-template-columns: 1fr 420px; gap: 0 12px; padding: 0 12px; } .lo-map { margin: 0; height: calc(100vh - 290px); } .lo-list { padding: 0 0 40px; max-height: calc(100vh - 230px); overflow: auto; } }

/* ================================================================ ATTENDEE (night) */
body.is-attendee { background: var(--night); color: #ecebf8; }
.att { max-width: 1080px; margin: 0 auto; padding: 14px 16px 60px; padding-top: max(14px, env(safe-area-inset-top)); }
.att-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.att-top .logo-mark { background: #000; } .att-top .logo-word { font-size: 16px; }
.att-top .icon-btn { color: #a8a6cf; } .att-top .icon-btn:hover { background: #1e1d38; color: #fff; }
.hello { margin: 4px 0 18px; }
.hello .eyebrow { color: #8b89b6; }
.hello h1 { margin: 6px 0 0; font-size: clamp(30px, 6vw, 46px); font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.place-tabs { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; }
.place-tabs button { height: 40px; padding: 0 16px; border-radius: 99px; border: 1px solid #34325c; background: transparent; color: #c9c7e8; font-weight: 700; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.place-tabs button.on { background: #fff; color: var(--ink); border-color: #fff; }
.att-grid { display: grid; grid-template-columns: 380px 1fr; gap: 18px; align-items: start; }
.pass { position: relative; background: #f6f3ea; color: var(--ink); border-radius: 22px; overflow: hidden; box-shadow: 0 40px 70px -40px #000; }
.pass-head { background: var(--ink); color: #fff; padding: 16px 18px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; border-bottom: 3px solid var(--amber); }
.pass-head b { font-size: 15px; font-weight: 800; line-height: 1.25; display: block; max-width: 220px; }
.pass-head small { font: 600 11px var(--f-mono); color: #a5a3c9; letter-spacing: .06em; }
.pass-kind { font: 800 10.5px var(--f-mono); letter-spacing: .16em; padding: 5px 8px; border-radius: 6px; background: var(--amber); color: var(--ink); white-space: nowrap; }
.pass-main { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 18px 18px 10px; align-items: end; }
.pass-main .eyebrow { margin-bottom: 8px; }
.pass-unit { font-size: 30px; font-weight: 800; line-height: .95; letter-spacing: -.01em; }
.pass-seat { text-align: right; }
.pass-seat .flap { font-size: 46px; display: inline-flex; line-height: 1; }
.pass-seat .flap .flap-c { width: .72em; height: 1.18em; border-radius: 5px; }
.pass-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; padding: 6px 18px 16px; }
.pass-meta div b { display: block; font-size: 14.5px; font-weight: 750; margin-top: 4px; }
.perf { position: relative; height: 22px; }
.perf::before { content: ""; position: absolute; left: 18px; right: 18px; top: 50%; border-top: 2px dashed #cfc9b8; }
.perf::after, .perf i { content: ""; position: absolute; top: 0; width: 22px; height: 22px; border-radius: 99px; background: var(--night); }
.perf::after { right: -11px; } .perf i { left: -11px; }
.pass-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px 18px; }
.pass-code { font: 800 22px var(--f-code); letter-spacing: .2em; }
.barcode { height: 38px; width: 120px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 12px); opacity: .9; border-radius: 2px; }
.status-pill { display: flex; gap: 10px; align-items: center; margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: #1a1930; border: 1px solid #2f2d52; font-size: 14px; }
.status-pill .ic { width: 22px; height: 22px; }
.status-pill.ok { background: rgba(30,158,106,.14); border-color: rgba(30,158,106,.5); color: #7fe0b5; }
.status-pill.bad { background: rgba(214,69,69,.14); border-color: rgba(214,69,69,.45); color: #ff9e9e; }
.att-side { display: grid; gap: 12px; }
.panel-dark { background: var(--night-2); border: 1px solid var(--night-line); border-radius: 18px; padding: 14px 16px; }
.panel-dark h4 { margin: 0 0 10px; font: 700 11px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: #8b89b6; }
.mates { display: flex; flex-wrap: wrap; gap: 6px; }
.mate { display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px 6px 6px; border-radius: 99px; background: #23223f; font-size: 13px; }
.mate i { font: 800 11px var(--f-mono); font-style: normal; background: #34325c; color: #fff; border-radius: 99px; min-width: 26px; height: 22px; display: grid; place-items: center; padding: 0 6px; }
.lo-contact { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.lo-contact .btn { margin-left: auto; background: #25d366; border-color: #25d366; color: #052e16; height: 36px; }
.viewer { background: var(--night-2); border: 1px solid var(--night-line); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; }
.viewer-tools { display: flex; gap: 8px; align-items: center; padding: 10px; border-bottom: 1px solid var(--night-line); flex-wrap: wrap; }
.viewer .seg { background: #0e0d1f; } .viewer .seg button { color: #8b89b6; } .viewer .seg button.on { background: #fff; color: var(--ink); }
.viewer-tools .btn { background: #22213f; border-color: #34325c; color: #e4e3f5; height: 36px; font-size: 13px; }
.viewer-stage { height: min(68vh, 640px); min-height: 420px; position: relative; }
.att-empty { text-align: center; padding: 60px 20px; border: 1px dashed #34325c; border-radius: 22px; color: #a8a6cf; }
.att-empty h2 { color: #fff; }
@media (max-width: 900px) {
  .att-grid { grid-template-columns: 1fr; }
  .viewer-stage { height: 62vh; min-height: 380px; }
  .pass-unit { font-size: 26px; } .pass-seat .flap { font-size: 40px; }
}

/* ================================================================ PRINT (manifest) */
#print-root { display: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; color: #000; font-size: 10.5pt; }
  .pr-page { page-break-after: always; }
  .pr-page:last-child { page-break-after: auto; }
  .pr-title { text-align: center; font-weight: 800; font-size: 14pt; letter-spacing: .04em; margin: 0 0 10px; }
  .pr-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
  .pr-head table td { padding: 1px 8px 1px 0; font-size: 9.5pt; }
  .pr-unit { border: 2px solid #000; border-radius: 8px; padding: 6px 14px; font-weight: 800; font-size: 13pt; }
  .pr-body { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 10px; align-items: start; }
  .pr-body.wide { grid-template-columns: 1fr; }
  .pr-map { border: 1.5px solid #000; padding: 6px; }
  .pr-map svg { width: 100%; height: auto; max-height: 230mm; }
  .pr-map .seat .seat-body { fill: #fff !important; stroke: #000 !important; stroke-width: 1.4 !important; }
  .pr-map .seat .seat-no { fill: #000 !important; } .pr-map .seat-name { fill: #000 !important; font-size: 6px !important; }
  .pr-map .seat.st-seated .seat-body { fill: #e6e6e6 !important; }
  .pr-map .door-gap, .pr-map .fx-rdoor rect { fill: #000; } .pr-map .fx-stage rect { fill: #000; } .pr-map .stage-lip { fill: #000; }
  .pr-list { width: 100%; border-collapse: collapse; font-size: 8.6pt; }
  .pr-list th, .pr-list td { border: 1px solid #000; padding: 2px 5px; text-align: left; }
  .pr-list th { background: #eee; }
  .pr-list td.no { width: 24px; text-align: center; font-weight: 700; }
  .pr-sign { display: flex; justify-content: space-between; margin-top: 14px; font-size: 9pt; }
  .pr-sign div { width: 45%; text-align: center; } .pr-sign div span { display: block; margin-top: 46px; border-top: 1px solid #000; padding-top: 3px; }
  .pr-tables { columns: 3; column-gap: 10px; font-size: 8.4pt; }
  .pr-tables .t { break-inside: avoid; border: 1px solid #000; padding: 4px 6px; margin-bottom: 6px; }
  .pr-tables .t b { display: block; border-bottom: 1px solid #000; margin-bottom: 2px; }
}

/* LO mobile: one pane at a time */
@media (max-width: 899px) {
  .lo-body[data-mode="map"] .lo-list { display: none; }
  .lo-body[data-mode="list"] .lo-mapcol { display: none; }
}
@media (min-width: 900px) { .lo-mode { display: none; } }

body { font-variant-numeric: tabular-nums; }
.eyebrow, .field > span, .tbl th { letter-spacing: .09em; }
.code-boxes input { min-width: 0; width: 100%; padding: 0; }
.login-panel, .login-form { min-width: 0; }
@media (max-width: 380px) { .code-boxes { gap: 5px; } .code-boxes input { height: 52px; font-size: 22px; } .tabs button { font-size: 13.5px; gap: 5px; } }
.board-a, .board-b { white-space: nowrap; }
@media (max-width: 520px) { .board-row { grid-template-columns: 7.4em 1fr auto; font-size: 12.5px; gap: 8px; } .board-st { font-size: 9px; } }

/* ---------- 4-digit code */
.code-boxes { grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 360px; }
.code-boxes input { height: 76px; font-size: 36px; border-radius: 16px; }
.code-pill { font: 800 12px var(--f-code); letter-spacing: .12em; background: var(--ink); color: var(--amber); padding: 2px 6px; border-radius: 5px; }
.pass-code { letter-spacing: .35em; font-size: 28px; }

/* ---------- panitia on phones */
.plot-mtabs { display: none; }
@media (max-width: 980px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .topbar .sub { display: none; }
  #topActs { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  #topActs .btn { flex: none; }
  .page.flush { overflow: hidden; }
  .plot { display: flex; flex-direction: column; height: 100%; }
  .plot-mtabs { display: flex; margin: 8px 10px 0; flex: none; }
  .plot-mtabs button { flex: 1; justify-content: center; height: 38px; font-size: 14px; }
  .rail { flex: none; padding: 8px 10px; border-bottom: 1px solid var(--line); }
  .rail .add-unit { display: flex; flex: none; margin: 0; }
  .rail .add-unit .btn { min-width: 120px; height: 100%; }
  .unit-card { min-width: 168px; padding: 9px 10px; }
  .unit-card .uc-meta { margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stage-area { flex: 1; min-height: 0; height: auto; }
  .people { flex: 1; min-height: 0; height: auto; }
  .plot[data-m="map"] .people { display: none; }
  .plot[data-m="people"] .stage-area { display: none; }
  .plot[data-m="people"] .rail { display: none; }
  .map-tools { padding: 8px 10px; gap: 6px; }
  .map-tools .title { font-size: 15px; }
  .map-tools .tmpl { font-size: 11.5px; }
  .map-tools .btn.sm { height: 30px; padding: 0 9px; font-size: 12px; }
  .legend { font-size: 11px; gap: 8px; padding: 6px 10px; }
  .legend span:last-child { display: none; }
  .armed-bar { top: auto; bottom: 46px; left: 10px; right: 10px; transform: none; max-width: none; justify-content: space-between; }
  .person { padding: 11px 8px; }
  .grp-h { top: 0; }
  .modal-wrap { padding: 0; align-items: end; }
  .modal { width: 100%; max-height: 94vh; border-radius: 20px 20px 0 0; }
  .modal-foot { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
  .preview-box { height: 260px; }
  .lo-cards { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .grid2 { grid-template-columns: 1fr; }
  .toolbar .search { width: 100%; }
  .toolbar select { flex: 1; }
  .card:has(> .tbl-wrap > .tbl.cards) { background: transparent; border: 0; box-shadow: none; }
  .tbl.cards thead { display: none; }
  .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; width: 100%; }
  .tbl.cards tr { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; padding: 12px 12px 10px 42px; }
  .tbl.cards tr:hover td { background: transparent; }
  .tbl.cards td { border: 0; padding: 2px 0; font-size: 13.5px; }
  .tbl.cards td.nm { font-size: 15.5px; padding-right: 76px; margin-bottom: 4px; }
  .tbl.cards td[data-l]::before { content: attr(data-l); display: inline-block; width: 70px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .tbl.cards td.chk { position: absolute; left: 12px; top: 14px; width: auto; padding: 0; }
  .tbl.cards td.acts { position: absolute; right: 6px; top: 6px; width: auto; }
  .kpi .v { font-size: 30px; }
}
#mvCount:not(:empty) { background: var(--amber); color: var(--ink); border-radius: 99px; padding: 1px 7px; font-size: 11.5px; font-weight: 800; }
.rtable { cursor: zoom-in; }
@media (max-width: 980px) {
  .unit-card { min-width: 142px; }
  .unit-card .uc-meta { display: none; }
  .unit-card .uc-top b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .unit-card .bar { margin-top: 6px; }
  .map-tools { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .map-tools > div:first-child { flex: none; max-width: 46vw; }
  .map-tools .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .map-tools .tmpl { white-space: nowrap; }
  .map-tools > div[style*="flex:1"] { display: none; }
  .map-tools .seg, .map-tools .btn { flex: none; }
  .legend { display: none; }
  .armed-bar { bottom: 10px; }
}

/* ================================================================ PANITIA — tidy pass */
.topbar .sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar .sub b { color: var(--ink-2); font-weight: 650; }
.sep { width: 4px; height: 4px; border-radius: 99px; background: var(--line-2); display: inline-block; }
.page { scrollbar-gutter: stable; }
.kpi .kbar { height: 5px; margin: 8px 0 6px; }
.kpi.live .v { color: var(--green); }

/* dashboard */
.dash { display: grid; gap: 16px; max-width: 1360px; }
.dash .kpis { margin: 0; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.dash-hero { display: flex; align-items: stretch; justify-content: space-between; gap: 18px; padding: 22px 24px; border-radius: 18px; color: #fff; overflow: hidden; position: relative;
  background: radial-gradient(90% 140% at 100% 0%, rgba(245,165,36,.22), transparent 55%), radial-gradient(70% 120% at 0% 100%, #2d2b8f 0%, transparent 60%), var(--ink); }
.dash-hero::after { content: ""; position: absolute; right: 150px; top: -20px; bottom: -20px; width: 0; border-left: 2px dashed rgba(255,255,255,.14); }
.dh-main .eyebrow { color: #a5a3c9; }
.dh-main h2 { margin: 8px 0 12px; font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.dh-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #c9c7e8; font-size: 13.5px; }
.dh-meta span { display: inline-flex; align-items: center; gap: 7px; }
.dh-meta .ic { width: 16px; height: 16px; color: var(--amber); }
.dh-count { min-width: 120px; display: grid; align-content: center; justify-items: center; text-align: center; padding-left: 26px; }
.dh-count b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; color: var(--amber); line-height: 1; }
.dh-count span { font-size: 12px; color: #a5a3c9; margin-top: 6px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.sec-h { display: flex; align-items: center; gap: 10px; margin: 2px 2px 12px; }
.sec-h h3 { margin: 0; font-size: 16px; font-weight: 800; }
.unit-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tile { display: grid; gap: 12px; text-align: left; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); cursor: pointer; box-shadow: var(--shadow); transition: transform .18s var(--ease), border-color .18s, box-shadow .18s; }
.tile:hover { transform: translateY(-2px); border-color: var(--ink-2); box-shadow: 0 18px 34px -22px rgba(18,17,42,.45); }
.tile-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.tile-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #e4e3f6; color: var(--navy); flex: none; }
.tile-ic.ballroom { background: var(--amber-soft); color: var(--amber-ink); }
.tile-ic .ic { width: 21px; height: 21px; }
.tile-t { min-width: 0; }
.tile-t b { display: block; font-size: 15.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-t small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-nums { display: flex; gap: 18px; }
.tile-nums b { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.tile-nums span { font-size: 12px; color: var(--muted); margin-left: 3px; }
.tile-nums .g b { color: var(--green); } .tile-nums .r b { color: var(--red); }
.tile-foot { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); padding-top: 10px; border-top: 1px dashed var(--line); min-width: 0; }
.tile-foot .ic { width: 15px; height: 15px; color: var(--muted); flex: none; }
.tile-foot .warn { color: #b25e00; font-weight: 650; }
.tile-foot .go { margin-left: auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 99px; background: var(--paper-2); transition: background .15s, color .15s; }
.tile:hover .tile-foot .go { background: var(--ink); color: var(--amber); }
.tile:hover .tile-foot .go .ic { color: var(--amber); }
.dash-side { display: grid; gap: 16px; }
.steps { list-style: none; margin: 0; padding: 6px 8px 8px; }
.steps li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px 8px; border-radius: 11px; }
.steps li + li { border-top: 1px dashed var(--line); }
.steps .st-ic { width: 24px; height: 24px; border-radius: 99px; border: 2px solid var(--line-2); display: grid; place-items: center; }
.steps li.ok .st-ic { background: var(--green); border-color: var(--green); color: #fff; }
.steps .st-ic .ic { width: 14px; height: 14px; stroke-width: 2.6; }
.steps b { display: block; font-size: 14px; }
.steps small { display: block; font-size: 12px; color: var(--muted); }
.steps li.ok b { color: var(--ink-2); }
.feed.mini { max-height: 330px; }
.feed.mini .feed-item { padding: 9px 14px; font-size: 13px; }

/* plot toolbar: single row */
.map-tools { flex-wrap: nowrap; }
.mt-title { min-width: 0; flex: 1; }
.mt-title .title, .mt-title .tmpl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-tools > div[style*="flex:1"] { display: none; }
.map-tools .seg, .map-tools .btn, .map-tools .icon-btn { flex: none; }

/* people table */
.tbl td { white-space: nowrap; }
.tbl td.nm { white-space: normal; min-width: 160px; }
.seat-cell { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-2); }
.seat-cell b { color: var(--ink); font-weight: 750; }
.seat-cell.none { color: #b25e00; font-size: 12.5px; font-weight: 600; }
.seat-cell .dot { border-radius: 99px; width: 8px; height: 8px; }

/* report */
.u-cell b { white-space: nowrap; }
.u-cell .muted { font-size: 12px; white-space: nowrap; }
.lo-cell { font-size: 12.5px; white-space: normal !important; min-width: 120px; }

@media (max-width: 1200px) { .dash-grid { grid-template-columns: 1fr; } .dash-side { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .dash-hero { flex-direction: column; padding: 18px; }
  .dash-hero::after { display: none; }
  .dh-count { justify-items: start; text-align: left; padding: 12px 0 0; border-top: 1px dashed rgba(255,255,255,.18); grid-auto-flow: column; gap: 10px; align-items: baseline; justify-content: start; }
  .dh-count b { font-size: 26px; }
  .dash .kpis { grid-template-columns: 1fr 1fr; }
  .dash-side { grid-template-columns: 1fr; }
  .sec-h { flex-wrap: wrap; }
  .tbl.cards td { white-space: normal; }
}
@media (max-width: 980px) {
  .topbar .sub { display: none; }
  .topbar > div:nth-child(2) { flex: 1; min-width: 0; }
  .sec-h .muted { display: none; }
  .sec-h h3 { flex: 1; }
}

/* Panitia <-> LO mode switch (admin only) */
.mode-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--paper-2); flex: none; }
.mode-switch a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; font-weight: 700; font-size: 13px; color: var(--muted); text-decoration: none; cursor: pointer; }
.mode-switch a:hover { color: var(--ink); }
.mode-switch a.on { background: var(--ink); color: #fff; cursor: default; }
.mode-switch a.on .ic { color: var(--amber); }
.mode-switch .ic { width: 16px; height: 16px; }
.mode-switch.dark { background: #22213f; }
.mode-switch.dark a { color: #b9b7d8; height: 30px; padding: 0 10px; }
.mode-switch.dark a:hover { color: #fff; }
.mode-switch.dark a.on { background: var(--amber); color: var(--ink); }
.mode-switch.dark a.on .ic { color: var(--ink); }
.nav a.nav-lo { margin-top: 8px; border: 1px dashed #34325c; }
@media (max-width: 980px) {
  .topbar .mode-switch { order: 2; }
  .topbar .mode-switch a { height: 30px; padding: 0 10px; }
  .topbar #topActs { order: 3; }
}
@media (max-width: 420px) { .mode-switch a span { display: none; } .mode-switch a { padding: 0 10px; } }
