/* Deliberately plain: a designer will replace this. */
body { font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 0; background: #fafafa; color: #111; }
main { max-width: 860px; margin: 0 auto; padding: 16px; }
h2 { margin-top: 8px; }
section { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 12px 16px; margin: 12px 0; }
label { display: block; margin: 8px 0; }
label input:not([type=checkbox]), select, textarea { display: block; width: 100%; max-width: 420px; padding: 6px; font: inherit; box-sizing: border-box; }
label.check { display: flex; gap: 8px; align-items: center; }
button { font: inherit; padding: 6px 12px; margin: 4px 4px 4px 0; cursor: pointer; }
button.link { background: none; border: none; color: #0645ad; text-decoration: underline; padding: 0 4px; }
button.test { background: #fff3cd; border: 1px dashed #c69500; }
button.finance-term { display: inline; border: 0; padding: 0; margin: 0; background: transparent; color: inherit; font: inherit; text-align: inherit; text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
button.finance-term:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.finance-definition { position: fixed; z-index: 20; max-width: min(360px, calc(100vw - 32px)); padding: 8px 10px; border: 1px solid #777; background: #fff; color: #111; font-size: 14px; font-weight: normal; }
table { border-collapse: collapse; width: 100%; }
td, th { text-align: left; padding: 4px 8px; border-bottom: 1px solid #eee; vertical-align: top; }
.muted { color: #666; }
.top { text-align: right; font-size: 13px; }
.big { font-size: 20px; }
.error { color: #b00020; white-space: pre-wrap; margin: 0; padding: 0 16px; }
.card.grey { opacity: .55; }
.chip { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 12px; font-size: 14px; background: #ddd; }
.chip.green { background: #c8f7c5; } .chip.yellow { background: #fff2a8; } .chip.red { background: #ffc4c4; }
.chip.blue { background: #c6dcff; } .chip.white { background: #fff; border: 1px solid #999; } .chip.pink { background: #ffd0ec; }
.level.calm { color: #18794e; } .level.busy { color: #a35200; } .level.very-busy { color: #b00020; font-weight: bold; }
.pass { color: #18794e; } .fail { color: #b00020; font-weight: bold; } .info { color: #555; }
ul.cards { list-style: none; padding: 0; }
ul.cards li { padding: 8px 0; border-bottom: 1px solid #eee; }
.handle { margin-right: 10px; }
.face { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 8px; }
.photos, .merch { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
figure { margin: 0; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background: #fff; }
figure img, figure canvas { width: 100%; display: block; }
figcaption { padding: 8px; font-size: 14px; }
svg.spacetime { width: 100%; height: auto; background: #fff; }
svg.spacetime text { font-size: 13px; fill: #333; }
svg.spacetime .tick { fill: #888; font-size: 12px; }
svg.spacetime .grid { stroke: #eee; }
svg.spacetime .stay { fill: #4c8dff; opacity: .8; }
svg.spacetime .met { fill: #ff5c8a; stroke: #fff; stroke-width: 2; }
nav a, nav button { margin-right: 12px; }
nav .on { font-weight: bold; text-decoration: none; color: #111; }
.alert { background: #ffe1e1; border-color: #f99; }
code { background: #eee; padding: 1px 4px; border-radius: 3px; }
.venue-map canvas { width: 100%; display: block; background: #fff; }
.venue-3d { position: relative; }
.venue-3d canvas { width: 100%; display: block; }
tr.linked { cursor: pointer; }
tr.linked:hover td { background: #f3f6ff; }
.venue-tip { position: absolute; z-index: 2; max-width: 300px; padding: 6px 8px; background: #fff; border: 1px solid #999; font-size: 13px; pointer-events: none; }
.venue-names { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.venue-name { position: absolute; left: 0; top: 0; visibility: hidden; white-space: nowrap; font-size: 11px; line-height: 1.3; color: #dfe5ee; text-shadow: 0 0 3px #000, 0 0 5px #000; }
.venue-name.area { font-size: 13px; font-weight: 600; color: #fff; }
.venue-name.sponsor_table { font-weight: 600; color: #ffc864; }
.venue-name.exit { display: flex; flex-direction: column; align-items: center; color: #8fe0ff; }
.venue-name.exit small { font-size: 10px; font-weight: 600; }
.venue-name.band { display: flex; flex-direction: column; align-items: center; padding: 2px 7px; border-radius: 6px; background: #1d5cdc; color: #fff; font-size: 12px; text-shadow: none; }
.venue-name.band small { font-size: 10px; color: #cfe0ff; }
.venue-incidents { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.venue-incident { position: absolute; left: 0; top: 0; visibility: hidden; white-space: nowrap; padding: 4px 8px; border-radius: 6px; background: rgba(10, 14, 24, 0.86); color: #c9d3e3; font-size: 11px; line-height: 1.35; }
.venue-incident b { color: #fff; font-size: 13px; }
.venue-incident .pill { display: inline-block; margin-right: 6px; padding: 0 5px; border-radius: 4px; color: #0a0e18; font-size: 9px; font-weight: 700; line-height: 1.6; vertical-align: 2px; }
.venue-incident .waiting { color: #ffd166; }
.venue-medic { position: absolute; left: 0; top: 0; visibility: hidden; padding: 0 5px; border-radius: 4px; background: #16a34a; color: #fff; font-size: 13px; font-weight: 700; line-height: 1.3; }
.graph { position: relative; height: 70vh; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background: #0b1020; }
.graph:fullscreen { border-radius: 0; }
.graph-card { position: absolute; top: 8px; left: 8px; z-index: 2; max-width: 240px; padding: 8px; border-radius: 6px; background: rgba(255, 255, 255, .94); font-size: 13px; }
.graph-card img, .graph-tip img { display: block; width: 100%; margin-bottom: 6px; border-radius: 4px; }
.graph-tip { max-width: 220px; font-size: 13px; }
.graph-bar button.on { font-weight: bold; }
label.check.inline { display: inline-flex; margin: 0 8px; }
.legend span { margin-right: 14px; font-size: 14px; color: #555; white-space: nowrap; }
.legend i { display: inline-block; width: 16px; height: 3px; margin-right: 5px; vertical-align: middle; }
.legend i.dot { width: 9px; height: 9px; border-radius: 50%; }
.legend i.photo { border-radius: 1px; outline: 1px solid #888; }
.flow { display: flex; flex-direction: column; gap: 6px 0; }
.flow .step { border: 1px solid #ddd; border-radius: 8px; padding: 8px; background: #f6f8ff; font-size: 14px; }
.flow .step img { width: 100%; max-width: 320px; display: block; margin: 6px 0; border-radius: 4px; }
.flow .arrow { align-self: center; padding: 0 6px; color: #888; font-size: 20px; }
.flow .count { font-size: 20px; font-weight: bold; }
.flow .merch { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 6px; }
button.on { font-weight: bold; border-width: 2px; }
#head:empty { display: none; }
#head { padding-bottom: 0; }
#people:empty { display: none; }
#people input[type=search], input.search { display: block; width: 100%; max-width: 420px; padding: 6px; font: inherit; box-sizing: border-box; }
ul.results { list-style: none; margin: 4px 0; padding: 0; max-width: 420px; border: 1px solid #ddd; border-radius: 4px; }
ul.results:empty { display: none; }
ul.results button { display: block; width: 100%; margin: 0; padding: 6px 8px; border: 0; border-bottom: 1px solid #eee; background: #fff; text-align: left; }
ul.results button:hover, ul.results button.on { background: #eef3ff; }
#viewas { max-width: 1100px; margin: 0 auto; padding: 0 16px 24px; }
#viewas iframe { display: block; width: 100%; height: calc(100vh - 160px); min-height: 560px; border: 2px solid #888; border-radius: 12px; background: #fff; }
/* A page in the View as frame is read-only: its controls show but cannot be used. */
body.viewing button, body.viewing input, body.viewing select, body.viewing textarea { pointer-events: none; opacity: .55; }
body.viewing button.finance-term { pointer-events: auto; opacity: 1; }
/* Tables scroll by themselves instead of stretching the page. */
#app table { display: block; max-height: 60vh; overflow: auto; }
/* Their bottom-right corner drags them taller or shorter; a dragged height replaces the 60vh. */
#app table.resizable { resize: vertical; }
#app table[style*="height"] { max-height: none; }
/* The Live tab: incidents and the legend, the 3D venue, the decisions, side by side across the window. */
body.wide main { max-width: none; }
.live { display: grid; grid-template-columns: var(--left, 300px) 8px minmax(0, 1fr) 8px var(--right, 340px); gap: 12px 2px; align-items: start; }
.live section { margin-top: 0; }
/* The bars that drag the Live tab's side panels and its 3D view to a new size. */
.drag-bar { background: #e2e2e2; touch-action: none; user-select: none; -webkit-user-select: none; }
.drag-bar:hover { background: #b8b8b8; }
.drag-bar.x { align-self: stretch; cursor: col-resize; }
.drag-bar.y { height: 8px; cursor: row-resize; }
@media (max-width: 1100px) { .live { grid-template-columns: 1fr; } .live > .drag-bar { display: none; } }
.drag-band { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.drag-tag { position: fixed; z-index: 10; margin: 0; pointer-events: none; white-space: nowrap; }
