/* Crowdcue staff portal — layered on top of /app.css */
.badge.staff { background: rgba(251,191,36,.12); color: #fbbf24; border-color: rgba(251,191,36,.35); }
.center-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.center-page .card { width: 100%; max-width: 420px; }
.center-page .brandrow { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.center-page h2 { margin-bottom: 4px; } .center-page .lead { color: var(--muted); font-size: .92rem; margin: 0 0 18px; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; background: #000; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.qrbox { background: #fff; border-radius: 12px; padding: 8px; width: 200px; margin: 0 auto; } .qrbox svg { width: 100%; height: auto; display: block; }

/* shell */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { border-right: 1px solid var(--line); background: #040405; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .brand { padding: 4px 8px 18px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .ico { flex: none; opacity: .85; }
.nav .top { appearance: none; border: 0; background: transparent; width: 100%; font: inherit; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: #c4c4d0; text-decoration: none; font-weight: 560; font-size: .9rem; }
.nav .top:hover { background: var(--raised); color: var(--ink); }
.nav a.top.on { background: var(--brand-soft); color: #fff; box-shadow: inset 2px 0 0 var(--brand); } .nav a.top.on .ico { color: #8db7ff; opacity: 1; }
.nav .top > span:not(.n) { flex: 1; min-width: 0; }
.nav .top .n, .nav .sub .n { margin-left: auto; line-height: 1.5; min-width: 20px; text-align: center; font-size: .72rem; background: rgba(0,88,255,.22); color: #8db7ff; border-radius: 99px; padding: 1px 7px; font-weight: 600; }
.nav .grp > .top > .ico:last-child { margin-left: 0; transition: transform .2s ease; opacity: .55; } .nav .grp:not(.open) > .top > .ico:last-child { transform: rotate(-90deg); }
.nav .grp.open > .top .n.dot { display: none; }
.nav .grp.has-on > .top { color: #fff; }
.nav .kids { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; } .nav .grp.open > .kids { grid-template-rows: 1fr; }
.nav .kids-in { overflow: hidden; min-height: 0; margin-left: 19px; padding-left: 8px; border-left: 1px solid var(--line); }
.nav .grp.open .kids-in { margin-top: 2px; margin-bottom: 4px; }
.nav a.sub { display: flex; align-items: center; gap: 9px; padding: 7px 10px; margin: 1px 0; border-radius: 7px; color: #a6a6b4; text-decoration: none; font-weight: 520; font-size: .86rem; position: relative; }
.nav a.sub:hover { background: var(--raised); color: var(--ink); }
.nav a.sub.on { color: #fff; background: var(--brand-soft); } .nav a.sub.on .ico { color: #8db7ff; }
.nav a.sub.on::before { content: ''; position: absolute; left: -9px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--brand); }
.nav .top:focus-visible, .nav a.sub:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.side .who { margin-top: auto; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font-size: .8rem; }
.side .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .side .who span { color: var(--muted); }
.main { padding: 26px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 1.5rem; letter-spacing: -.03em; margin: 0; } .page-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type=text] { max-width: 300px; padding: 8px 11px; font-size: .9rem; border-radius: 8px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pillbtn { appearance: none; border: 1px solid var(--line); background: transparent; color: #b9b9c6; padding: 6px 12px; border-radius: 99px; font: inherit; font-size: .84rem; font-weight: 550; cursor: pointer; }
.pillbtn:hover { color: var(--ink); border-color: var(--line-strong); } .pillbtn.on { background: var(--brand-soft); color: #fff; border-color: rgba(0,88,255,.5); }

/* data */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--card); }
.stat b { display: block; font-size: 1.8rem; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; } .stat span { color: var(--muted); font-size: .82rem; } .stat small { display: block; color: var(--muted); margin-top: 4px; font-size: .76rem; }
.stat.warn b { color: #fbbf24; } .stat.bad b { color: var(--bad); } .stat.good b { color: var(--ok); }
.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin-bottom: 18px; overflow: hidden; }
.panel > h3 { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: .95rem; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel .pad { padding: 16px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; } .scroll { overflow-x: auto; }
.tbl th { text-align: left; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; } .tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: rgba(255,255,255,.025); }
.tbl .sub { color: var(--muted); font-size: .8rem; display: block; margin-top: 1px; } .tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: .9rem; } .kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; } .grid2 > .panel { margin-bottom: 0; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.formgrid label { font-size: .78rem; } .formgrid select, .formgrid input, .formgrid textarea, .modal select, .modal textarea, .modal input[type=text], .modal input[type=email] { width: 100%; background: #000; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: .9rem; }
.formgrid select:focus, .formgrid input:focus, .formgrid textarea:focus, .modal select:focus, .modal textarea:focus, .modal input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,88,255,.25); }
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); text-decoration: none; font-size: .85rem; margin-bottom: 10px; } .back:hover { color: var(--ink); }
.tag { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 6px; background: var(--raised); border: 1px solid var(--line); color: #c9c9d3; }
.banner { border: 1px solid rgba(248,113,113,.4); background: var(--bad-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-size: .9rem; }
.banner.warn { border-color: rgba(251,191,36,.4); background: var(--warn-soft); }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* drawer + modal */
.veil { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 90; animation: fadeIn .2s ease both; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: #08080a; border-left: 1px solid var(--line-strong); z-index: 91; overflow: auto; padding: 22px; animation: slideIn .28s cubic-bezier(.2,.8,.2,1) both; }
.modal { position: fixed; z-index: 92; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto; background: #0b0b0e; border: 1px solid var(--line-strong); border-radius: 16px; padding: 22px; box-shadow: 0 30px 80px -10px #000; animation: popIn .22s ease both; }
.modal h3 { margin: 0 0 6px; font-size: 1.1rem; } .modal p { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }
.modal .row2 { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin-top: 12px; } .check input { margin-top: 3px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%); } }
.view-anim { animation: viewIn .3s cubic-bezier(.2,.8,.2,1) both; } @keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view-anim, .drawer, .modal, .veil { animation: none; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); align-items: center; }
  .side .brand { padding: 0 8px 0 0; } .nav { flex-direction: row; flex-wrap: wrap; gap: 2px; } .nav .kids, .nav .grp.open > .kids { display: contents; } .nav .kids-in { display: contents; } .nav .grp { display: contents; } .nav .grp > .top { display: none; } .nav a.sub { border: 0; } .nav a.sub.on::before { display: none; } .side .who { display: none; }
}

.modal .check select { width: auto; padding: 5px 8px; }

.kvlist { display: flex; flex-direction: column; gap: 10px; font-size: .9rem; } .kvrow { display: grid; grid-template-columns: 150px 1fr; gap: 14px; } .kvrow > :last-child { overflow-wrap: anywhere; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 130px; } .bar { flex: 1; min-width: 8px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar i { display: block; width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; } .bar small { color: var(--muted); font-size: .7rem; }
.panel .toolbar { margin-bottom: 4px; }
.bar { max-width: 56px; } .stats.six { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.nav .top .n.dot { margin-left: 0; }
