
  html[data-theme="night"] .gc-gatehouse, .gc-gatehouse{
    --bg:#0b0f14; --panel:#121821; --panel2:#1a2230; --line:#243044;
    --txt:#e6edf6; --muted:#8b9bb4; --accent:#3da9fc;
    --green:#22c55e; --red:#ef4444; --amber:#f59e0b; --violet:#8b5cf6;
    --surface:#0f1620; --surface2:#0b1219; --surface3:#1b2635;
    --header-grad:linear-gradient(180deg,#141c28,#101720);
    --cmd-grad:linear-gradient(180deg,#101822,#0b1119);
    --panel-grad:linear-gradient(180deg,#121821,#0f151d);
    --chip-border:#2a3a4f;
    --chip-plate-bg:#2a2312; --chip-plate-border:#4a3d1c; --chip-plate-txt:#ffd88a;
    --shadow:0 10px 24px -14px #000;
    --shadow-strong:0 30px 80px -20px #000;
    --kbd-bg:rgba(0,0,0,.4); --kbd-border:rgba(255,255,255,.18); --kbd-txt:#cfe0f5;
  }

  html[data-theme="day"] .gc-gatehouse{
    --bg:#eef2f7; --panel:#ffffff; --panel2:#f8fafc; --line:#dbe3ec;
    --txt:#0f172a; --muted:#64748b; --accent:#0284c7;
    --surface:#f8fafc; --surface2:#ffffff; --surface3:#eef2f7;
    --header-grad:linear-gradient(180deg,#ffffff,#f8fafc);
    --cmd-grad:linear-gradient(180deg,#ffffff,#eef2f7);
    --panel-grad:linear-gradient(180deg,#ffffff,#fbfdff);
    --chip-border:#cbd5e1;
    --chip-plate-bg:#fef3c7; --chip-plate-border:#fbbf24; --chip-plate-txt:#92400e;
    --shadow:0 10px 24px -14px rgba(15,23,42,.18);
    --shadow-strong:0 30px 80px -20px rgba(15,23,42,.35);
    --kbd-bg:rgba(15,23,42,.08); --kbd-border:rgba(15,23,42,.2); --kbd-txt:#334155;
  }

.gc-gatehouse, .gc-gatehouse * { box-sizing: border-box; }
.gc-gatehouse {
    margin:0; min-height:100vh; color:var(--txt);
    font-family:"IBM Plex Sans", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
    font-size:14px;
    line-height:1.4;
    letter-spacing:0.01em;
    background:radial-gradient(1200px 600px at 50% -10%,#16202e,#0b0f14 60%);
    transition:background .3s, color .2s;
  }
.gc-gatehouse .mono,
.gc-gatehouse .cmd-head,
.gc-gatehouse .clock #clockTime,
.gc-gatehouse .badge,
.gc-gatehouse .panel-head h2,
.gc-gatehouse .pill,
.gc-gatehouse .feed-top,
.gc-gatehouse .feed-bottom,
.gc-gatehouse .log-item,
.gc-gatehouse kbd {
    font-family:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  }
html[data-theme="day"] .gc-gatehouse {
    background:radial-gradient(1200px 600px at 50% -10%,#ffffff,#eef2f7 60%);
  }

.gc-gatehouse .sticky-header { position:sticky; top:0; z-index:30; }

.gc-gatehouse .topbar {
    display:flex; align-items:center; gap:14px; justify-content:space-between;
    padding:8px 18px;
    background:var(--header-grad);
    border-bottom:1px solid var(--line);
    transition:background .3s, border-color .2s;
  }
.gc-gatehouse .brand {display:flex; align-items:center; gap:10px}
.gc-gatehouse .logo {
    width:34px; height:34px; border-radius:9px; display:grid; place-items:center;
    font:800 12px/1 ui-sans-serif; color:#fff;
    background:linear-gradient(135deg,#2563eb,#7c3aed);
    box-shadow:0 5px 14px -5px #2563eb;
  }
.gc-gatehouse .brand h1 {margin:0; font-size:14px; letter-spacing:.02em}
.gc-gatehouse .sub {font-size:10px; color:var(--muted); letter-spacing:.08em; text-transform:uppercase}
.gc-gatehouse .gh-device-net {
  display:flex; flex-wrap:wrap; gap:4px 10px; align-items:center;
  margin-top:4px; font-size:12px; color:var(--muted); letter-spacing:0; text-transform:none;
}
.gc-gatehouse .gh-device-net .gh-mono,
.gc-gatehouse .gh-device-net a {
  font-family:ui-monospace,monospace; font-weight:700;
}
.gc-gatehouse .gh-device-net a { color:var(--accent,#3da9fc); text-decoration:underline; }
.gc-gatehouse .gh-low-confidence .gh-device-net { margin-top:6px; }
.gc-gatehouse .clock {text-align:center}
.gc-gatehouse .clock #clockTime {font:700 20px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.04em}
.gc-gatehouse .badge {
    margin-top:3px; font:700 9px/1 ui-monospace,monospace; letter-spacing:.08em;
    padding:4px 8px; border-radius:999px; color:#4ade80;
    background:rgba(34,197,94,.12); border:1px solid rgba(34,197,94,.3);
  }
html[data-theme="day"] .gc-gatehouse .badge {color:#15803d}

.gc-gatehouse .top-right {display:flex; align-items:center; gap:8px}
.gc-gatehouse .icon-btn {
    width:36px; height:36px; display:grid; place-items:center;
    border-radius:10px; cursor:pointer; border:1px solid var(--line);
    background:var(--panel2); color:var(--txt);
    font-size:16px; transition:.15s;
  }
.gc-gatehouse .icon-btn:hover {filter:brightness(1.12); transform:translateY(-1px)}
.gc-gatehouse .icon-btn:active {transform:translateY(0)}

.gc-gatehouse .account-chip {
    display:flex; align-items:center; gap:9px; cursor:pointer;
    padding:5px 12px 5px 5px; border-radius:999px;
    border:1px solid var(--line); background:var(--panel2);
    color:var(--txt); transition:.15s;
  }
.gc-gatehouse .account-chip:hover {filter:brightness(1.1); transform:translateY(-1px)}
.gc-gatehouse .account-chip:active {transform:translateY(0)}
.gc-gatehouse .account-chip .mini-avatar {
    width:28px; height:28px; border-radius:50%; display:grid; place-items:center;
    font:800 11px/1 ui-sans-serif; color:#fff;
    background:linear-gradient(135deg,#2563eb,#7c3aed);
  }
.gc-gatehouse .account-chip .who {text-align:left; line-height:1.1}
.gc-gatehouse .account-chip .who b {font-size:12px; display:block}
.gc-gatehouse .account-chip .who span {font-size:9.5px; color:var(--muted); letter-spacing:.06em}
.gc-gatehouse .icon-btn.signout-btn {
    color:#f87171; border-color:rgba(239,68,68,.35); background:rgba(239,68,68,.10);
    font-size:18px; font-weight:700;
  }
html[data-theme="day"] .gc-gatehouse .icon-btn.signout-btn {color:#b91c1c}

.gc-gatehouse .command-bar {
    display:grid; grid-template-columns:1fr .72fr 1fr 1fr; gap:10px;
    padding:10px 14px;
    background:var(--cmd-grad);
    border-bottom:1px solid var(--line);
    box-shadow:var(--shadow);
    transition:background .3s;
  }
  @media (max-width:1200px){ .command-bar{ grid-template-columns:1fr 1fr; } }
  @media (max-width:640px){ .command-bar{ grid-template-columns:1fr; } }

  .gc-gatehouse .cmd-card {
    background:var(--panel2); border:1px solid var(--line);
    border-radius:12px; padding:10px; display:flex; flex-direction:column; gap:8px;
    transition:background .3s, border-color .2s;
  }
  .gc-gatehouse .cmd-head {
    display:flex; justify-content:space-between; align-items:center;
    font:700 10px/1 ui-monospace,monospace; letter-spacing:.12em;
    color:var(--muted);
  }

  .gc-gatehouse .state {padding:4px 9px; border-radius:999px; font-size:10px; font-weight:800; letter-spacing:.08em; white-space:nowrap}
  .gc-gatehouse .state.closed {background:rgba(239,68,68,.15);  color:#f87171; border:1px solid rgba(239,68,68,.35)}
  .gc-gatehouse .state.open {background:rgba(34,197,94,.15);  color:#4ade80; border:1px solid rgba(34,197,94,.35)}
  .gc-gatehouse .state.moving {background:rgba(245,158,11,.15); color:#fbbf24; border:1px solid rgba(245,158,11,.35)}
  .gc-gatehouse .state.stopped {background:rgba(148,163,184,.15);color:#cbd5e1; border:1px solid rgba(148,163,184,.35)}
  .gc-gatehouse .state.locked {background:rgba(239,68,68,.15);  color:#f87171; border:1px solid rgba(239,68,68,.35)}
  .gc-gatehouse .state.info {background:rgba(61,169,252,.12); color:#7dd3fc; border:1px solid rgba(61,169,252,.35)}
  .gc-gatehouse .state.idle {background:rgba(148,163,184,.15);color:#94a3b8; border:1px solid rgba(148,163,184,.35)}

  html[data-theme="day"] .gc-gatehouse .state.closed {background:rgba(239,68,68,.1);  color:#b91c1c; border-color:rgba(239,68,68,.4)}
  html[data-theme="day"] .gc-gatehouse .state.open {background:rgba(34,197,94,.12); color:#15803d; border-color:rgba(34,197,94,.4)}
  html[data-theme="day"] .gc-gatehouse .state.moving {background:rgba(245,158,11,.14);color:#b45309; border-color:rgba(245,158,11,.4)}
  html[data-theme="day"] .gc-gatehouse .state.stopped {background:rgba(148,163,184,.18);color:#475569;border-color:rgba(148,163,184,.45)}
  html[data-theme="day"] .gc-gatehouse .state.locked {background:rgba(239,68,68,.1);  color:#b91c1c; border-color:rgba(239,68,68,.4)}
  html[data-theme="day"] .gc-gatehouse .state.info {background:rgba(2,132,199,.1);  color:#0369a1; border-color:rgba(2,132,199,.4)}
  html[data-theme="day"] .gc-gatehouse .state.idle {background:rgba(100,116,139,.15);color:#475569;border-color:rgba(100,116,139,.4)}

  .gc-gatehouse .gate-visual {
    position:relative; height:62px; border-radius:9px; overflow:hidden;
    background:linear-gradient(180deg,#0a0f15,#0e1621);
    border:1px solid #1e2a3a; flex:none;
  }
  .gc-gatehouse .gate-road {
    position:absolute; left:0; right:0; top:58%; height:20px;
    background:repeating-linear-gradient(90deg,#1a2430 0 22px,#141d27 22px 44px);
    border-top:1px dashed #263447; border-bottom:1px dashed #263447;
  }
  .gc-gatehouse .gate-pivot {
    position:absolute; left:calc(7% - 9px); top:calc(58% - 9px);
    width:20px; height:20px; border-radius:50%;
    background:#334155; border:2px solid #475569; z-index:3;
  }
  .gc-gatehouse .gate-arm {
    position:absolute; left:7%; top:calc(58% - 1px); width:82%; height:10px;
    border-radius:5px; transform-origin:0 50%; z-index:2;
    background:repeating-linear-gradient(90deg,#ef4444 0 14px,#f8fafc 14px 28px);
    box-shadow:0 2px 8px rgba(0,0,0,.6);
    transition:transform .45s ease;
  }

  .gc-gatehouse .btn {
    cursor:pointer; border:1px solid transparent; border-radius:10px;
    padding:12px 10px; font:800 12px/1 ui-sans-serif,system-ui; letter-spacing:.06em;
    color:#e8f1ff; background:#1e293b; transition:.15s;
  }
  .gc-gatehouse .btn:hover:not(:disabled) {filter:brightness(1.1); transform:translateY(-1px)}
  .gc-gatehouse .btn:active:not(:disabled) {transform:translateY(0)}
  .gc-gatehouse .btn:disabled {opacity:.35; cursor:not-allowed; transform:none; filter:none}

  .gc-gatehouse .btn.cycle {
    padding:16px 12px; font-size:15px; letter-spacing:.12em;
    display:flex; align-items:center; justify-content:center;
    box-shadow:0 6px 18px -10px rgba(0,0,0,.4);
  }
  .gc-gatehouse .btn.cycle.will-open {background:linear-gradient(180deg,#16a34a,#15803d)}
  .gc-gatehouse .btn.cycle.will-close {background:linear-gradient(180deg,#dc2626,#991b1b)}
  .gc-gatehouse .btn.cycle.will-stop {background:linear-gradient(180deg,#f59e0b,#b45309)}

  .gc-gatehouse .btn.door {
    flex:1; min-height:60px; font-size:14px; letter-spacing:.1em;
    background:linear-gradient(180deg,#2563eb,#1d4ed8);
    display:flex; align-items:center; justify-content:center;
  }
  .gc-gatehouse .btn.door.unlocked {background:linear-gradient(180deg,#16a34a,#15803d)}

  .gc-gatehouse .btn.quick {
    flex:1; min-height:48px; font-size:13px; letter-spacing:.07em;
    display:flex; align-items:center; justify-content:center; gap:8px;
  }
  .gc-gatehouse .btn.quick.car {background:linear-gradient(180deg,#0ea5e9,#0284c7)}
  .gc-gatehouse .btn.quick.vis {background:linear-gradient(180deg,#8b5cf6,#7c3aed)}
  .gc-gatehouse .btn-ico {
    font-size:1.15em; line-height:1; flex:none;
  }
  .gc-gatehouse .btn.cycle,
  .gc-gatehouse .btn.door,
  .gc-gatehouse .btn.alarm {
    gap:8px;
  }
  .gc-gatehouse .top-right .gc-locale-picker {
    border-color: var(--line);
    border-radius: 10px;
    background: var(--panel2);
  }
  .gc-gatehouse .top-right .gc-locale-picker__option {
    min-width: 36px;
    min-height: 36px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }
  .gc-gatehouse .top-right .gc-locale-picker__option[aria-current="true"] {
    background: var(--accent);
    color: #fff;
  }
  .gc-gatehouse .feed-placeholder {
    position:absolute; inset:0; display:grid; place-items:center;
    z-index:1; color:#7dd3fc; font:700 12px/1.4 "IBM Plex Mono", ui-monospace, monospace;
    letter-spacing:.08em; text-transform:uppercase; text-shadow:0 1px 4px #000;
    pointer-events:none; padding:24px; text-align:center;
  }

  html[data-theme="day"] .gc-gatehouse .btn.cycle.will-open {background:linear-gradient(180deg,#34d399,#10b981)}
  html[data-theme="day"] .gc-gatehouse .btn.cycle.will-close {background:linear-gradient(180deg,#f87171,#ef4444)}
  html[data-theme="day"] .gc-gatehouse .btn.cycle.will-stop {background:linear-gradient(180deg,#fbbf24,#f59e0b)}
  html[data-theme="day"] .gc-gatehouse .btn.door {background:linear-gradient(180deg,#60a5fa,#3b82f6)}
  html[data-theme="day"] .gc-gatehouse .btn.door.unlocked {background:linear-gradient(180deg,#34d399,#10b981)}
  html[data-theme="day"] .gc-gatehouse .btn.quick.car {background:linear-gradient(180deg,#38bdf8,#0ea5e9)}
  html[data-theme="day"] .gc-gatehouse .btn.quick.vis {background:linear-gradient(180deg,#a78bfa,#8b5cf6)}
  html[data-theme="day"] .gc-gatehouse .btn.approve {background:linear-gradient(180deg,#34d399,#10b981)}
  html[data-theme="day"] .gc-gatehouse .btn.deny {background:linear-gradient(180deg,#f87171,#ef4444)}
  html[data-theme="day"] .gc-gatehouse .btn.notify {background:linear-gradient(180deg,#a78bfa,#8b5cf6)}
  html[data-theme="day"] .gc-gatehouse .btn.new-req {background:linear-gradient(180deg,#60a5fa,#3b82f6)}

  .gc-gatehouse .btn kbd {
    background:rgba(255,255,255,.22) !important;
    border:1px solid rgba(255,255,255,.4) !important;
    color:#fff !important;
  }

  .gc-gatehouse kbd {
    font:700 9px/1 ui-monospace,monospace;
    padding:3px 5px; border-radius:4px; margin-left:8px;
    background:var(--kbd-bg); border:1px solid var(--kbd-border);
    color:var(--kbd-txt); letter-spacing:.05em;
  }

  .gc-gatehouse main {
    display:grid; grid-template-columns:1.45fr 1.15fr 1fr;
    gap:14px; padding:14px; align-items:start;
  }
  @media (max-width:1200px){ main{ grid-template-columns:1fr 1fr; } main > :nth-child(3){ grid-column:1 / -1; } }
  @media (max-width:780px){ main{ grid-template-columns:1fr; } main > :nth-child(3){ grid-column:auto; } }

  .gc-gatehouse .panel {
    background:var(--panel-grad);
    border:1px solid var(--line); border-radius:14px; padding:12px;
    transition:background .3s, border-color .2s;
  }
  .gc-gatehouse .panel-head {display:flex; align-items:center; justify-content:space-between; margin-bottom:10px}
  .gc-gatehouse .panel-head h2 {
    margin:0; font-size:11px; font-weight:700; letter-spacing:.14em;
    text-transform:uppercase; color:var(--muted);
  }
  .gc-gatehouse .pill {font:700 10px/1 ui-monospace,monospace; padding:4px 8px; border-radius:999px; letter-spacing:.1em}
  .gc-gatehouse .pill.live {color:#f87171; background:rgba(239,68,68,.12); border:1px solid rgba(239,68,68,.3)}
  html[data-theme="day"] .gc-gatehouse .pill.live {color:#b91c1c}

  /* ---------- CAMERAS ---------- */
  .gc-gatehouse .feed-main {
    position:relative; aspect-ratio:16/10; border-radius:10px; overflow:hidden;
    border:1px solid #22303f; background:#05080c;
    cursor:zoom-in;
  }
  .gc-gatehouse .feed-main::before {
    content:""; position:absolute; inset:0;
    background:
      repeating-linear-gradient(0deg,rgba(255,255,255,.035) 0 2px,transparent 2px 4px),
      linear-gradient(180deg,transparent 58%,rgba(255,255,255,.05) 58%,rgba(255,255,255,.05) 60%,transparent 60%),
      radial-gradient(120% 90% at 50% 15%, hsl(var(--hue,205) 45% 22%), #05080c 72%);
  }
  .gc-gatehouse .feed-main::after {
    content:""; position:absolute; inset:0; pointer-events:none;
    background:linear-gradient(105deg,transparent 40%,rgba(120,190,255,.10) 50%,transparent 60%);
    background-size:300% 100%; animation:sweep 6s linear infinite;
  }
  @keyframes sweep{ from{background-position:200% 0} to{background-position:-100% 0} }

  .gc-gatehouse .feed-top, .gc-gatehouse .feed-bottom {
    position:absolute; left:0; right:0; display:flex; justify-content:space-between;
    padding:8px 10px; font:700 10px/1 ui-monospace,monospace; letter-spacing:.08em;
    color:#dbeafe; text-shadow:0 1px 3px #000; z-index:2;
  }
  .gc-gatehouse .feed-top {top:0} .feed-bottom{bottom:0; color:#9fd0ff}
  .gc-gatehouse .rec {color:#f87171; animation:blink 1.4s steps(2,end) infinite}
  @keyframes blink{50%{opacity:.15}}

  /* expand hint on the big feed */
  .gc-gatehouse .expand-hint {
    position:absolute; top:8px; right:8px; z-index:4;
    width:28px; height:28px; border-radius:8px;
    display:grid; place-items:center;
    background:rgba(0,0,0,.45); border:1px solid rgba(255,255,255,.25);
    color:#fff; font-size:13px;
    opacity:.75; transition:.15s; pointer-events:none;
  }
  .gc-gatehouse .feed-main:hover .expand-hint {opacity:1; background:rgba(61,169,252,.7); border-color:rgba(61,169,252,.9)}

  .gc-gatehouse .thumbs {display:grid; grid-template-columns:repeat(4,1fr); gap:7px; margin-top:8px}
  .gc-gatehouse .thumb {
    position:relative; aspect-ratio:16/10; border-radius:7px; overflow:hidden;
    border:1px solid #22303f; cursor:pointer; transition:.15s;
    background:radial-gradient(120% 90% at 50% 15%, hsl(var(--hue,205) 45% 20%), #05080c 72%);
  }
  .gc-gatehouse .thumb:hover {transform:translateY(-2px)}
  .gc-gatehouse .thumb.active {border-color:var(--accent); box-shadow:0 0 0 1px var(--accent),0 0 16px -6px var(--accent)}
  .gc-gatehouse .thumb span.thumb-label {
    position:absolute; left:5px; bottom:4px; color:#cfe2ff;
    font:700 8px/1 ui-monospace,monospace; letter-spacing:.08em; text-shadow:0 1px 2px #000;
  }

  /* dedicated expand button on each thumbnail */
  .gc-gatehouse .thumb-expand {
    position:absolute; top:4px; right:4px; z-index:3;
    width:22px; height:22px; border-radius:6px;
    display:grid; place-items:center;
    background:rgba(0,0,0,.5); border:1px solid rgba(255,255,255,.28);
    color:#fff; font:800 10px/1 ui-sans-serif;
    cursor:pointer; opacity:.7; transition:.15s;
    padding:0;
  }
  .gc-gatehouse .thumb-expand:hover {
    opacity:1; background:rgba(61,169,252,.85);
    border-color:rgba(61,169,252,1); transform:scale(1.08);
  }

  /* ---------- LOG ---------- */
  .gc-gatehouse .link {
    background:none; border:0; color:var(--muted); cursor:pointer;
    font:700 10px/1 ui-monospace,monospace; letter-spacing:.1em; text-transform:uppercase;
  }
  .gc-gatehouse .link:hover {color:var(--accent)}
  .gc-gatehouse .log {
    list-style:none; margin:0; padding:0; max-height:560px; overflow:auto;
    display:flex; flex-direction:column; gap:6px;
  }
  .gc-gatehouse .log-item {
    display:flex; gap:9px; padding:7px 9px; border-radius:8px;
    font:11px/1.45 ui-monospace,monospace; color:var(--txt);
    background:var(--surface); border-left:3px solid #334155;
    transition:background .3s;
  }
  .gc-gatehouse .log-item.ok {border-left-color:var(--green)}
  .gc-gatehouse .log-item.warn {border-left-color:var(--amber)}
  .gc-gatehouse .log-item.bad {border-left-color:var(--red)}
  .gc-gatehouse .log-item .t {color:var(--muted); flex:none}
  /* Access events already have .gc-event-row chrome — do not nest another box. */
  .gc-gatehouse .log > .gh-log-event {
    display: block;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
  }
  .gc-gatehouse .log > .gh-log-event .gc-event-row {
    width: 100%;
    box-sizing: border-box;
  }

  /* ---------- REGISTRY ---------- */
  .gc-gatehouse .tabs {
    display:flex; gap:5px; margin-bottom:9px; padding:4px;
    background:var(--surface); border:1px solid var(--line); border-radius:10px;
  }
  .gc-gatehouse .tab {
    flex:1; background:transparent; border:0; color:var(--muted);
    padding:9px 6px; border-radius:7px; cursor:pointer;
    font:700 11px/1 ui-sans-serif,system-ui; letter-spacing:.03em; transition:.15s;
  }
  .gc-gatehouse .tab:hover {color:var(--txt)}
  .gc-gatehouse .tab.active {background:var(--surface3); color:var(--txt)}
  .gc-gatehouse .count {
    display:inline-block; margin-left:3px; padding:2px 6px; border-radius:999px;
    font-size:10px; background:var(--amber); color:#111;
  }

  .gc-gatehouse .subfilters {display:none; gap:5px; margin-bottom:9px}
  .gc-gatehouse .subfilters.show {display:flex; flex-wrap:wrap}
  .gc-gatehouse .sf {
    flex:1; padding:8px 6px; border-radius:8px; cursor:pointer;
    background:var(--surface); border:1px solid var(--line); color:var(--muted);
    font:700 10px/1 ui-sans-serif; letter-spacing:.05em; transition:.15s;
  }
  .gc-gatehouse .sf:hover {color:var(--txt)}
  .gc-gatehouse .sf.active {background:var(--surface3); color:var(--txt); border-color:var(--line)}
  .gc-gatehouse .sf[data-sf="guest"].active {border-color:var(--violet); color:#7c3aed; background:rgba(139,92,246,.12)}
  .gc-gatehouse .sf[data-sf="delivery"].active {border-color:var(--amber);  color:#b45309; background:rgba(245,158,11,.12)}
  .gc-gatehouse [data-theme="night"] .sf[data-sf="guest"].active {color:#c4b5fd}
  .gc-gatehouse [data-theme="night"] .sf[data-sf="delivery"].active {color:#fbbf24}

  .gc-gatehouse .search {
    width:100%; padding:12px 13px; margin-bottom:9px; outline:none;
    border-radius:10px; border:1px solid var(--line);
    background:var(--surface2); color:var(--txt); font-size:13px;
    transition:background .3s, border-color .15s;
  }
  .gc-gatehouse .search:focus {border-color:var(--accent); box-shadow:0 0 0 3px rgba(61,169,252,.15)}
  .gc-gatehouse .search::placeholder {color:var(--muted); opacity:.75}

  .gc-gatehouse .list {display:flex; flex-direction:column; gap:7px; max-height:520px; overflow:auto}
  .gc-gatehouse .card {
    display:flex; gap:9px; padding:10px; border-radius:10px;
    background:var(--surface); border:1px solid var(--line); transition:.15s;
  }
  .gc-gatehouse .card:hover {border-color:#2c3d52}
  html[data-theme="day"] .gc-gatehouse .card:hover {border-color:#94a3b8}
  .gc-gatehouse .visitor-card.guest {border-left:3px solid var(--violet)}
  .gc-gatehouse .visitor-card.delivery {border-left:3px solid var(--amber)}
  .gc-gatehouse .avatar {
    width:34px; height:34px; flex:none; border-radius:50%; display:grid; place-items:center;
    font:800 13px/1 ui-sans-serif; color:#fff;
    background:linear-gradient(135deg,#2563eb,#7c3aed);
  }
  .gc-gatehouse .visitor-card.guest .avatar {background:linear-gradient(135deg,#7c3aed,#6d28d9)}
  .gc-gatehouse .visitor-card.delivery .avatar {background:linear-gradient(135deg,#d97706,#b45309)}
  .gc-gatehouse .card-.gc-gatehouse {flex:1; min-width:0}
  .gc-gatehouse .card-top {display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:13px}
  .gc-gatehouse .meta {font-size:11px; color:var(--muted); margin-top:3px}
  .gc-gatehouse .chips {display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; align-items:center}
  .gc-gatehouse .chip {
    font:800 10px/1 ui-monospace,monospace; letter-spacing:.08em;
    padding:5px 7px; border-radius:6px; color:var(--txt);
    background:var(--surface3); border:1px solid var(--chip-border);
  }
  .gc-gatehouse .chip.plate {color:var(--chip-plate-txt); background:var(--chip-plate-bg); border-color:var(--chip-plate-border)}

  .gc-gatehouse .tag {font:800 9px/1 ui-sans-serif; padding:4px 7px; border-radius:999px; letter-spacing:.06em; white-space:nowrap}
  .gc-gatehouse .tag.ok {background:rgba(34,197,94,.15);  color:#16a34a; border:1px solid rgba(34,197,94,.3)}
  .gc-gatehouse .tag.pending {background:rgba(245,158,11,.15); color:#b45309; border:1px solid rgba(245,158,11,.3)}
  .gc-gatehouse .tag.bad {background:rgba(239,68,68,.15);  color:#dc2626; border:1px solid rgba(239,68,68,.3)}
  .gc-gatehouse .tag.guest {background:rgba(139,92,246,.15); color:#7c3aed; border:1px solid rgba(139,92,246,.35)}
  .gc-gatehouse .tag.delivery {background:rgba(245,158,11,.15); color:#b45309; border:1px solid rgba(245,158,11,.35)}
  .gc-gatehouse [data-theme="night"] .tag.ok {color:#4ade80}
  .gc-gatehouse [data-theme="night"] .tag.pending {color:#fbbf24}
  .gc-gatehouse [data-theme="night"] .tag.bad {color:#f87171}
  .gc-gatehouse [data-theme="night"] .tag.guest {color:#c4b5fd}
  .gc-gatehouse [data-theme="night"] .tag.delivery {color:#fbbf24}

  .gc-gatehouse .card-actions {display:flex; gap:5px; margin-top:8px; flex-wrap:wrap}
  .gc-gatehouse .btn.small {padding:7px 9px; font-size:10px; border-radius:7px}
  .gc-gatehouse .btn.approve {background:linear-gradient(180deg,#16a34a,#15803d)}
  .gc-gatehouse .btn.deny {background:linear-gradient(180deg,#dc2626,#991b1b)}
  .gc-gatehouse .btn.ghost {background:var(--surface3); color:var(--txt); border-color:var(--line)}
  .gc-gatehouse .btn.notify {background:linear-gradient(180deg,#8b5cf6,#7c3aed)}
  .gc-gatehouse .empty {padding:26px 12px; text-align:center; color:var(--muted); font-size:12px}

  /* ================= EMERGENCY ================= */
  .gc-gatehouse .emergency-card {
    background:var(--panel2);
    border:1px solid rgba(239,68,68,.35);
    border-radius:12px; padding:10px;
    display:flex; flex-direction:column; gap:8px;
    transition:background .3s, border-color .2s, box-shadow .2s;
  }
  .gc-gatehouse .emergency-card.armed {
    border-color:#ef4444;
    box-shadow:0 0 0 2px rgba(239,68,68,.35), 0 0 30px -6px rgba(239,68,68,.55);
    animation:emergencyPulse 1.1s ease-in-out infinite;
  }
  @keyframes emergencyPulse{
    0%, 100% {box-shadow:0 0 0 2px rgba(239,68,68,.4), 0 0 30px -6px rgba(239,68,68,.55)}
    50% {box-shadow:0 0 0 3px rgba(239,68,68,.7), 0 0 50px -6px rgba(239,68,68,.85)}
  }
  .gc-gatehouse .emergency-card .cmd-head span:first-child {color:#f87171}
  html[data-theme="day"] .gc-gatehouse .emergency-card .cmd-head span:first-child {color:#b91c1c}

  /* Idle: outlined, deliberately quieter than the gate buttons. The button only opens a
     confirmation dialog; it never arms the alarm directly and has no keyboard shortcut. */
  .gc-gatehouse .btn.alarm {
    flex:1; min-height:52px; font-size:13px; letter-spacing:.1em;
    display:flex; align-items:center; justify-content:center;
    background:transparent;
    border:1px solid rgba(239,68,68,.55);
    color:#f87171;
    box-shadow:none;
  }
  .gc-gatehouse .btn.alarm:hover:not(:disabled) {background:rgba(239,68,68,.12); border-color:#ef4444}
  .gc-gatehouse .btn.alarm.armed {
    background:linear-gradient(180deg,#dc2626,#991b1b);
    border:1px solid #ef4444;
    color:#fff;
    box-shadow:0 6px 18px -10px rgba(220,38,38,.6);
    animation:alarmShake 0.35s infinite alternate;
  }
  html[data-theme="day"] .gc-gatehouse .btn.alarm {color:#b91c1c; border-color:rgba(185,28,28,.55)}
  html[data-theme="day"] .gc-gatehouse .btn.alarm:hover:not(:disabled) {background:rgba(239,68,68,.10)}
  html[data-theme="day"] .gc-gatehouse .btn.alarm.armed {
    background:linear-gradient(180deg,#ef4444,#dc2626); color:#fff; border-color:#dc2626;
  }
  @keyframes alarmShake{ from{transform:translateX(-2px)} to{transform:translateX(2px)} }
  .gc-gatehouse .emergency-card .alarm-hint {font-size:10px; color:var(--muted); text-align:center; letter-spacing:.06em; text-transform:uppercase}

  .gc-gatehouse .alarm-confirm {z-index:110}
  .gc-gatehouse .alarm-confirm .newreq-card {border-color:rgba(239,68,68,.55)}
  .gc-gatehouse .alarm-confirm-body {margin:0; font-size:13px; line-height:1.5; color:var(--txt)}

  .gc-gatehouse .alarm-overlay {
    position:fixed; inset:0; pointer-events:none; z-index:200;
    border:6px solid transparent; opacity:0;
    transition:opacity .3s, border-color .3s;
  }
  .gc-gatehouse .alarm-overlay.active {
    border-color:#ef4444; opacity:1;
    animation:alarmGlow 1.2s ease-in-out infinite;
  }
  @keyframes alarmGlow{
    0%, 100% {box-shadow:inset 0 0 100px rgba(239,68,68,.45)}
    50% {box-shadow:inset 0 0 180px rgba(239,68,68,.8)}
  }
  .gc-gatehouse .alarm-banner {
    position:fixed; top:0; left:0; right:0; z-index:210;
    background:linear-gradient(180deg,#dc2626,#991b1b); color:#fff;
    text-align:center; padding:9px 14px;
    font:800 13px/1 ui-sans-serif; letter-spacing:.2em;
    transform:translateY(-100%); transition:transform .3s;
    text-shadow:0 2px 6px rgba(0,0,0,.4);
  }
  .gc-gatehouse .alarm-banner.active {transform:translateY(0)}

  /* ================= CAMERA MODAL ================= */
  .gc-gatehouse .cam-modal {
    position:fixed; inset:0; z-index:150;
    display:flex; flex-direction:column;
    background:rgba(0,0,0,.94);
    backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
    opacity:0; pointer-events:none; transition:opacity .22s;
  }
  .gc-gatehouse .cam-modal.open {opacity:1; pointer-events:auto}

  .gc-gatehouse .cam-modal-head {
    display:flex; align-items:center; justify-content:space-between;
    gap:14px; padding:12px 20px;
    border-bottom:1px solid rgba(255,255,255,.1);
    color:#fff;
    flex-wrap:wrap;
  }
  .gc-gatehouse .cam-modal-title {display:flex; align-items:center; gap:12px; flex-wrap:wrap}
  .gc-gatehouse .cam-modal-title h2 {margin:0; font-size:16px; letter-spacing:.04em; color:#fff}
  .gc-gatehouse .cam-modal-live {
    font:800 10px/1 ui-monospace,monospace; letter-spacing:.12em;
    padding:5px 10px; border-radius:999px;
    color:#f87171; background:rgba(239,68,68,.15);
    border:1px solid rgba(239,68,68,.4);
    animation:blink 1.4s steps(2,end) infinite;
  }
  .gc-gatehouse .cam-modal-meta {display:flex; align-items:center; gap:14px; color:#9fd0ff}
  .gc-gatehouse .cam-modal-time {font:700 13px/1 ui-monospace,monospace}
  .gc-gatehouse .cam-modal-close {
    width:40px; height:40px; border-radius:10px; cursor:pointer;
    background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15);
    color:#fff; font:800 16px/1 ui-sans-serif; transition:.15s;
  }
  .gc-gatehouse .cam-modal-close:hover {background:rgba(239,68,68,.3); border-color:rgba(239,68,68,.55)}

  .gc-gatehouse .cam-modal-stage {
    flex:1; display:grid; place-items:center; padding:16px 20px;
    overflow:hidden; min-height:0;
  }
  .gc-gatehouse .cam-modal-feed {
    position:relative;
    width:100%; height:100%;
    max-width:100%; max-height:100%;
    aspect-ratio:16/10;
    border-radius:14px; overflow:hidden;
    border:1px solid #22303f; background:#05080c;
    transition:transform .25s ease;
    transform-origin:center center;
  }
  .gc-gatehouse .cam-modal-feed::before {
    content:""; position:absolute; inset:0;
    background:
      repeating-linear-gradient(0deg,rgba(255,255,255,.035) 0 2px,transparent 2px 4px),
      linear-gradient(180deg,transparent 58%,rgba(255,255,255,.05) 58%,rgba(255,255,255,.05) 60%,transparent 60%),
      radial-gradient(120% 90% at 50% 15%, hsl(var(--hue,205) 45% 22%), #05080c 72%);
  }
  .gc-gatehouse .cam-modal-feed::after {
    content:""; position:absolute; inset:0; pointer-events:none;
    background:linear-gradient(105deg,transparent 40%,rgba(120,190,255,.12) 50%,transparent 60%);
    background-size:300% 100%; animation:sweep 6s linear infinite;
  }
  .gc-gatehouse .cam-overlay-top, .gc-gatehouse .cam-overlay-bottom {
    position:absolute; left:0; right:0; display:flex; justify-content:space-between;
    padding:14px 18px;
    font:700 12px/1 ui-monospace,monospace; letter-spacing:.08em;
    color:#dbeafe; text-shadow:0 1px 3px #000; z-index:2;
  }
  .gc-gatehouse .cam-overlay-top {top:0}
  .gc-gatehouse .cam-overlay-bottom {bottom:0; color:#9fd0ff}

  /* white flash when snapshot fires */
  .gc-gatehouse .cam-flash {
    position:absolute; inset:0; z-index:6;
    background:#fff; opacity:0; pointer-events:none;
    transition:opacity .38s ease-out;
  }
  .gc-gatehouse .cam-flash.on {opacity:.9; transition:none}

  /* floating "saved" pill inside modal */
  .gc-gatehouse .snap-toast {
    position:absolute; left:50%; bottom:22px;
    transform:translateX(-50%) translateY(14px);
    z-index:7; opacity:0; pointer-events:none;
    padding:11px 18px; border-radius:999px;
    background:rgba(15,23,42,.92); color:#dbeafe;
    border:1px solid rgba(61,169,252,.6);
    font:800 12px/1 ui-sans-serif; letter-spacing:.06em;
    box-shadow:0 14px 34px -12px #000;
    transition:.25s;
  }
  .gc-gatehouse .snap-toast.show {opacity:1; transform:translateX(-50%) translateY(0)}

  .gc-gatehouse .cam-modal-foot {
    display:flex; align-items:center; gap:14px;
    padding:12px 20px 16px;
    border-top:1px solid rgba(255,255,255,.1);
    background:rgba(0,0,0,.5);
    flex-wrap:wrap;
  }
  .gc-gatehouse .cam-modal-thumbs {
    flex:1; display:flex; gap:8px; min-width:220px; overflow:auto;
    padding-bottom:2px;
  }
  .gc-gatehouse .cam-modal-thumb {
    flex:none; width:110px; aspect-ratio:16/10; border-radius:8px;
    overflow:hidden; cursor:pointer;
    border:1px solid #22303f; position:relative;
    background:radial-gradient(120% 90% at 50% 15%, hsl(var(--hue,205) 45% 20%), #05080c 72%);
    transition:.15s;
  }
  .gc-gatehouse .cam-modal-thumb:hover {transform:translateY(-2px)}
  .gc-gatehouse .cam-modal-thumb.active {
    border-color:var(--accent);
    box-shadow:0 0 0 2px var(--accent),0 0 18px -4px var(--accent);
  }
  .gc-gatehouse .cam-modal-thumb span {
    position:absolute; left:6px; bottom:5px; color:#cfe2ff;
    font:700 9px/1 ui-monospace,monospace; letter-spacing:.08em;
    text-shadow:0 1px 2px #000;
  }

  .gc-gatehouse .cam-ctrl {display:flex; gap:6px; align-items:center; flex-wrap:wrap}
  .gc-gatehouse .cam-ctrl .ctrl-btn {
    padding:10px 12px; font-size:12px; border-radius:9px; cursor:pointer;
    background:rgba(255,255,255,.08); color:#fff;
    border:1px solid rgba(255,255,255,.15); font-weight:800;
    transition:.15s; font-family:ui-sans-serif,system-ui;
    display:flex; align-items:center; gap:6px;
  }
  .gc-gatehouse .cam-ctrl .ctrl-btn:hover {background:rgba(255,255,255,.18); transform:translateY(-1px)}
  .gc-gatehouse .cam-ctrl .ctrl-btn:active {transform:translateY(0)}
  .gc-gatehouse .cam-ctrl .zoom-level {
    font:800 11px/1 ui-monospace,monospace; color:#9fd0ff;
    min-width:52px; text-align:center;
  }

  /* the snapshot button */
  .gc-gatehouse .cam-ctrl .ctrl-btn.snap {
    background:linear-gradient(180deg,#2563eb,#1d4ed8);
    border-color:rgba(96,165,250,.6);
    padding:10px 16px;
    box-shadow:0 6px 18px -10px rgba(37,99,235,.8);
  }
  .gc-gatehouse .cam-ctrl .ctrl-btn.snap:hover {
    background:linear-gradient(180deg,#3b82f6,#2563eb);
    border-color:#60a5fa;
  }
  .gc-gatehouse .cam-ctrl .snap-count {
    font:800 10px/1 ui-monospace,monospace;
    padding:3px 7px; border-radius:999px;
    background:rgba(255,255,255,.25); color:#fff;
  }

  /* ================= QUICK PANEL ================= */
  .gc-gatehouse .quick-panel {
    position:fixed; top:190px; left:50%;
    transform:translateX(-50%) translateY(-10px);
    width:min(500px,92vw);
    background:var(--panel2);
    border:1px solid var(--accent);
    border-radius:14px; padding:16px; z-index:60;
    box-shadow:var(--shadow-strong), 0 0 0 100vmax rgba(0,0,0,.55);
    opacity:0; pointer-events:none; transition:.18s;
  }
  .gc-gatehouse .quick-panel.open { opacity:1; pointer-events:auto; transform:translateX(-50%) translateY(0); }
  .gc-gatehouse .qp-head {
    display:flex; justify-content:space-between; align-items:center;
    margin-bottom:12px;
    font:800 12px/1 ui-monospace,monospace; letter-spacing:.12em; color:var(--txt);
  }
  .gc-gatehouse .qp-close {
    background:none; border:0; color:var(--muted); cursor:pointer;
    font:800 16px/1 ui-sans-serif; padding:4px 8px; border-radius:6px;
  }
  .gc-gatehouse .qp-close:hover {color:var(--txt); background:var(--surface3)}
  .gc-gatehouse .qp-types {display:flex; gap:6px; margin-bottom:9px}
  .gc-gatehouse .qp-type {
    flex:1; padding:11px; border-radius:9px; cursor:pointer;
    background:var(--surface); border:1px solid var(--line); color:var(--muted);
    font:800 11px/1 ui-sans-serif; letter-spacing:.06em; transition:.15s;
  }
  .gc-gatehouse .qp-type:hover {color:var(--txt)}
  .gc-gatehouse .qp-type[data-type="guest"].active {background:linear-gradient(180deg,#7c3aed,#6d28d9); border-color:var(--violet); color:#fff}
  .gc-gatehouse .qp-type[data-type="delivery"].active {background:linear-gradient(180deg,#d97706,#b45309); border-color:var(--amber);  color:#fff}
  .gc-gatehouse .qp-match {
    min-height:26px; margin:9px 0 4px;
    font:700 12px/1.4 ui-monospace,monospace;
  }
  .gc-gatehouse .match {padding:8px 10px; border-radius:8px}
  .gc-gatehouse .match.ok {background:rgba(34,197,94,.12); color:#16a34a; border:1px solid rgba(34,197,94,.35)}
  .gc-gatehouse .match.warn {background:rgba(245,158,11,.12); color:#b45309; border:1px solid rgba(245,158,11,.35)}
  .gc-gatehouse [data-theme="night"] .match.ok {color:#86efac}
  .gc-gatehouse [data-theme="night"] .match.warn {color:#fcd34d}
  .gc-gatehouse .qp-actions {display:flex; gap:8px; margin-top:12px}
  .gc-gatehouse .qp-actions .btn {flex:1; padding:14px}

  /* ================= ACCOUNT PANEL ================= */
  .gc-gatehouse .acc-panel {
    position:fixed; inset:0; z-index:70;
    display:grid; place-items:center; padding:20px;
    background:rgba(0,0,0,.55);
    opacity:0; pointer-events:none; transition:.2s;
  }
  .gc-gatehouse .acc-panel.open {opacity:1; pointer-events:auto}

  .gc-gatehouse .acc-card {
    width:min(760px, 100%); max-height:88vh; display:flex; flex-direction:column;
    background:var(--panel2); border:1px solid var(--line);
    border-radius:16px; overflow:hidden;
    box-shadow:var(--shadow-strong);
    transform:translateY(-10px); transition:.2s;
  }
  .gc-gatehouse .acc-panel.open .acc-card {transform:translateY(0)}

  .gc-gatehouse .acc-head {
    display:flex; align-items:center; gap:14px; justify-content:space-between;
    padding:18px 20px; border-bottom:1px solid var(--line);
    background:linear-gradient(135deg,rgba(37,99,235,.15),rgba(124,58,237,.15));
  }
  html[data-theme="day"] .gc-gatehouse .acc-head {
    background:linear-gradient(135deg,rgba(37,99,235,.10),rgba(124,58,237,.10));
  }
  .gc-gatehouse .acc-who {display:flex; align-items:center; gap:14px}
  .gc-gatehouse .acc-avatar {
    width:56px; height:56px; border-radius:50%; display:grid; place-items:center;
    font:800 20px/1 ui-sans-serif; color:#fff;
    background:linear-gradient(135deg,#2563eb,#7c3aed);
    box-shadow:0 8px 22px -8px #7c3aed;
  }
  .gc-gatehouse .acc-name {font-size:18px; font-weight:800}
  .gc-gatehouse .acc-role {font-size:12px; color:var(--muted); margin-top:3px; letter-spacing:.03em}
  .gc-gatehouse .acc-close {
    width:34px; height:34px; border-radius:9px; cursor:pointer;
    background:var(--surface3); border:1px solid var(--line); color:var(--txt);
    font:800 14px/1 ui-sans-serif;
  }
  .gc-gatehouse .acc-close:hover {filter:brightness(1.12)}

  .gc-gatehouse .acc-tabs {
    display:flex; gap:5px; padding:10px 14px; border-bottom:1px solid var(--line);
    background:var(--surface);
  }
  .gc-gatehouse .acc-tab {
    flex:1; padding:11px 8px; border-radius:8px; cursor:pointer;
    background:transparent; border:1px solid transparent; color:var(--muted);
    font:700 12px/1 ui-sans-serif; letter-spacing:.04em; transition:.15s;
  }
  .gc-gatehouse .acc-tab:hover {color:var(--txt); background:var(--surface3)}
  .gc-gatehouse .acc-tab.active {background:var(--surface3); color:var(--txt); border-color:var(--line)}
  .gc-gatehouse .acc-tab .count {font-size:10px; margin-left:4px}

  .gc-gatehouse .acc-body {
    padding:20px 22px 24px;
    overflow:auto;
    flex:1;
    display:flex;
    flex-direction:column;
    gap:16px;
    min-height:0;
  }

  .gc-gatehouse .acc-tab-panel {display:none}
  .gc-gatehouse .acc-tab-panel.active {display:block}

  .gc-gatehouse .profile-grid {display:grid; grid-template-columns:1fr 1fr; gap:12px}
  @media (max-width:600px){ .gc-gatehouse .profile-grid{grid-template-columns:1fr} }
  .gc-gatehouse .field {
    background:var(--surface); border:1px solid var(--line);
    border-radius:10px; padding:14px 16px;
  }
  .gc-gatehouse .field .lbl {
    font:700 10px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.1em;
    color:var(--muted); text-transform:uppercase; margin-bottom:8px;
  }
  .gc-gatehouse .field .val {font-size:15px; font-weight:600; line-height:1.35; word-break:break-word}
  .gc-gatehouse .profile-grid .field.full {grid-column:1 / -1}

  .gc-gatehouse .sched-grid {
    display:grid; grid-template-columns:repeat(7,1fr); gap:6px; margin-bottom:16px;
  }
  .gc-gatehouse .sched-day {
    background:var(--surface); border:1px solid var(--line);
    border-radius:10px; padding:10px 6px; text-align:center; min-height:74px;
    display:flex; flex-direction:column; gap:5px;
  }
  .gc-gatehouse .sched-day .dow {font:800 10px/1 ui-monospace,monospace; color:var(--muted); letter-spacing:.1em}
  .gc-gatehouse .sched-day .num {font:800 16px/1 ui-sans-serif}
  .gc-gatehouse .sched-day .shift {
    font:800 9px/1 ui-monospace,monospace; padding:4px 3px; border-radius:5px;
    margin-top:auto;
  }
  .gc-gatehouse .shift.night {background:rgba(139,92,246,.18); color:#a78bfa; border:1px solid rgba(139,92,246,.4)}
  .gc-gatehouse .shift.day {background:rgba(245,158,11,.18); color:#fbbf24; border:1px solid rgba(245,158,11,.4)}
  .gc-gatehouse .shift.off {background:var(--surface3); color:var(--muted); border:1px solid var(--line)}
  .gc-gatehouse .shift.leave {background:rgba(34,197,94,.18); color:#4ade80; border:1px solid rgba(34,197,94,.4)}
  html[data-theme="day"] .gc-gatehouse .shift.night {color:#6d28d9; background:rgba(139,92,246,.12)}
  html[data-theme="day"] .gc-gatehouse .shift.day {color:#b45309; background:rgba(245,158,11,.14)}
  html[data-theme="day"] .gc-gatehouse .shift.leave {color:#15803d; background:rgba(34,197,94,.12)}
  .gc-gatehouse .sched-day.today {border-color:var(--accent); box-shadow:0 0 0 1px var(--accent)}

  .gc-gatehouse .upcoming-title {
    font:700 10px/1 ui-monospace,monospace; letter-spacing:.14em;
    color:var(--muted); text-transform:uppercase; margin:6px 0 10px;
  }
  .gc-gatehouse .upcoming {display:flex; flex-direction:column; gap:7px}
  .gc-gatehouse .up-row {
    display:flex; align-items:center; gap:12px;
    background:var(--surface); border:1px solid var(--line);
    border-radius:10px; padding:10px 12px;
  }
  .gc-gatehouse .up-when {
    flex:none; width:130px;
    font:700 11px/1.3 ui-monospace,monospace; color:var(--muted);
  }
  .gc-gatehouse .up-when b {color:var(--txt); display:block; font-size:13px; margin-bottom:3px}
  .gc-gatehouse .up-what {flex:1; font-size:13px; font-weight:600}
  .gc-gatehouse .up-badge {
    font:800 9px/1 ui-monospace,monospace; letter-spacing:.08em;
    padding:5px 9px; border-radius:999px;
  }

  .gc-gatehouse .req-toolbar {
    display:flex; gap:8px; margin-bottom:14px; flex-wrap:wrap;
  }
  .gc-gatehouse .req-toolbar .btn {flex:1; min-width:140px}
  .gc-gatehouse .btn.new-req {background:linear-gradient(180deg,#2563eb,#1d4ed8)}

  .gc-gatehouse .req-list {display:flex; flex-direction:column; gap:12px}
  .gc-gatehouse .req-item {
    background:var(--surface); border:1px solid var(--line);
    border-left:3px solid var(--muted);
    border-radius:12px; padding:14px 16px;
  }
  .gc-gatehouse .req-item.pending {border-left-color:var(--amber)}
  .gc-gatehouse .req-item.approved {border-left-color:var(--green)}
  .gc-gatehouse .req-item.denied {border-left-color:var(--red)}
  .gc-gatehouse .req-top {display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:5px}
  .gc-gatehouse .req-type {font-size:13px; font-weight:800; display:flex; align-items:center; gap:7px}
  .gc-gatehouse .req-dates {font:700 12px/1.4 ui-monospace,monospace; color:var(--muted)}
  .gc-gatehouse .req-reason {font-size:12px; color:var(--muted); margin-top:5px; font-style:italic}

  .gc-gatehouse .settings-list {
    display:flex;
    flex-direction:column;
    gap:10px;
  }
  .gc-gatehouse .setting-row {
    display:flex; align-items:center; justify-content:space-between;
    gap:16px; padding:14px 16px;
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:12px;
  }
  .gc-gatehouse .setting-info { flex:1; min-width:0; }
  .gc-gatehouse .setting-info .s-title {font-size:14px; font-weight:700; margin-bottom:4px; line-height:1.3}
  .gc-gatehouse .setting-info .s-desc {font-size:12px; color:var(--muted); max-width:420px; line-height:1.4}
  .gc-gatehouse .toggle {
    flex:none; width:48px; height:28px; border-radius:999px;
    background:var(--surface3); border:1px solid var(--line);
    position:relative; cursor:pointer; transition:.2s;
  }
  .gc-gatehouse .toggle::after {
    content:""; position:absolute; top:3px; left:3px;
    width:20px; height:20px; border-radius:50%;
    background:var(--muted); transition:.2s;
  }
  .gc-gatehouse .toggle.on {background:linear-gradient(180deg,#16a34a,#15803d); border-color:#16a34a}
  .gc-gatehouse .toggle.on::after {left:23px; background:#fff}
  .gc-gatehouse .setting-row .gc-locale-picker {
    border-color: var(--line);
    border-radius: 8px;
    background: var(--surface2);
  }
  .gc-gatehouse .setting-row .gc-locale-picker__option {
    min-width: 44px;
    min-height: 32px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
  }
  .gc-gatehouse .setting-row .gc-locale-picker__option[aria-current="true"] {
    background: var(--accent);
    color: #fff;
  }

  .gc-gatehouse .newreq {
    position:fixed; inset:0; z-index:90;
    display:grid; place-items:center; padding:20px;
    background:rgba(0,0,0,.6);
    opacity:0; pointer-events:none; transition:.2s;
  }
  .gc-gatehouse .newreq.open {opacity:1; pointer-events:auto}
  .gc-gatehouse .newreq-card {
    width:min(460px,100%); background:var(--panel2);
    border:1px solid var(--line); border-radius:14px;
    padding:18px; box-shadow:var(--shadow-strong);
    transform:translateY(-8px); transition:.2s;
  }
  .gc-gatehouse .newreq.open .newreq-card {transform:translateY(0)}
  .gc-gatehouse .newreq-card h3 {
    margin:0 0 14px; font-size:15px; letter-spacing:.04em;
    display:flex; justify-content:space-between; align-items:center;
  }
  .gc-gatehouse .newreq-card label {
    display:block; font:700 10px/1 ui-monospace,monospace;
    letter-spacing:.12em; color:var(--muted); text-transform:uppercase;
    margin:12px 0 6px;
  }
  .newreq-card select,
  .newreq-card input,
  .gc-gatehouse .newreq-card textarea {
    width:100%; padding:11px 12px; border-radius:9px;
    background:var(--surface2); border:1px solid var(--line);
    color:var(--txt); font-size:13px; outline:none;
    font-family:inherit; resize:vertical;
  }
  .newreq-card select:focus,
  .newreq-card input:focus,
  .gc-gatehouse .newreq-card textarea:focus {
    border-color:var(--accent); box-shadow:0 0 0 3px rgba(61,169,252,.15);
  }
  .gc-gatehouse .newreq-row {display:grid; grid-template-columns:1fr 1fr; gap:10px}
  .gc-gatehouse .newreq-actions {display:flex; gap:8px; margin-top:18px}

  /* ================= TOASTS ================= */
  .gc-gatehouse #toasts {
    position:fixed; right:18px; bottom:18px; z-index:95;
    display:flex; flex-direction:column; gap:8px; align-items:flex-end;
  }
  .gc-gatehouse .toast {
    padding:13px 18px; border-radius:10px;
    font:700 13px/1.35 ui-sans-serif;
    background:#1e293b; color:#e6edf6; border:1px solid #334155;
    box-shadow:var(--shadow-strong);
    opacity:0; transform:translateX(24px); transition:.22s;
    max-width:380px;
  }
  .gc-gatehouse .toast.show { opacity:1; transform:translateX(0); }
  .gc-gatehouse .toast.ok {background:linear-gradient(180deg,#14532d,#166534); border-color:#22c55e; color:#dcfce7}
  .gc-gatehouse .toast.warn {background:linear-gradient(180deg,#78350f,#92400e); border-color:#f59e0b; color:#fef3c7}
  .gc-gatehouse .toast.bad {background:linear-gradient(180deg,#7f1d1d,#991b1b); border-color:#ef4444; color:#fee2e2}
  .gc-gatehouse .toast.info {background:linear-gradient(180deg,#4c1d95,#5b21b6); border-color:#8b5cf6; color:#ede9fe}

  /* snapshot toast with preview thumbnail */
  .gc-gatehouse .toast.snap {
    display:flex; align-items:center; gap:12px;
    padding:10px 14px 10px 10px; max-width:420px;
    background:linear-gradient(180deg,#0f172a,#0b1219);
    border:1px solid #3da9fc; color:#e6edf6;
  }
  .gc-gatehouse .toast.snap img {
    width:128px; height:80px; object-fit:cover; flex:none;
    border-radius:8px; border:1px solid rgba(255,255,255,.18);
    background:#000; box-shadow:0 4px 12px -4px #000;
  }
  .gc-gatehouse .toast.snap .snap-info {min-width:0}
  .gc-gatehouse .toast.snap .snap-info b {display:block; font-size:13px; margin-bottom:4px; color:#dbeafe}
  .gc-gatehouse .toast.snap .snap-info .fn {
    font:700 10.5px/1.35 ui-monospace,monospace;
    color:#9fd0ff; word-break:break-all;
  }
  html[data-theme="day"] .gc-gatehouse .toast {
    background:#ffffff; color:#0f172a; border-color:#cbd5e1;
  }
  html[data-theme="day"] .gc-gatehouse .toast.ok {background:#dcfce7; color:#14532d; border-color:#22c55e}
  html[data-theme="day"] .gc-gatehouse .toast.warn {background:#fef3c7; color:#78350f; border-color:#f59e0b}
  html[data-theme="day"] .gc-gatehouse .toast.bad {background:#fee2e2; color:#7f1d1d; border-color:#ef4444}
  html[data-theme="day"] .gc-gatehouse .toast.info {background:#ede9fe; color:#4c1d95; border-color:#8b5cf6}
  html[data-theme="day"] .gc-gatehouse .toast.snap {
    background:#ffffff; border-color:#3b82f6; color:#0f172a;
  }
  html[data-theme="day"] .gc-gatehouse .toast.snap .snap-info b {color:#0f172a}
  html[data-theme="day"] .gc-gatehouse .toast.snap .snap-info .fn {color:#2563eb}

  .gc-gatehouse ::-webkit-scrollbar {width:8px; height:8px}
  .gc-gatehouse ::-webkit-scrollbar-thumb {background:var(--line); border-radius:8px}
  .gc-gatehouse ::-webkit-scrollbar-track {background:transparent}

/* Compact mode + extras kept from the live console */
.gc-gatehouse.gh-compact .command-bar { padding: 6px 10px; gap: 6px; }
.gc-gatehouse.gh-compact main { gap: 8px; padding: 8px; }
.gc-gatehouse.gh-compact .panel { padding: 8px; }
.gc-gatehouse .feed-main img.gh-cam-frame,
.gc-gatehouse .cam-modal-feed img.gh-cam-frame {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1;
}
.gc-gatehouse .feed-main.has-frame::before,
.gc-gatehouse .feed-main.has-frame::after,
.gc-gatehouse .cam-modal-feed.has-frame::before,
.gc-gatehouse .cam-modal-feed.has-frame::after { opacity: 0; }
.gc-gatehouse .gh-log-filters { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.gc-gatehouse .gh-alert-stack { padding: 10px 14px 0; display: flex; flex-direction: column; gap: 8px; }
.gc-gatehouse .gate-select {
  width: 100%; padding: 8px 10px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--line); color: var(--txt); font-size: 12px;
}
.gc-gatehouse .log-item .gh-log-actions { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.gc-gatehouse .log-item .gh-log-meta { font-size: 10px; color: var(--muted); margin-top: 2px; }
.gc-gatehouse .log-item img.gh-log-thumb {
  width: 48px; height: 32px; object-fit: cover; border-radius: 4px; cursor: zoom-in; flex: none;
}
.gc-gatehouse .gh-low-confidence {
  background: var(--panel2); border: 1px solid rgba(245,158,11,.45);
  border-radius: 12px; padding: 12px; display: flex; gap: 12px; flex-wrap: wrap;
}
