/* ==========================================================
   Access Control Portal - restyle by changing these variables
   ========================================================== */
:root {
  --bg: #0e1116;
  --panel: #161b22;
  --panel-2: #1d232c;
  --border: #2a313c;
  --text: #e6e9ee;
  --muted: #8b95a5;
  --accent: #ff7a1a;        /* brand colour */
  --accent-text: #111;
  --ok: #2fbf71;
  --bad: #ef4c4c;
  --warn: #f2b33d;
  --radius: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0; }
h2 { font-size: 1rem; margin: 0 0 .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); font-size: .85rem; }
.right { text-align: right; }
.inline { display: inline; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--border); padding: 1.25rem 1rem;
  display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.05rem; }
.brand-mark { color: var(--accent); }
.brand-lg { font-size: 1.3rem; margin-bottom: .5rem; }
.sidebar nav { display: flex; flex-direction: column; gap: .25rem; }
.sidebar nav a { color: var(--text); padding: .55rem .75rem; border-radius: 8px; }
.sidebar nav a:hover { background: var(--panel-2); text-decoration: none; }
.sidebar nav a.active { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: .5rem; }
.who { color: var(--muted); font-size: .8rem; word-break: break-all; }
.content { padding: 2rem; max-width: 1200px; width: 100%; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.actions { display: flex; align-items: center; gap: .5rem; }
.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.25rem; align-items: start; }
.credit { margin-top: 3rem; color: var(--muted); font-size: .8rem; text-align: center; }

.side-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.side-body { display: flex; flex-direction: column; gap: 1.5rem; flex: 1; }
.menu-btn { display: none; background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: .45rem .8rem; font: inherit; font-weight: 600; cursor: pointer; }

.shell > * { min-width: 0; }   /* let wide tables scroll inside their card instead of widening the page */

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: column; }
  .sidebar { position: sticky; top: 0; z-index: 20; height: auto; padding: .6rem 1rem; gap: 0; }
  .menu-btn { display: inline-block; }
  .side-body { display: none; padding-top: .75rem; gap: 1rem; }
  .sidebar.open .side-body { display: flex; }
  .sidebar nav a { padding: .75rem .75rem; font-size: 1.05rem; }
  .sidebar-foot { margin: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .75rem; }
  .grid-2, .row { grid-template-columns: 1fr; }
  .content { padding: 1rem .85rem 2rem; }
  h1 { font-size: 1.35rem; }
  .page-head { margin-bottom: 1rem; }
  .page-head .actions { flex-wrap: wrap; }
  .card { padding: 1rem; overflow-x: auto; }
  .table th, .table td { padding: .55rem .4rem; }
  .table td .btn-sm { margin: .15rem 0; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters input, .filters select { max-width: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  /* 16px+ text in fields stops iPhones zooming in when you tap one */
  input, select, textarea { font-size: 16px; }
}

/* ---------- door users: simple layout (no menu) ---------- */
body.simple { min-height: 100vh; }
.simple-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .75rem 1rem; padding-top: max(.75rem, env(safe-area-inset-top));
  background: var(--panel); border-bottom: 1px solid var(--border); }
.simple-main { max-width: 560px; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
body.simple .doors { grid-template-columns: 1fr; gap: .85rem; }
body.simple .door { flex-direction: column; align-items: stretch; gap: .9rem; padding: 1.1rem; }
body.simple .door strong { font-size: 1.2rem; }
body.simple .door .btn-lg { width: 100%; min-height: 64px; font-size: 1.25rem; border-radius: 12px; }
body.simple .door-group { margin: 1.25rem 0 .6rem; }
body.simple .page-head { margin-bottom: 1rem; }
body.simple h1 { font-size: 1.5rem; }
body.simple .credit { margin-top: 2rem; }

/* ---------- cards & stats ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; color: var(--muted); }
.stat:hover { text-decoration: none; border-color: var(--accent); }
.stat span { display: block; font-size: 2rem; font-weight: 700; color: var(--text); }
.stat-warn span { color: var(--warn); }
.danger-zone { border-color: #4a2626; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; color: var(--muted); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; padding: .5rem; border-bottom: 1px solid var(--border); }
.table td { padding: .65rem .5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--panel-2); }
.table tr.new td { animation: flash 2s ease-out; }
@keyframes flash { from { background: rgba(255,122,26,.25); } to { background: transparent; } }

/* ---------- tags, chips, pills ---------- */
.tag, .chip, .pill { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.chip { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); margin-right: .25rem; }
.tag-granted, .tag-status-approved { background: rgba(47,191,113,.15); color: var(--ok); }
.tag-denied, .tag-alarm, .tag-status-suspended { background: rgba(239,76,76,.15); color: var(--bad); }
.tag-status-expired { background: rgba(140,150,170,.15); color: var(--muted); }
.tag-door, .tag-other, .tag-status-pending { background: rgba(242,179,61,.15); color: var(--warn); }
.pill-ok { background: rgba(47,191,113,.15); color: var(--ok); }
.pill-bad { background: rgba(239,76,76,.15); color: var(--bad); }
.pill-muted { background: var(--panel-2); color: var(--muted); }

/* ---------- forms ---------- */
.form label, .login-card label { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; font-weight: 500; }
.form h2 { margin-top: 1.5rem; }
.form h2:first-of-type { margin-top: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
input, select, textarea { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: .6rem .7rem; font: inherit; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 400; }
label.check input { width: auto; }
.input-group { display: flex; gap: .5rem; }
.filters { display: flex; gap: .75rem; margin-bottom: 1rem; }
.filters input { max-width: 320px; }
.filters select { max-width: 200px; }
.form-actions { display: flex; gap: .5rem; margin-top: 1rem; }
.enrol { display: flex; gap: .5rem; margin-top: 1rem; }
.enrol-status { margin-top: .75rem; padding: .75rem; border-radius: 8px; background: var(--panel-2); font-weight: 600; }
.enrol-status.ok { color: var(--ok); }
.enrol-status.bad { color: var(--bad); }
.enrol-status.wait { color: var(--warn); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1rem; border-radius: 8px;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; filter: brightness(1.15); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; color: var(--bad); border-color: #5a2a2a; }
.btn-sm { padding: .3rem .65rem; font-size: .85rem; }

/* ---------- flash ---------- */
.flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; display: block; line-height: 1.45; }
.flash-ok { background: rgba(47,191,113,.12); color: var(--ok); }
.flash-error { background: rgba(239,76,76,.12); color: var(--bad); }
.flash-warn { background: rgba(242,179,61,.12); color: var(--warn); }

/* ---------- login ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.login-card { width: 100%; max-width: 380px; }
.error-text { color: var(--bad); margin: .75rem 0 0; }

/* ---------- door user page ---------- */
.doors { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.door { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0; }
.btn-lg { padding: .9rem 1.6rem; font-size: 1.05rem; }
code { font-family: var(--mono); background: var(--panel-2); padding: .1rem .35rem; border-radius: 4px; }
.door-group { margin: 1.5rem 0 .75rem; }
.door-group:first-of-type { margin-top: 0; }
.filters { flex-wrap: wrap; align-items: center; }

/* ---------- customer branding ---------- */
.login-brand { text-align: center; margin-bottom: 1.25rem; }
.login-logo { max-width: 240px; max-height: 90px; object-fit: contain; display: block; margin: 0 auto .75rem; }
.login-company { font-size: 1.3rem; font-weight: 700; }
.brand-customer { align-items: center; gap: .65rem; }
.side-logo { max-width: 56px; max-height: 40px; object-fit: contain; border-radius: 6px; }
.logo-preview { background: #fff; display: inline-block; padding: 12px 16px; border-radius: 8px; margin-bottom: 1rem; }
.logo-preview img { max-width: 260px; max-height: 100px; object-fit: contain; display: block; }
input[type=file] { padding: .45rem; }
.door-buttons { display: flex; gap: .5rem; }
.choice { display: flex; flex-direction: column; gap: .25rem; margin: .5rem 0 1rem; padding: .75rem 1rem; background: var(--panel-2); border-radius: 8px; }
.site-doors { display: flex; flex-direction: column; gap: .5rem; margin: .5rem 0; }
.site-block { background: var(--panel-2); border-radius: 8px; padding: .6rem .8rem; }
.door-list { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: .3rem 0 0 1.6rem; }
.door-list label.check { margin: 0; }
label.dimmed { opacity: .45; }

/* ---------- login on phones ---------- */
.login-card .btn-primary { width: 100%; padding: .8rem 1rem; font-size: 1.05rem; }
.login-card label.check { flex-direction: row; align-items: center; font-weight: 400; }

/* ---------- confirm / result sheet (Unlock) ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; transition: opacity .18s ease; }
.sheet-backdrop.show { opacity: 1; }
.sheet { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
  padding: 1.75rem 1.5rem 1.25rem; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5);
  transform: translateY(16px) scale(.98); transition: transform .2s ease; }
.sheet-backdrop.show .sheet { transform: none; }
.sheet-icon { width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,122,26,.14); color: var(--accent); }
.sheet-icon svg { width: 34px; height: 34px; }
.sheet-icon.ok { background: rgba(47,191,113,.15); color: var(--ok); }
.sheet-icon.bad { background: rgba(239,76,76,.15); color: var(--bad); }
.sheet h3 { margin: 0 0 .35rem; font-size: 1.3rem; }
.sheet p { margin: 0 0 1.4rem; color: var(--muted); }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.sheet-actions .btn { min-height: 54px; font-size: 1.05rem; border-radius: 12px; }
.sheet-actions.single { grid-template-columns: 1fr; }
.spinner { width: 34px; height: 34px; border: 3px solid rgba(255,122,26,.25); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) {   /* phones: slide up from the bottom */
  .sheet-backdrop { align-items: flex-end; padding: 0; }
  .sheet { max-width: none; border-radius: 22px 22px 0 0; padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    transform: translateY(100%); }
}

/* phone fixes that must come after the base rules above */
@media (max-width: 900px) {
  .shell { grid-template-rows: auto 1fr; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters input, .filters select, .filters .btn { width: 100%; max-width: none; }
  .page-head { flex-wrap: wrap; gap: .75rem; }
}

/* ---------- access dates & times ---------- */
.access-times { margin-top: 1.25rem; padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); }
.access-times > strong { display: block; margin-bottom: .75rem; }
.dt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.dt-label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .92rem; }
.dt-inputs { display: grid; grid-template-columns: 1.4fr 1fr; gap: .5rem; }
.dt-inputs input { width: 100%; }
.time-range { grid-template-columns: 1fr 1fr; margin-top: .75rem; }
.access-times input[type=date], .access-times input[type=time] { color-scheme: dark; min-height: 44px; }
.week { margin-top: .5rem; }
.day-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.access-times .chip { position: relative; display: inline-flex; flex-direction: row; cursor: pointer; margin: 0; padding: 0; border: 0; background: none; gap: 0; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; min-width: 3.1rem; text-align: center; padding: .55rem .6rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--panel); font-weight: 600; user-select: none; }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #111; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.quick-days { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .6rem; }
@media (max-width: 700px) {
  .dt-grid { grid-template-columns: 1fr; }
  .chip span { min-width: 2.9rem; padding: .6rem .45rem; }
}

/* door user outside their hours */
.blocked-card { text-align: center; padding: 1.75rem 1.25rem; }
.blocked-card p { margin: .35rem 0; }
.blocked-card p:first-of-type { font-size: 1.1rem; }
.blocked-icon { font-size: 2.2rem; margin-bottom: .5rem; }

/* ---------- phone unlock rules ---------- */
.rules .rule { margin-bottom: 1rem; }
.rule-head { align-items: flex-start !important; gap: .7rem; }
.rule-head input { margin-top: .3rem; }
.qr-box { display: flex; gap: 1rem; align-items: center; margin-top: .75rem; flex-wrap: wrap; }
.qr-preview { width: 150px; height: 150px; background: #fff; border-radius: 8px; padding: 6px; }
.qr-preview svg { width: 100%; height: 100%; }
.geo-actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin: .25rem 0 .75rem; }
.needs-scan { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 64px; border-radius: 12px;
  border: 2px dashed var(--border); color: var(--muted); font-weight: 600; text-align: center; padding: .5rem 1rem; }
.needs-scan-icon { font-size: 1.4rem; color: var(--accent); }
.door-needs { margin-top: -.3rem; }
.scan-timer { margin: 0; text-align: center; }

/* ---------- additional security (person) ---------- */
.extra-sec { margin-top: 1rem; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); }
.extra-sec summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: .75rem; list-style: none; }
.extra-sec summary::-webkit-details-marker { display: none; }
.extra-sec summary::after { content: "▾"; color: var(--muted); }
.extra-sec[open] summary::after { content: "▴"; }
.extra-sec[open] summary { margin-bottom: .5rem; }
.sec-summary { margin-left: auto; }
.sec-opt { align-items: flex-start !important; gap: .7rem; margin: .5rem 0; }
.sec-opt input { margin-top: .3rem; }
.door-closed { display: flex; align-items: center; justify-content: center; gap: .65rem; min-height: 64px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); text-align: left; padding: .5rem 1rem; line-height: 1.35; }
.door-closed strong { color: var(--text); }
.door-closed-icon { font-size: 1.5rem; }
.door.is-closed strong:first-child { opacity: .75; }
.pin-row { display: flex; gap: .5rem; }
.pin-row input { flex: 1; letter-spacing: .15em; }
.pin-row .btn { white-space: nowrap; }
.share-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
#glink { font-family: ui-monospace, monospace; font-size: .9rem; }
tr.muted td { opacity: .6; }
.btn-danger-solid { background: var(--bad); color: #fff; border: 1px solid var(--bad); font-weight: 700; }
.btn-danger-solid:hover { filter: brightness(1.08); }
.sheet p { white-space: pre-line; }
[hidden] { display: none !important; }

/* ---------- multi-select site / door filter ---------- */
.ms { position: relative; }
.ms-btn { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-width: 210px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: .55rem .8rem; cursor: pointer; user-select: none; }
.ms-btn::-webkit-details-marker { display: none; }
.ms-btn.ms-on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.ms-caret { color: var(--muted); }
.ms[open] .ms-caret { transform: rotate(180deg); }
.ms-panel { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(340px, 92vw); background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.45); padding: .6rem; }
.ms-search { width: 100%; margin-bottom: .4rem; }
.ms-list { max-height: 320px; overflow-y: auto; }
.ms-site { padding: .25rem 0; border-bottom: 1px solid var(--border); }
.ms-site:last-child { border-bottom: 0; }
.ms-row { display: flex !important; flex-direction: row !important; align-items: center; gap: .55rem; padding: .4rem .45rem; border-radius: 6px;
  cursor: pointer; font-weight: 400; margin: 0; }
.ms-row:hover { background: var(--panel-2); }
.ms-door-row { padding-left: 1.9rem; }
.ms-row.dimmed { opacity: .45; }
.ms-foot { display: flex; justify-content: space-between; gap: .5rem; padding-top: .55rem; border-top: 1px solid var(--border); margin-top: .3rem; }
@media (max-width: 900px) {
  .ms-btn { min-width: 0; width: 100%; }
  .ms-panel { position: static; width: 100%; box-shadow: none; margin-top: .4rem; }
}
.filters .ms-row input[type=checkbox] { width: 18px !important; height: 18px; flex: 0 0 18px; max-width: none; margin: 0; padding: 0; }
.ms-row > span { flex: 1; text-align: left; }
.filters .ms-search { width: 100% !important; max-width: none; }
.filters .ms-foot .btn { width: auto !important; }

/* ---------- number plates ---------- */
.uk-plate { display: inline-block; background: #f6c90e; color: #111; font-family: "Charles Wright", "Arial Narrow", Arial, sans-serif;
  font-weight: 800; letter-spacing: .08em; padding: .25rem .6rem; border-radius: 5px; border: 2px solid #111; font-size: 1.05rem; white-space: nowrap; }
.plate-img { height: 38px; max-width: 140px; border-radius: 4px; object-fit: cover; display: block; }
.plate-tabs { margin-top: -.5rem; }
.vehicle-card { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1rem; }
.vehicle-plates { display: flex; flex-wrap: wrap; gap: .5rem; }
.vehicle-plates .uk-plate { font-size: 1.25rem; }
.veh-status { font-weight: 700; font-size: 1.05rem; }
.veh-ok { color: var(--ok); }
.veh-no { color: var(--warn); }
.veh-access { margin: .25rem 0 1rem; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); }
.veh-access .day-chips { margin-top: .5rem; }
.uk-plate-sm { font-size: .85rem; padding: .1rem .4rem; border-width: 1.5px; margin-right: .3rem; vertical-align: middle; }
.door-scanned { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,122,26,.35); }
.scan-timer { text-align: center; color: var(--muted); }
.scan-timer strong { color: var(--accent); font-variant-numeric: tabular-nums; }
.scan-banner { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; padding: .85rem 1rem;
  border-radius: 14px; background: rgba(47,191,113,.12); border: 1px solid rgba(47,191,113,.35); }
.scan-banner-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ok); color: #0e1116; font-weight: 800; font-size: 1.2rem; }
.scan-banner-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.scan-banner-text strong { font-size: 1.1rem; color: var(--text); }
.scan-banner-text span { color: var(--ok); font-size: .95rem; }
.gp-section { border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; margin: .75rem 0; background: var(--panel-2); }
.gp-section h3 { margin: 0 0 .6rem; font-size: 1rem; }
.gp-window { margin-top: .6rem; }
.cam-list { display: flex; flex-direction: column; margin: .3rem 0 .6rem; }
.quick-label { font-size: .78rem; color: var(--muted); align-self: center; min-width: 2.6rem; }
input[type=date] { cursor: pointer; color-scheme: dark; }
/* time boxes: just type the time (no clock pop-up) */
input[type=time] { cursor: text; color-scheme: dark; }
input[type=time]::-webkit-calendar-picker-indicator { display: none; }
.veh-times { list-style: none; margin: .2rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; color: var(--muted); font-size: .92rem; }
.time-in { font-variant-numeric: tabular-nums; letter-spacing: .04em; min-height: 44px; }
.plate-check { margin-bottom: 1rem; }
.pc-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.pc-input { flex: 1; min-width: 9rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 1.1rem; }
.pc-result { margin-top: .75rem; }
.pc-verdict { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; }
.pc-verdict .tag { font-size: .95rem; padding: .3rem .7rem; }
.pc-person { border-top: 1px solid var(--border); padding: .5rem 0; }
.guest-search { margin-bottom: .75rem; }
.gp-summary { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .4rem; font-size: 1.05rem; }
.email-send { display: flex; gap: .5rem; flex-wrap: wrap; margin: .25rem 0 .75rem; } .email-send input { flex: 1; min-width: 14rem; }
.chip-guest { background: rgba(255,122,26,.14); color: var(--accent); border-color: rgba(255,122,26,.35); }
.barrier-mode { border: 1px solid var(--border); border-radius: 10px; padding: .6rem .9rem .8rem; margin: .5rem 0 1rem; }
.barrier-mode legend { font-weight: 600; padding: 0 .3rem; }
.barrier-mode .check { align-items: flex-start !important; gap: .6rem; margin: .45rem 0; }
.barrier-mode .check input { margin-top: .3rem; }
.barrier-mode .gate-pick { margin: .1rem 0 .3rem 1.7rem; max-width: calc(100% - 1.7rem); }

/* Hik-Connect intercom status */
.chip-ok { background: rgba(46,160,67,.15); color: #3fb950; border-color: rgba(46,160,67,.4); }
.chip-bad { background: rgba(248,81,73,.14); color: #f85149; border-color: rgba(248,81,73,.4); }
