:root { color-scheme:dark; --bg:#0d1320; --card:#172134; --elev:#202d43; --line:#304059; --text:#f0f5fe; --muted:#a6b6ce; --accent:#5fa9ff; --success:#88e5ae; --error:#ff9f9f; }
* { box-sizing:border-box; }
html { font-size:16px; }
body { margin:0; min-height:100dvh; background:radial-gradient(ellipse at 50% -20%,#263a5d 0%,var(--bg) 58%); color:var(--text); font:16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif; }
a { color:#92c3ff; text-decoration:none; }
a:hover { text-decoration:underline; }
.shell { max-width:1110px; margin:0 auto; min-height:100dvh; padding:0 clamp(14px,3vw,32px); display:flex; flex-direction:column; }
.topbar { min-height:72px; display:flex; justify-content:space-between; align-items:center; gap:16px; border-bottom:1px solid #ffffff12; }
.brand { display:flex; align-items:center; gap:10px; color:var(--text); font-weight:750; letter-spacing:-.03em; font-size:1.06rem; }
.brand-icon { width:32px; height:32px; display:grid; place-items:center; background:var(--elev); border:1px solid var(--line); border-radius:10px; }
.subtle-link { color:var(--muted); font-size:.92rem; }
main { flex:1; padding:30px 0 50px; }
footer { text-align:center; color:#8393ab; font-size:.8rem; padding:18px 0 24px; }
h1 { font-size:clamp(1.5rem,4vw,2rem); letter-spacing:-.035em; line-height:1.2; margin:0 0 12px; }
h2 { margin:0 0 18px; font-size:1.15rem; letter-spacing:-.015em; }
p { margin:10px 0; }
.muted { color:var(--muted); }
.keypad-card { max-width:375px; margin:clamp(0px,4vh,42px) auto 0; padding:clamp(20px,5vw,34px); border-radius:26px; background:var(--card); border:1px solid var(--line); text-align:center; box-shadow:0 22px 70px #0004; }
.garage-icon { width:64px; height:64px; border-radius:20px; background:#233b5c; color:#a6d1ff; display:grid; place-items:center; margin:0 auto 20px; font-size:2.2rem; }
.keypad-card .muted { margin:0 0 25px; }
#pin { font-size:2rem; letter-spacing:.22em; font-weight:700; text-align:center; width:100%; padding:14px 8px; background:#0f192a; border:1px solid #425573; color:var(--text); border-radius:13px; margin-bottom:18px; }
#pin:focus, input:focus { outline:2px solid var(--accent); outline-offset:2px; }
#pin::placeholder { color:#71819c; }
.number-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
button { font:inherit; cursor:pointer; }
.number-grid button { border:1px solid #41516b; background:#26364e; border-radius:13px; color:var(--text); font-size:1.38rem; font-weight:650; height:60px; touch-action:manipulation; }
.number-grid button:active { background:#42618b; transform:translateY(1px); }
.number-grid button[data-clear] { font-size:.95rem; }
.primary,.secondary,.danger { display:inline-flex; justify-content:center; align-items:center; gap:8px; border-radius:11px; border:1px solid transparent; padding:12px 18px; font-size:.96rem; font-weight:650; }
.primary { background:var(--accent); color:#081421; }
.primary:hover { background:#89beff; text-decoration:none; }
.primary:disabled { opacity:.45; cursor:not-allowed; }
.secondary { background:#283b54; color:var(--text); border-color:var(--line); }
.danger { background:#4d2733; color:#ffc1c1; border-color:#8b4355; }
.small { padding:7px 11px; font-size:.84rem; }
.open-button { width:100%; margin-top:16px; min-height:52px; }
.result { min-height:22px; margin-bottom:0; font-weight:550; font-size:.93rem; }
.result.good { color:var(--success); }
.result.bad { color:var(--error); }
.notice { background:#463d27; color:#ffe0a0; border:1px solid #705e35; padding:9px 12px; border-radius:10px; margin-bottom:16px; font-size:.9rem; }
.panel { background:var(--card); border:1px solid var(--line); border-radius:18px; padding:clamp(16px,3vw,26px); margin:0 0 20px; }
.narrow { max-width:475px; margin:40px auto 20px; }
.center { text-align:center; }
.stacked-form { display:grid; gap:16px; }
label { display:grid; gap:6px; color:#dce6f6; font-weight:600; font-size:.91rem; }
label small { color:var(--muted); font-weight:400; }
input:not([type=hidden]) { display:block; background:#101a2b; border:1px solid #465976; color:var(--text); border-radius:10px; min-height:45px; padding:10px 12px; font:inherit; font-size:1rem; width:100%; }
input[type=date] { color-scheme:dark; }
.create-form { display:grid; grid-template-columns:minmax(160px,1.5fr) minmax(170px,1fr) minmax(165px,1fr) auto; align-items:end; gap:14px; }
.admin-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; margin:0 0 22px; }
.admin-heading .muted { margin:0; }
.panel-heading { display:flex; justify-content:space-between; align-items:baseline; gap:15px; }
.nav { display:flex; align-items:center; flex-wrap:wrap; gap:14px; font-size:.86rem; }
.nav form { margin:0; }
.link-button { background:none; border:0; color:var(--muted); padding:0; font-size:.86rem; }
.status-tag { border-radius:20px; padding:6px 11px; text-transform:uppercase; font-size:.72rem; letter-spacing:.06em; font-weight:750; white-space:nowrap; }
.status-tag.test { background:#55452a; color:#ffd28a; }
.status-tag.live { background:#1a4b3a; color:#95ecb8; }
.table-wrap { overflow-x:auto; }
table { border-collapse:collapse; width:100%; min-width:640px; font-size:.88rem; }
th,td { border-bottom:1px solid #ffffff16; padding:12px 9px; text-align:left; white-space:nowrap; }
th { font-size:.78rem; font-weight:600; color:var(--muted); }
tr:last-child td { border-bottom:0; }
.actions { display:flex; gap:8px; }
.inline-form { display:inline-flex; align-items:center; gap:8px; }
.inline-form input[type=date] { min-height:34px; width:150px; font-size:.82rem; padding:5px; }
.inline-form input[name=pin] { min-height:34px; width:180px; font-size:.82rem; padding:5px 9px; }
.mode-form { display:grid; grid-template-columns:minmax(200px,360px); gap:14px; align-items:start; }
.mode-form button { justify-self:start; }
.confirm-check { display:flex; gap:10px; align-items:flex-start; font-size:.91rem; font-weight:500; }
.confirm-check input[type=checkbox] { width:19px; height:19px; min-height:19px; margin:2px 0 0; flex:0 0 auto; }
.mode-panel { border-color:#496788; }
.flash-message { margin-bottom:16px; border-radius:12px; }
.success-banner { background:#164631; color:#b4f6d2; padding:11px 13px; border:1px solid #356d57; }
.actions { flex-wrap:wrap; }
.pill { border-radius:15px; display:inline-block; font-size:.76rem; padding:3px 8px; }
.pill.green { background:#1b4c3b; color:#9aeec0; }
.pill.gray { background:#354259; color:#c4d0e0; }
.small-print { font-size:.83rem; color:var(--muted); }
.generated-pin { margin:24px 0; padding:16px 12px; font:750 clamp(2rem,9vw,2.75rem)/1.3 ui-monospace,SFMono-Regular,Consolas,monospace; color:#abdeff; letter-spacing:.14em; border-radius:12px; background:#101a2b; user-select:all; }
.warning { color:#ffd69b; }
.button-link { margin:10px 5px; }
.error-banner { background:#512e35; color:#ffd0d0; padding:10px 13px; border:1px solid #a75861; border-radius:10px; }
.pagination { display:flex; justify-content:center; align-items:center; gap:25px; margin-top:18px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
@media(max-width:690px) { .topbar { min-height:65px; } .admin-heading { align-items:flex-start; } .create-form { grid-template-columns:1fr; } .keypad-card { margin-top:10px; } .nav { gap:9px; } .generated-pin { letter-spacing:.09em; } }
@media(max-width:380px) { .keypad-card { padding:20px 15px; } .number-grid button { height:56px; } .nav { font-size:.76rem; } }
