/* Face Attendance: app-specific rules on top of the a2pulse theme. Colours, type and surfaces come from the theme. */
.gap { height: 16px; }
.small { font-size: 12.5px; }
.grow { flex: 1; }
.col { display: grid; gap: 16px; align-content: start; }
.banner { background: rgba(245, 147, 74, .14); border: 1px solid rgba(245, 147, 74, .4); color: var(--high); border-radius: 12px; padding: 9px 14px; margin-bottom: 16px; font-size: 14px; }
.top .site { gap: 12px; }
.top .pill { margin-right: 4px; }

/* toolbar rows of filters */
.toolbar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .field { margin: 0; }
.toolbar .btn { height: 38px; }
.ph .actions input.in { min-width: 220px; }

/* tables */
table.t th { background: var(--panel2); }
table.t td { vertical-align: middle; }
table.t th.n { text-align: right; }
.thumb { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; background: var(--panel2); display: block; cursor: zoom-in; border: 1px solid var(--line); }

/* Today page */
.people { display: grid; max-height: 640px; overflow: auto; }
.person { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person .who { flex: 1; min-width: 0; }
.person .who b { display: block; }
.person .time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--gold); font-size: 16px; }
.person.new { animation: flash 2.5s ease-out; }
@keyframes flash { from { background: rgba(74, 222, 155, .22); } to { background: transparent; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 240px; overflow: auto; }
.chip { padding: 3px 11px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); font-size: 13px; }
.unknowns { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.unk { border: 1px solid var(--line); border-radius: 12px; padding: 6px; font-size: 12px; background: var(--panel2); }
.unk img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--panel-solid); display: block; }
.unk .row { gap: 4px; margin-top: 6px; }

/* employees */
.egrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.emp { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; box-shadow: inset 0 1px 0 var(--hi), var(--shadow); transition: border-color .15s, transform .15s; }
.emp:hover { border-color: var(--gold); transform: translateY(-2px); }
.emp .pic { aspect-ratio: 1; background: var(--panel2) center/cover no-repeat; display: grid; place-items: center; color: var(--faint); font-size: 42px; font-weight: 800; }
.emp .meta { padding: 10px 12px; }
.emp .meta b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp.inactive { opacity: .55; }
.photos .empty { grid-column: 1 / -1; padding: 14px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin: 10px 0 12px; }
.photo { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel2); }
.photo img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; cursor: zoom-in; }
.photo .q { position: absolute; left: 6px; bottom: 6px; }
.photo .x { position: absolute; top: 6px; right: 6px; }
.results { margin-top: 10px; font-size: 13px; max-height: 220px; overflow: auto; display: grid; gap: 4px; justify-items: start; }
pre.layout { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: 13px/1.5 var(--mono); color: var(--muted); margin: 8px 0 12px; }

/* cameras */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: 16px; }
.cam { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: inset 0 1px 0 var(--hi), var(--shadow); }
.cam .view { aspect-ratio: 16/9; background: #05091a; display: grid; place-items: center; color: var(--faint); }
.cam .view img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cam .meta { padding: 10px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cam .meta b { flex: 1; font-size: 15px; }
.cam .src { padding: 0 14px 12px; color: var(--faint); font-size: 12.5px; word-break: break-all; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--off); box-shadow: 0 0 8px currentColor; color: var(--off); }
.dot.on { background: var(--ok); color: var(--ok); } .dot.off { background: var(--crit); color: var(--crit); }

/* settings */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt, .kv .k { color: var(--muted); } .kv .v { word-break: break-word; }
.check { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-size: 14px; }
.check input { width: 17px; height: 17px; accent-color: var(--gold); }
.check .hint { color: var(--faint); font-size: 12.5px; }

/* modal content */
.modal .body .field input.in, .modal .body .field select.in { width: 100%; }
.modal .bigimg { width: 100%; border-radius: 12px; display: block; }
.modal h2 .muted { font-weight: 500; font-size: 15px; margin-left: 6px; }
.modal .x { width: 34px; height: 34px; }
.modal footer .grow { flex: 1; }
.modal .ins { border: 1px dashed var(--line2); border-radius: 12px; padding: 14px; text-align: center; color: var(--muted); cursor: pointer; }
.modal .ins:hover { border-color: var(--gold); color: var(--text); }

/* login tweaks */
.login .err { margin: 0 0 12px; }
.login .field input.in { width: 100%; }

@media (max-width: 760px) { .cgrid { grid-template-columns: 1fr; } .ph .actions input.in { min-width: 0; width: 100%; } }

/* ── v2: dashboards, register, roles ─────────────────────────────────────── */
.av { text-transform: uppercase; }
.bars { display: grid; gap: 11px; }
.brow { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.brow .bar { height: 10px; }
.brow .bar i.p { background: var(--ok); } .brow .bar i.l { background: var(--high); } .brow .bar i.in { background: var(--gold); }
.brow .num { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.tags { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.person .meta2 { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.small-people .person { padding: 6px 2px; }
.unk.spoof { border-color: var(--crit); box-shadow: 0 0 0 1px var(--crit) inset; }
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; }
.emp .meta .tags { margin-top: 6px; }
.form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form2 .full { grid-column: 1 / -1; }
.field select.in { width: 100%; }
textarea.in { width: 100%; min-height: 80px; resize: vertical; font: inherit; }
.sechead { margin: 14px 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* register grid */
table.register { font-size: 12.5px; border-collapse: separate; border-spacing: 0; }
table.register th, table.register td { padding: 5px 4px; text-align: center; white-space: nowrap; }
table.register th.nm, table.register td.nm { text-align: left; position: sticky; left: 0; background: var(--panel-solid); z-index: 1; min-width: 160px; }
table.register th.wk { color: var(--faint); }
table.register th.hol { color: var(--high); }
.code { display: inline-block; min-width: 26px; padding: 2px 3px; border-radius: 6px; font-weight: 700; font-size: 11.5px; }
.code.P { background: rgba(74, 222, 155, .16); color: var(--ok); }
.code.HD { background: rgba(245, 197, 74, .18); color: var(--gold); }
.code.A { background: rgba(248, 92, 92, .16); color: var(--crit); }
.code.H { background: rgba(245, 147, 74, .16); color: var(--high); }
.code.WO { color: var(--faint); }
.code.WFH { background: rgba(120, 160, 255, .16); color: #8fb0ff; }
.code.LV { background: rgba(190, 140, 255, .16); color: #c9a2ff; }
.code.late { box-shadow: inset 0 -2px 0 var(--crit); }
table.matrix td, table.matrix th { text-align: center; }
table.matrix td:first-child, table.matrix th:first-child { text-align: left; }
.yes { color: var(--ok); font-weight: 700; } .no { color: var(--faint); }

@media print {
  body, .main, .page { background: #fff !important; color: #000 !important; }
  .card { box-shadow: none !important; border: 0 !important; background: #fff !important; }
  .toolbar, .ph .actions, #banner { display: none !important; }
  table.register th.nm, table.register td.nm { background: #fff !important; }
  .code { color: #000 !important; background: none !important; }
  .tab.hidden { display: none !important; }
  @page { size: landscape; margin: 10mm; }
}

/* Spoofing alarm: red banner on every page, flashing until acknowledged */
.spoof-alarm { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 1000; width: min(860px, calc(100vw - 28px)); }
.spoof-alarm .sa-box { display: flex; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, #b3122b, #e0435a); border: 2px solid #ffb3bd; box-shadow: 0 18px 50px rgba(224, 67, 90, .55);
  animation: saPulse 1s ease-in-out infinite; }
.spoof-alarm img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .7); flex: none; }
.spoof-alarm .sa-text { flex: 1; min-width: 0; line-height: 1.45; }
.spoof-alarm .sa-title { font-size: 20px; font-weight: 800; letter-spacing: .04em; }
.spoof-alarm .sa-meta { font-size: 13px; opacity: .92; }
.spoof-alarm .sa-btns { display: flex; flex-direction: column; gap: 8px; }
.spoof-alarm .btn { white-space: nowrap; }
.spoof-alarm .btn.primary { background: #fff; color: #b3122b; border-color: #fff; }
@keyframes saPulse { 0%, 100% { box-shadow: 0 18px 50px rgba(224, 67, 90, .55); } 50% { box-shadow: 0 0 0 8px rgba(255, 107, 122, .35), 0 18px 60px rgba(224, 67, 90, .9); } }
@media (max-width: 640px) { .spoof-alarm .sa-box { flex-wrap: wrap; } .spoof-alarm img { width: 72px; height: 72px; } }
@media print { .spoof-alarm { display: none !important; } }

/* self-learning: photos learned from the cameras */
.photo.learned { outline: 2px dashed rgba(120, 170, 255, .55); outline-offset: 2px; }
.photo .lrn { position: absolute; right: 6px; bottom: 6px; font-size: 11px; }

/* Ask a question */
.quick-ask .in { width: 280px; max-width: 42vw; }
.ask-form { display: flex; gap: 10px; }
.ask-form .in { flex: 1; font-size: 16px; padding: 12px 14px; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { border: 1px solid var(--line); background: var(--panel2); color: inherit; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--accent, #f2c14e); }
.ask-ans { margin-top: 14px; }
.ask-q { font-size: 13px; opacity: .7; margin-bottom: 4px; }
.ask-a { font-size: 18px; font-weight: 600; line-height: 1.45; margin-bottom: 6px; }
.ask-bars { margin: 14px 0 6px; display: grid; gap: 6px; }
.ab-row { display: grid; grid-template-columns: minmax(90px, 180px) 1fr 80px; gap: 10px; align-items: center; font-size: 13px; }
.ab-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-track { background: var(--panel2); border-radius: 6px; height: 14px; overflow: hidden; }
.ab-bar { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #f2c14e, #f08a4b); }
.ab-v { text-align: right; font-variant-numeric: tabular-nums; }
.ask-ans .scroll { margin-top: 10px; }
@media print { .ask-form, .ask-chips { display: none; } }
.not-marked { font-size: 11.5px; line-height: 1.35; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Alerts: tabs, scrolling list grouped by day, older pages on scroll */
.alert-tabs { margin: -2px 0 10px; }
.alert-tabs .cnt { display: inline-block; min-width: 18px; margin-left: 4px; font-size: 11px; font-weight: 700; border-radius: 9px; padding: 0 6px;
  background: var(--med); color: #241b04; text-align: center; }
.alert-tabs .cnt.crit { background: var(--crit); color: #fff; }
.alert-scroll { max-height: 640px; overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; }
.alert-day { grid-column: 1 / -1; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .7;
  margin: 6px 0 -2px; position: sticky; top: 0; z-index: 1; padding: 4px 0; background: var(--panel-solid, var(--panel)); }
.alert-more { text-align: center; padding: 12px 0 4px; }
.unk.handled { opacity: .62; }
.unk.spoof { border-color: rgba(255, 107, 107, .55); }
@media print { .alert-scroll { max-height: none; overflow: visible; } }

/* Reports: export format choice */
.export-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 14px; }
.export-choice { text-align: left; border: 1px solid var(--line); background: var(--panel2); color: inherit; border-radius: 14px;
  padding: 16px; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 6px; }
.export-choice b { font-size: 18px; }
.export-choice span { font-size: 12.5px; opacity: .75; line-height: 1.35; }
.export-choice:hover, .export-choice:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 2px rgba(233, 196, 106, .25); }
.r-range { margin: -4px 0 12px; }
@media (max-width: 720px) { .export-choices { grid-template-columns: 1fr; } }

/* Alert detail: the whole camera picture, the face, the person holding the phone, people seen nearby */
.unk img[data-open] { cursor: zoom-in; }
.alert-detail { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.ad-pic img.ad-big { width: 100%; border-radius: 12px; display: block; cursor: zoom-in; background: #000; }
.ad-face { display: flex; gap: 12px; align-items: flex-start; }
.ad-face > img, .ad-holder > img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; flex: none; }
.ad-holder { display: flex; gap: 12px; align-items: center; }
.ad-sec { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.ad-sec h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.ad-near { margin: 0 0 6px; padding-left: 18px; line-height: 1.7; }
@media (max-width: 900px) { .alert-detail { grid-template-columns: 1fr; } }
.ad-pic video, .ad-pic [data-pane] > img { width: 100%; border-radius: 12px; display: block; background: #000; }
.ad-tabs { margin-bottom: 8px; }

/* VisionSense brand lockup (top bar and sign-in), as in the brand file: mark (ring in the theme's text colour, orange
   bars) + "Vision" in the text colour and "Sense" in orange (Geist SemiBold) + "Smart Attendance" (Geist Regular). */
@font-face { font-family: "Geist"; font-weight: 400; src: url(../fonts/geist-regular.woff) format("woff"); font-display: swap; }
@font-face { font-family: "Geist"; font-weight: 600; src: url(../fonts/geist-semibold.woff) format("woff"); font-display: swap; }
.vs { display: flex; align-items: center; gap: 8px; }
.vs .vs-mark { height: 34px; width: 34px; flex: 0 0 auto; display: block; color: var(--text); }
.vs .vs-txt { display: flex; flex-direction: column; gap: 1px; line-height: 1.05; min-width: 0; }
.vs .vs-word, .brand .prod.vs .vs-word { display: block; font-family: "Geist", system-ui, sans-serif; font-weight: 600; font-size: 20px;
  letter-spacing: -.025em; color: var(--text); white-space: nowrap; overflow: visible; -webkit-line-clamp: unset; margin-top: 0; }
.vs .vs-word .vs-accent { font-style: normal; font-weight: 600; color: #E98300; letter-spacing: inherit; }
.vs .vs-sub, .brand .prod.vs .vs-sub { display: block; font-family: "Geist", system-ui, sans-serif; font-weight: 400; font-size: 12.5px;
  color: var(--muted); white-space: nowrap; overflow: visible; -webkit-line-clamp: unset; margin-top: 0; letter-spacing: 0; }
.login .brandside .vs { gap: 14px; }
.login .brandside .vs .vs-mark { height: 62px; width: 62px; color: #fff; }
.login .brandside .vs .vs-word { font-size: 36px; color: #fff; }
.login .brandside .vs .vs-sub { font-size: 20px; color: #c9d4ec; }
@media (max-width: 760px) { .vs .vs-mark { height: 28px; width: 28px; } .vs .vs-word { font-size: 16px; } .vs .vs-sub { font-size: 11px; } }
