/* SRG Gate & Work Orders – indigo ink, signal colours, number-plate identity */
:root {
  --ink: #1b2a6b; --ink-2: #2b3d92; --ink-soft: #e6e9f6;
  --bg: #eef1f5; --paper: #ffffff; --line: #d5dae3; --text: #17202d; --muted: #5a6477;
  --go: #0e7a3e; --go-soft: #e3f4ea; --stop: #c21f1f; --stop-soft: #fbe7e7; --wait: #a86300; --wait-soft: #fdf1dc; --info: #1f5fbf; --info-soft: #e5eefb;
  --r: 10px; --r-sm: 6px;
  --font: "Barlow", "Segoe UI", Roboto, Arial, sans-serif; --cond: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --top: 56px; --side: 224px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 var(--font); }
a { color: var(--info); }
h1 { font: 700 1.6rem/1.15 var(--font); margin: .2rem 0 .8rem; letter-spacing: -.01em; }
h2 { font: 700 1.12rem/1.25 var(--font); margin: 0 0 .7rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
small, .small { font-size: .86rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
code { font-size: .85em; background: var(--ink-soft); padding: .05em .35em; border-radius: 4px; word-break: break-all; }
code.pw { font-size: 1.15rem; padding: .2em .5em; background: #fff; border: 1px dashed var(--ink); }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid #ffb400; outline-offset: 2px; }

/* ---------- frame */
.top { position: fixed; inset: 0 0 auto 0; height: var(--top); background: var(--ink); color: #fff; display: flex; align-items: center; gap: .8rem; padding: 0 1rem; z-index: 30; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 600; }
.mark { font: 700 1rem/1 var(--cond); letter-spacing: .06em; background: #fff; color: var(--ink); padding: .32rem .45rem; border-radius: 4px; border-left: 6px solid var(--info); }
.mark.big { font-size: 1.6rem; padding: .45rem .6rem; }
.unit { margin-left: auto; opacity: .8; font-size: .9rem; }
@media (max-width: 600px) { .unit { display: none; } .bname { font-size: .95rem; } .bell { margin-left: auto; } }
.bell { position: relative; color: #fff; display: grid; place-items: center; width: 44px; height: 44px; }
.bell b { position: absolute; top: 4px; right: 2px; background: var(--stop); color: #fff; font-size: .72rem; min-width: 19px; height: 19px; border-radius: 10px; display: grid; place-items: center; padding: 0 4px; }
.side { position: fixed; z-index: 25; background: var(--paper); border-top: 1px solid var(--line); inset: auto 0 0 0; height: 64px; display: flex; overflow-x: auto; scrollbar-width: none; padding-bottom: env(safe-area-inset-bottom); }
.side a { flex: 1 0 74px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .72rem; color: var(--muted); text-decoration: none; }
.side a.on { color: var(--ink); font-weight: 700; box-shadow: inset 0 3px 0 var(--ink); }
.main { padding: calc(var(--top) + 1rem) 1rem 6.5rem; max-width: 1100px; margin: 0 auto; }
.guest .main, .public .main { padding-top: 1.5rem; }
@media (min-width: 900px) {
  .side { inset: var(--top) auto 0 0; width: var(--side); height: auto; flex-direction: column; border-top: 0; border-right: 1px solid var(--line); padding: .6rem 0; overflow-y: auto; }
  .side a { flex: none; flex-direction: row; justify-content: flex-start; gap: .75rem; font-size: .95rem; padding: .7rem 1.2rem; }
  .side a.on { box-shadow: inset 4px 0 0 var(--ink); background: var(--ink-soft); }
  .authed .main { margin-left: var(--side); padding: calc(var(--top) + 1.5rem) 2rem 3rem; max-width: calc(1100px + var(--side)); }
}

/* ---------- account menu bottom-right */
.acct { position: fixed; right: 14px; bottom: 76px; z-index: 40; }
@media (min-width: 900px) { .acct { bottom: 18px; } }
.acct summary { list-style: none; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(27,42,107,.35); }
.acct summary::-webkit-details-marker { display: none; }
.acct-pop { position: absolute; right: 0; bottom: 58px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: .9rem 1rem; width: 250px; display: grid; gap: .45rem; box-shadow: 0 8px 28px rgba(0,0,0,.18); }
.acct-pop a, .linkbtn { color: var(--info); background: none; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; }

/* ---------- surfaces */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; margin: 0 0 1rem; }
.card.action { border-left: 5px solid var(--ink); }
.card.warnbox { border-left: 5px solid var(--wait); }
.card.good { border-left: 5px solid var(--go); }
.card.danger { border-left: 5px solid var(--stop); }
.card.narrow { max-width: 460px; }
section > h2 .count, h2 .count { font-weight: 600; color: var(--muted); font-size: .9rem; margin-left: .25rem; }
.flash { padding: .75rem 1rem; border-radius: var(--r-sm); margin: 0 0 1rem; background: var(--go-soft); color: #0b4d28; border: 1px solid #b9e0c8; }
.flash.err { background: var(--stop-soft); color: #7d1111; border-color: #f0c0c0; }
.flash.warn { background: var(--wait-soft); color: #6b3f00; border-color: #f1d49c; }
.flash.info { background: var(--info-soft); color: #173f7d; border-color: #c4d6f3; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); background: var(--paper); border: 1px dashed var(--line); border-radius: var(--r); margin-bottom: 1rem; }

/* ---------- forms */
label { display: grid; gap: .3rem; font-weight: 600; font-size: .92rem; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; font-weight: 400; color: var(--text); width: 100%; min-height: 46px; padding: .55rem .7rem; border: 1px solid #b9c1cf; border-radius: var(--r-sm); background: #fff; }
textarea { min-height: 70px; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: 2px solid var(--ink-soft); }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; min-height: 0; accent-color: var(--ink); }
.check { display: flex; align-items: center; gap: .6rem; font-weight: 500; }
.check.big { font-size: 1rem; padding: .6rem; background: var(--ink-soft); border-radius: var(--r-sm); }
fieldset { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .7rem; margin: 0; }
legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
.stack { display: grid; gap: .9rem; }
.grid2 { display: grid; gap: .8rem; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.row > input, .row > select { flex: 1 1 140px; width: auto; }
.qty { display: grid; grid-template-columns: 1.4fr 1fr; gap: .5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { display: inline-flex; font-weight: 500; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { padding: .55rem .85rem; border: 1px solid #b9c1cf; border-radius: 999px; background: #fff; cursor: pointer; min-height: 42px; display: inline-flex; align-items: center; }
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid #ffb400; }
.chips.small .chip span { padding: .3rem .6rem; min-height: 32px; font-size: .85rem; }
.cams { display: flex; flex-wrap: wrap; gap: .5rem; }
.cam { position: relative; flex: 1 1 140px; display: block; }
.cam input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.cam span { display: flex; align-items: center; justify-content: center; gap: .45rem; border: 2px dashed #9fa9bb; border-radius: var(--r-sm); min-height: 58px; padding: .5rem; color: var(--ink); font-weight: 600; background: #fafbfd; text-align: center; }
.cam em { display: block; font-style: normal; font-size: .78rem; color: var(--go); margin-top: .2rem; text-align: center; }
.cam.has span { border-style: solid; border-color: var(--go); background: var(--go-soft); color: var(--go); }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 46px; padding: .55rem 1.05rem; border-radius: var(--r-sm); border: 1px solid #aeb7c7; background: #fff; color: var(--ink); font: 600 .97rem var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--ink-2); }
.btn.ok { background: var(--go); border-color: var(--go); color: #fff; }
.btn.bad { background: var(--stop); border-color: var(--stop); color: #fff; }
.btn.amber { background: var(--wait); border-color: var(--wait); color: #fff; }
.btn.ghost { background: transparent; }
.btn.big { min-height: 54px; font-size: 1.05rem; padding: .7rem 1.3rem; }
.btn.huge { min-height: 64px; font-size: 1.12rem; width: 100%; }
.btn.big, .btn.huge, .stack > .btn { white-space: normal; text-align: center; max-width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.decide { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: .5rem; margin-top: .3rem; }
.decide .btn { white-space: normal; min-width: 0; padding-left: .5rem; padding-right: .5rem; }
@media (max-width: 480px) { .decide { grid-template-columns: 1fr 1fr; } .decide .btn:first-child { grid-column: 1 / -1; } }
html, body { overflow-x: hidden; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.sticky-actions { position: sticky; bottom: 70px; background: linear-gradient(rgba(238,241,245,0), var(--bg) 30%); padding-top: 1rem; z-index: 5; display: flex; gap: .5rem; }
@media (min-width: 900px) { .sticky-actions { bottom: 0; } }
.quick { display: grid; gap: .6rem; grid-template-columns: 1fr; margin-bottom: 1.4rem; }
@media (min-width: 640px) { .quick { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }

/* ---------- number plate */
.plate { display: inline-flex; align-items: center; font: 700 1.05rem/1 var(--cond); letter-spacing: .08em; color: #111; background: #fff; border: 2px solid #111; border-radius: 5px; padding: .28rem .55rem .28rem 1.5rem; position: relative; white-space: nowrap; }
.plate::before { content: "IND"; position: absolute; left: 0; top: 0; bottom: 0; width: 1.05rem; background: var(--info); color: #fff; font-size: .42rem; letter-spacing: 0; writing-mode: vertical-rl; transform: rotate(180deg); display: grid; place-items: center; border-radius: 2px 0 0 2px; }
.plate.sm { font-size: .92rem; padding: .2rem .45rem .2rem 1.3rem; }
.plate.sm::before { width: .9rem; }
.plate.big { font-size: 2rem; padding: .4rem .9rem .4rem 2.3rem; border-width: 3px; }
.plate.big::before { width: 1.5rem; font-size: .6rem; }
.plate-field { font: 700 1.5rem var(--cond); letter-spacing: .06em; text-transform: uppercase; min-width: 0; }
@media (max-width: 480px) { .plate-field { font-size: 1.3rem; letter-spacing: .03em; } .plate-input .btn { padding-left: .7rem; padding-right: .7rem; } }
.plate-input { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: end; }

/* ---------- badges, lists */
.badge { display: inline-block; padding: .18rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #e8ebf0; color: #3c4555; white-space: nowrap; vertical-align: middle; }
.badge.green { background: var(--go-soft); color: var(--go); }
.badge.red { background: var(--stop-soft); color: var(--stop); }
.badge.amber { background: var(--wait-soft); color: var(--wait); }
.badge.blue { background: var(--info-soft); color: var(--info); }
.badge.ink { background: var(--ink); color: #fff; }
.rows { list-style: none; margin: 0 0 1rem; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.rows li { border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows li > a, .rows.plain li { display: flex; align-items: center; gap: .8rem; padding: .75rem .9rem; color: inherit; text-decoration: none; flex-wrap: wrap; }
.rows li > a:hover { background: #f6f7fb; }
.rows .grow { flex: 1 1 200px; min-width: 0; display: grid; }
.rows .grow small { color: var(--muted); }
.list { list-style: none; padding: 0; margin: 0 0 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.list li { border-bottom: 1px solid var(--line); }
.list li:last-child { border: 0; }
.list a { display: block; padding: .85rem 1rem; color: inherit; text-decoration: none; }
.list a span { display: grid; }
.list small { color: var(--muted); }
.list li.unread a { font-weight: 600; border-left: 4px solid var(--info); }
.wo-no { font: 700 1rem var(--cond); letter-spacing: .04em; background: var(--ink-soft); color: var(--ink); padding: .25rem .5rem; border-radius: 4px; white-space: nowrap; }
.wo-no.big { font-size: 1.6rem; padding: .35rem .7rem; }
.queue h2 { margin-top: 1.2rem; }
.queue-link { display: block; padding: .85rem 1rem; background: var(--wait-soft); border: 1px solid #f1d49c; color: #6b3f00; border-radius: var(--r); margin-bottom: .6rem; font-weight: 600; text-decoration: none; }
.hello h1 { margin-bottom: .1rem; }
.hello { margin-bottom: 1rem; }

/* ---------- visit page */
.visit-head { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.2rem; margin-bottom: .8rem; }
.vh-meta h1 { margin: 0 0 .25rem; font-size: 1.3rem; }
.route { display: flex; list-style: none; padding: 0; margin: 0 0 1rem; counter-reset: s; gap: 3px; }
.route li { flex: 1; background: #dfe3ea; color: var(--muted); font-size: .8rem; font-weight: 600; text-align: center; padding: .45rem .2rem; display: grid; }
.route li:first-child { border-radius: 6px 0 0 6px; }
.route li:last-child { border-radius: 0 6px 6px 0; }
.route li.done { background: var(--ink); color: #fff; }
.route li.skip { background: repeating-linear-gradient(45deg, #eef0f4, #eef0f4 4px, #e3e6ec 4px, #e3e6ec 8px); }
.route li small { font-weight: 400; font-size: .68rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.checks li { display: flex; gap: .6rem; align-items: flex-start; }
.checks li span:last-child { display: grid; }
.checks small { color: var(--muted); }
.tick { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.checks .ok .tick { background: var(--go-soft); color: var(--go); }
.checks .no .tick { background: var(--stop-soft); color: var(--stop); }
.kv { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: .4rem .9rem; margin: 0 0 .6rem; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; }
.mline { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .7rem .8rem; margin-bottom: .6rem; border-left: 4px solid var(--wait); }
.mline.confirmed { border-left-color: var(--go); }
.mline.discrepancy { border-left-color: var(--stop); }
.mline.cancelled { opacity: .55; border-left-color: #999; }
.mline header { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; }
.mline p { margin: .4rem 0; }
.dir { font: 700 .75rem var(--cond); padding: .15rem .45rem; border-radius: 3px; color: #fff; background: var(--go); }
.dir.out { background: var(--wait); }
details.more { margin-top: .6rem; }
details.more > summary { cursor: pointer; color: var(--info); font-weight: 600; padding: .35rem 0; }
details.more[open] > summary { margin-bottom: .5rem; }
details.card > summary { cursor: pointer; }
.thumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.thumbs a { width: 92px; text-decoration: none; color: var(--muted); font-size: .72rem; display: grid; gap: 2px; }
.thumbs img { width: 92px; height: 70px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); background: #ddd; }
.thumbs .pdf b { width: 92px; height: 70px; display: grid; place-items: center; border-radius: 5px; background: var(--stop-soft); color: var(--stop); border: 1px solid #f0c0c0; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.timeline li { padding-left: .9rem; border-left: 3px solid var(--ink-soft); }
.timeline small { color: var(--muted); }
.timeline code { font-size: .74rem; }
.exc.pending { background: #fffaf0; }
.flags { margin: .3rem 0; padding-left: 1.2rem; color: var(--stop); font-size: .88rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; margin-bottom: .6rem; }
.stats div { background: var(--ink-soft); border-radius: var(--r-sm); padding: .6rem .7rem; display: grid; }
.stats b { font: 700 1.35rem var(--cond); color: var(--ink); }
.stats span { font-size: .8rem; color: var(--muted); }

/* ---------- tables */
.tbl-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 1rem; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { background: #f3f5f9; text-align: left; font-weight: 600; padding: .55rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
.tbl td { padding: .5rem .6rem; border-bottom: 1px solid #e8ebf0; vertical-align: top; }
.tbl tr[data-href] { cursor: pointer; }
.tbl tr[data-href]:hover td { background: #f6f7fb; }
.tbl tr.void td { text-decoration: line-through; color: var(--muted); }
@media (max-width: 640px) {
  .tbl-wrap .tbl thead { display: none; }
  .tbl-wrap .tbl tr { display: block; border-bottom: 1px solid var(--line); padding: .4rem .2rem; }
  .tbl-wrap .tbl td { display: grid; grid-template-columns: 40% 1fr; gap: .5rem; border: 0; padding: .2rem .5rem; }
  .tbl-wrap .tbl td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: .8rem; }
}

/* ---------- dashboard */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; margin-bottom: 1.4rem; }
.tile { display: grid; align-content: space-between; gap: .3rem; min-height: 104px; padding: .8rem .9rem; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); border-top: 5px solid var(--info); color: var(--text); text-decoration: none; }
.tile b { font: 700 2.2rem/1 var(--cond); color: var(--ink); }
.tile span { font-size: .86rem; line-height: 1.25; }
.tile.amber { border-top-color: var(--wait); } .tile.amber b { color: var(--wait); }
.tile.red { border-top-color: var(--stop); } .tile.red b { color: var(--stop); }
.tile.grey { border-top-color: #8a93a3; }
.tile.zero { border-top-color: var(--line); } .tile.zero b { color: #a3abb8; }
.tile:hover { border-color: var(--ink); }
.list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .6rem; }
.list-head h1 { margin: 0; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: .8rem; margin-bottom: 1rem; align-items: end; }
.filters.compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.filter-actions { display: flex; gap: .4rem; }
.seg { display: inline-flex; background: #dfe3ea; border-radius: 8px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg a { padding: .55rem 1.1rem; border-radius: 6px; text-decoration: none; color: var(--muted); font-weight: 600; }
.seg a.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg.wide { margin-bottom: 1rem; }
.perm-grid { display: grid; gap: .5rem; }
@media (min-width: 700px) { .perm-grid { grid-template-columns: 1fr 1fr; } }
.perm-grid code { font-size: .72rem; margin-left: auto; }
.master { margin-bottom: .5rem; }
.master-block { border-bottom: 1px solid var(--line); padding-bottom: .6rem; margin-bottom: .6rem; }

/* ---------- gate console */
.gate-top { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.gate-top select { width: auto; }
.reader { width: 100%; max-width: 480px; margin: 0 auto .8rem; border-radius: var(--r); overflow: hidden; }
#manual { margin-top: .8rem; }
.decision { display: grid; gap: .3rem; text-align: center; padding: 1.4rem 1rem; border-radius: var(--r); color: #fff; margin-bottom: 1rem; }
.decision b { font: 700 3rem/1 var(--cond); letter-spacing: .04em; }
.decision.small b { font-size: 1.8rem; }
.decision.allow { background: var(--go); }
.decision.deny { background: var(--stop); }
.decision.info { background: var(--ink); }
.decision.pending { background: var(--wait); }
.decision span { font-size: 1rem; opacity: .95; }
.reasons { margin: 0 0 1rem; padding-left: 1.2rem; font-size: 1.02rem; color: #7d1111; }
.gate-visit { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .gate-visit { grid-template-columns: 220px 1fr; } }
.gate-visit img { width: 100%; border-radius: var(--r-sm); border: 1px solid var(--line); }
.persons label { padding: .5rem; border: 1px solid var(--line); border-radius: var(--r-sm); }
.barrier { padding: 1rem; border-radius: var(--r); font-weight: 700; font-size: 1.05rem; margin: 1rem 0; text-align: center; }
.barrier.manual, .barrier.pending { background: var(--wait-soft); color: #6b3f00; }
.barrier.acked { background: var(--go-soft); color: var(--go); }
.barrier.simulated { background: var(--info-soft); color: var(--info); }
.barrier.failed, .barrier.expired { background: var(--stop-soft); color: var(--stop); }
.weight-read { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.weight-read input { flex: 1 1 170px; width: auto; }
.weight-read input { font: 700 2.4rem var(--cond); text-align: right; min-height: 70px; }
.weight-read span { font: 700 1.4rem var(--cond); }

/* ---------- login & public */
.login-main { max-width: 440px; }
.login { display: grid; gap: 1rem; margin-top: 8vh; }
.login-brand { display: flex; align-items: center; gap: .9rem; }
.login-brand div { display: grid; }
.login-brand span { color: var(--muted); font-size: .9rem; }
.login .card { display: grid; gap: .9rem; padding: 1.3rem; }
.pub { max-width: 560px; }
.pub-brand { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; color: var(--muted); font-size: .9rem; }
.qr-card { text-align: center; }
.qr { display: inline-block; background: #fff; padding: 10px; border-radius: 8px; border: 1px solid var(--line); }
.qr img, .qr svg { display: block; width: 180px; height: 180px; image-rendering: pixelated; }
.qr.big img, .qr.big svg { width: min(78vw, 300px); height: min(78vw, 300px); }

/* ---------- print / gate pass */
.print-doc { background: #fff; }
.print-doc .tbl.print { font-size: 13px; }
.print-doc .tbl.print small { font-size: 12px; color: var(--muted); }
.print-head h1 { margin: .2rem 0; }
.gatepass .gp { max-width: 760px; margin: 1rem auto; border: 2px solid var(--ink); border-radius: 8px; padding: 1rem 1.2rem; }
.gp header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--ink); padding-bottom: .6rem; margin-bottom: .8rem; }
.gp header div { display: grid; }
.gp-kind { font: 700 1.4rem var(--cond); letter-spacing: .06em; padding: .3rem .8rem; color: #fff; background: var(--ink); border-radius: 4px; }
.gp-kind.exit { background: var(--go); }
.gp-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.gp-top > div { display: grid; grid-template-columns: auto auto; gap: .1rem .6rem; align-items: baseline; }
.gp-no { font: 700 1.3rem var(--cond); }
.gp-qrs { display: flex; gap: 1.5rem; justify-content: center; margin: .8rem 0; }
.gp-qrs figure { margin: 0; text-align: center; font-size: .8rem; }
@media print {
  .noprint, .top, .side, .acct { display: none !important; }
  body { background: #fff; }
  .gatepass .gp { border-width: 1px; margin: 0; }
  .tbl th { position: static; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* roster */
.tbl.roster th[scope=row] { white-space: nowrap; background: var(--paper); position: sticky; left: 0; z-index: 1; }
.tbl.roster td { padding: .25rem; min-width: 92px; }
.tbl.roster .today { background: #fffbe8; }
.tbl.roster td.short { box-shadow: inset 0 0 0 2px #f1b44c; }
.cell { display: flex; flex-direction: column; gap: 3px; min-height: 52px; padding: .3rem; border-radius: 6px; text-decoration: none; color: var(--text); }
.cell:hover { background: var(--ink-soft); }
.cell .g { display: inline-block; font-size: .82rem; font-weight: 600; background: var(--ink-soft); color: var(--ink); border-radius: 4px; padding: .1rem .35rem; }
.cell .g i { font-style: normal; font-size: .7rem; background: var(--info); color: #fff; border-radius: 3px; padding: 0 .25rem; margin-left: .2rem; }
.cell .g.absent { text-decoration: line-through; background: var(--stop-soft); color: var(--stop); }
.pick { display: flex; gap: .7rem; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .7rem .8rem; cursor: pointer; font-weight: 400; }
.pick span { display: grid; } .pick small { color: var(--muted); }
.pick:has(input:checked) { border-color: var(--ink); background: var(--ink-soft); }
input.pin { font: 700 2rem var(--cond); letter-spacing: .5em; text-align: center; }
