/* =====================================================================
   Smart Parking — the one stylesheet
   Night-garage header (ink + electric blue), amber "ticket" accents,
   white cards, menu in the header (no sidebar).
   ===================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --ink: #0b1224;
  --ink-2: #131d38;
  --blue: #3d6bff;
  --blue-d: #2a50d8;
  --blue-50: #eef2ff;
  --amber: #ffb020;
  --amber-50: #fff6e3;
  --green: #12b981;
  --green-d: #0d9668;
  --red: #ef4444;
  --text: #1d2433;
  --muted: #6b7489;
  --line: #e4e8f1;
  --bg: #f3f5fa;
  --card: #fff;
  --r: 16px;
  --sh: 0 1px 2px rgba(11, 18, 36, 0.05), 0 12px 32px -24px rgba(11, 18, 36, 0.45);
  --f: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --h: "Sora", "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 14px/1.5 var(--f); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--h); margin: 0; color: var(--ink); letter-spacing: -0.01em; }
h3 { font-size: 15px; font-weight: 700; }
code { padding: 1px 5px; border-radius: 5px; background: var(--blue-50); color: var(--blue-d); font-size: 12px; }
.muted { color: var(--muted); }
.ic { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 50; background: linear-gradient(90deg, var(--ink), var(--ink-2)); color: #c9d2e8; box-shadow: 0 6px 20px -12px rgba(0, 0, 0, 0.6); }
.top-in { max-width: 1440px; margin: 0 auto; height: 62px; padding: 0 20px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none !important; flex: none; }
.brand b { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 15px/1.1 var(--h); color: #fff; }
.brand small { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); }
.brand-p { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--blue); color: #fff; font: 800 20px var(--h); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 0 0 3px rgba(61, 107, 255, 0.25); }
.brand-p.xl { width: 64px; height: 64px; font-size: 36px; border-radius: 16px; }
.nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.nav-a { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: #c9d2e8; font: 600 13.5px var(--f); cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.nav-a:hover, .dd.open > .nav-a { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav-a.on { background: rgba(61, 107, 255, 0.22); color: #fff; box-shadow: inset 0 -2px 0 var(--amber); }
.nav-a .ic:last-child:not(:first-child) { width: 14px; height: 14px; opacity: 0.7; }
.dd { position: relative; }
.dd-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px; padding: 6px; border-radius: 14px; background: #fff; box-shadow: 0 20px 40px -12px rgba(11, 18, 36, 0.45); border: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: 0.15s; z-index: 60; }
.dd.open > .dd-menu { opacity: 1; visibility: visible; transform: none; }
.dd-menu a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--text); text-decoration: none !important; }
.dd-menu a b { display: block; font-weight: 600; }
.dd-menu a small { color: var(--muted); font-size: 12px; }
.dd-menu a:hover, .dd-menu a.on { background: var(--blue-50); color: var(--blue-d); }
.dd-menu a.danger { color: var(--red); }
.top-right { display: flex; align-items: center; gap: 10px; flex: none; }
.clock { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: #e6ebf7; font: 600 12.5px var(--f); font-variant-numeric: tabular-nums; white-space: nowrap; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; background: rgba(255, 255, 255, 0.04); color: #fff; cursor: pointer; font: inherit; }
.user-chip i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--amber); color: var(--ink); font: 800 14px var(--h); font-style: normal; }
.user-chip span { text-align: left; line-height: 1.15; }
.user-chip b { display: block; font-size: 13px; }
.user-chip small { color: #9aa6c4; font-size: 11px; }
.user-dd .dd-menu { left: auto; right: 0; min-width: 190px; }
.burger { display: none; margin-left: auto; width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 20px; cursor: pointer; }
.lic-bar { padding: 7px 20px; text-align: center; font-weight: 600; font-size: 13px; }
.lic-bar.expired { background: #fde2e2; color: #9b1c1c; }
.lic-bar.expiring { background: var(--amber-50); color: #8a5a00; }

/* ---------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 24px 20px 40px; flex: 1; }
.foot { max-width: 1440px; width: 100%; margin: 0 auto; padding: 14px 20px 20px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); }
.foot b { color: var(--ink); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 25px; font-weight: 800; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.ph-right { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); padding: 18px 20px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card > h3 { margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.g-org { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.stack { display: grid; gap: 18px; }
.span2 { grid-column: 1 / -1; }
.loading { padding: 50px; text-align: center; color: var(--muted); }
.empty { padding: 26px 18px; text-align: center; color: var(--muted); }
.empty.big { padding: 80px 20px; font-size: 15px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--blue-50); color: var(--blue-d); font-size: 11.5px; font-weight: 600; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); font: 600 13.5px var(--f); cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.btn:hover { border-color: #c7cfe0; background: #f8f9fc; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-d); border-color: var(--blue-d); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: var(--green-d); border-color: var(--green-d); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger-soft { color: var(--red); }
.btn-danger-soft:hover { background: #fdecec; border-color: #f7c4c4; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 14.5px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.acts { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------------------------------------------------------------- forms */
.form label, .filters label { display: grid; gap: 6px; margin-bottom: 14px; font-size: 12.5px; font-weight: 600; color: #3b4459; }
input, select, textarea { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #d5dbe8; border-radius: 10px; background: #fff; color: var(--text); font: 500 14px var(--f); outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
textarea { height: auto; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(61, 107, 255, 0.15); }
input[type=radio], input[type=checkbox] { width: auto; height: auto; }
.hint { margin: -6px 0 12px; color: var(--muted); font-size: 12px; font-weight: 400; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.narrow { max-width: 460px; }
.plate { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.filters label { margin: 0; min-width: 150px; }
.filters .grow { flex: 1; min-width: 200px; }
.inline-add { display: flex; gap: 8px; margin-bottom: 12px; }
.note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--amber-50); color: #6b4a00; font-size: 13px; }
.steps { margin: 0 0 4px; padding-left: 20px; color: #3b4459; }
.steps li { margin-bottom: 8px; }

/* vehicle type picker (Vehicle In) */
.vt-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.vt { position: relative; margin: 0 !important; cursor: pointer; }
.vt input { position: absolute; opacity: 0; }
.vt span { display: block; padding: 12px 14px; border: 1.5px solid #d5dbe8; border-radius: 12px; background: #fff; transition: 0.15s; }
.vt b { display: block; font: 700 14px var(--h); color: var(--ink); }
.vt small { color: var(--muted); font-weight: 500; }
.vt input:checked + span { border-color: var(--blue); background: var(--blue-50); box-shadow: 0 0 0 3px rgba(61, 107, 255, 0.15); }
.vt input:focus-visible + span { outline: 2px solid var(--blue); }
.grid-in { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }

/* charges type picker (Developer) */
.ct-pick { display: grid; gap: 10px; margin-bottom: 14px; }
.ct { position: relative; margin: 0 !important; cursor: pointer; display: block !important; }
.ct input { position: absolute; opacity: 0; }
.ct span { display: block; padding: 14px 16px 14px 46px; border: 1.5px solid #d5dbe8; border-radius: 12px; position: relative; }
.ct span::before { content: ""; position: absolute; left: 16px; top: 16px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #b9c2d6; }
.ct b { display: block; font: 700 14.5px var(--h); color: var(--ink); }
.ct small { color: var(--muted); font-weight: 400; }
.ct input:checked + span { border-color: var(--blue); background: var(--blue-50); }
.ct input:checked + span::before { border: 5px solid var(--blue); }

/* ---------------------------------------------------------------- KPI + dashboard */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpi { position: relative; padding: 18px 20px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); box-shadow: var(--sh); overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.kpi span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi b { display: block; margin: 4px 0 2px; font: 800 28px/1.1 var(--h); color: var(--ink); }
.kpi small { color: var(--muted); }
.k-blue { --c: var(--blue); background: linear-gradient(135deg, var(--ink), #1b2a55); border: 0; }
.k-blue span, .k-blue small { color: #9fb0d9; }
.k-blue b { color: #fff; }
.k-violet { --c: #8b5cf6; }
.k-teal { --c: var(--green); }
.k-amber { --c: var(--amber); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 90px 1fr 34px; align-items: center; gap: 10px; }
.bars i { height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--blue), #7c9bff); width: var(--w); min-width: 6px; }
.bars b { text-align: right; font-family: var(--h); }
.price-board ul { list-style: none; margin: 0; padding: 0; }
.price-board li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.price-board li:last-child { border: 0; }
.price-board b { font-family: var(--h); }
.sub { display: block; color: var(--muted); font-size: 12px; }
.tk { font: 700 13px var(--h); color: var(--blue-d); }

/* ---------------------------------------------------------------- tables */
.tbl { overflow: auto; max-height: 560px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th { position: sticky; top: 0; z-index: 1; padding: 11px 14px; background: #f6f8fc; color: #5b6478; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
td { padding: 11px 14px; border-bottom: 1px solid #eef1f7; white-space: nowrap; vertical-align: middle; }
td.wrap { white-space: normal; min-width: 240px; }
tbody tr:hover td { background: #f8faff; }
tfoot td { position: sticky; bottom: 0; background: var(--amber-50); font-weight: 700; color: var(--ink); border-top: 1px solid #f3dca8; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.card .tbl { margin: 0 -20px -18px; }
.card.flush .tbl { margin: 0; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.b-in { background: var(--blue-50); color: var(--blue-d); }
.b-out, .b-ok { background: #dcfce7; color: #15803d; }
.b-off { background: #f1f2f6; color: #6b7489; }
.role { display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; background: #f1f2f6; }
.r-developer { background: #ede9fe; color: #6d28d9; }
.r-junior { background: #e0f2fe; color: #0369a1; }
.r-admin { background: var(--amber-50); color: #8a5a00; }
.r-counter { background: #dcfce7; color: #15803d; }
.sum-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.sum-chips > span { padding: 6px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.sum-chips > span b { color: var(--ink); margin-left: 4px; }
.sum-chips .hi { background: var(--ink); border-color: var(--ink); color: #9fb0d9; }
.sum-chips .hi b { color: var(--amber); }
.sum-chips .sp { flex: 1; padding: 0; border: 0; background: none; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #3b4459; font: 600 13px var(--f); cursor: pointer; }
.tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: inset 0 -2px 0 var(--amber); }

/* ---------------------------------------------------------------- vehicle out */
.scan { display: grid; gap: 8px; margin-bottom: 18px; background: linear-gradient(135deg, var(--ink), #1b2a55); border: 0; color: #c9d2e8; }
.scan label { font-weight: 600; font-size: 13px; }
.scan-row { display: flex; gap: 10px; }
#tokIn { height: 64px; max-width: 360px; border: 2px solid rgba(255, 255, 255, 0.15); border-radius: 14px; background: rgba(255, 255, 255, 0.06); color: #fff; font: 800 34px var(--h); letter-spacing: 0.12em; caret-color: var(--amber); animation: blink-border 1.2s ease-in-out infinite; }
#tokIn::placeholder { color: rgba(255, 255, 255, 0.2); }
#tokIn:focus { border-color: var(--amber); box-shadow: 0 0 0 5px rgba(255, 176, 32, 0.2); }
@keyframes blink-border { 50% { border-color: rgba(255, 176, 32, 0.55); } }
.scan .btn-lg { height: 64px; padding: 0 28px; }
.out-card { max-width: 980px; }
.out-card.done { border-color: #bbf7d0; }
.o-top { display: flex; align-items: center; gap: 18px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px dashed var(--line); }
.o-tok { padding: 8px 16px; border-radius: 12px; background: var(--amber); color: var(--ink); text-align: center; }
.o-tok small { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.o-tok b { font: 800 30px/1 var(--h); }
.o-veh { flex: 1; }
.o-veh span { color: var(--muted); }
.plate-big { display: block; font: 800 22px var(--h); letter-spacing: 0.06em; color: var(--ink); }
.o-dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.o-dl dt, .o-times small, .estimate small { color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.o-dl dd { margin: 2px 0 0; font-weight: 600; }
.o-times, .estimate { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px 16px; border-radius: 12px; background: #f6f8fc; margin-bottom: 14px; }
.estimate { grid-template-columns: 1fr 1.4fr 1fr; background: var(--amber-50); }
.o-times b, .estimate b { display: block; font: 700 15px var(--h); color: var(--ink); }
.e-amt b, .o-times .amt { font-size: 24px !important; color: var(--green-d) !important; }
.warn { color: var(--red); font-weight: 600; }
.o-note { margin: 0; color: #15803d; }
.notfound { max-width: 980px; border-color: #fecaca; color: #9b1c1c; }
.notfound p { margin: 4px 0 0; color: var(--muted); }

/* ---------------------------------------------------------------- modal / toast */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(11, 18, 36, 0.55); backdrop-filter: blur(3px); animation: fade 0.15s; }
.modal-box { width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px 24px; border-radius: 20px; background: #fff; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5); animation: pop 0.18s; }
.modal-box.sm { width: min(440px, 100%); }
.modal-box > h3 { font-size: 18px; margin-bottom: 14px; }
.m-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.m-actions.center { justify-content: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(0.96); opacity: 0; } }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 200; max-width: 380px; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.45); animation: pop 0.2s; }
.toast.ok { border-left: 4px solid var(--green); }
.toast.bad { border-left: 4px solid var(--red); background: #3a0d12; }

/* payment popup */
.pay-modal { width: min(460px, 100%); text-align: center; }
.pay small { color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.pay-amt { margin: 6px 0 8px; font: 800 64px/1 var(--h); color: var(--green-d); letter-spacing: -0.03em; }
.pay p { margin: 4px 0; }
.pay-br { color: var(--muted); }

/* ---------------------------------------------------------------- token slip */
.slip-modal { width: min(380px, 100%); }
.slip { width: 300px; margin: 0 auto; padding: 18px 18px 14px; border-radius: 14px; background: #fff; border: 2px dashed #c7cfe0; text-align: center; color: #000; font-family: var(--f); }
.slip-co { font: 800 15px var(--h); }
.slip-t { margin-top: 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.25em; color: #555; }
.slip-no { margin: 6px 0 4px; font: 800 64px/1 var(--h); letter-spacing: 0.04em; }
.slip-qr svg { width: 130px; height: 130px; display: block; margin: 4px auto 10px; }
.slip dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; text-align: left; font-size: 12.5px; }
.slip dt { color: #555; }
.slip dd { margin: 0; font-weight: 700; }
.slip-f { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #aaa; font-size: 11px; color: #444; }
#printArea { display: none; }

/* ---------------------------------------------------------------- about / licence */
.about { text-align: center; }
.about h2 { margin: 12px 0 6px; }
.about .kv { text-align: left; margin: 16px 0; }
.lic-state { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; background: #dcfce7; color: #15803d; }
.lic-state.expiring { background: var(--amber-50); color: #8a5a00; }
.lic-state.expired { background: #fde2e2; color: #9b1c1c; }
.lic-state b { font-family: var(--h); }

/* ---------------------------------------------------------------- login */
.lg-body { min-height: 100vh; display: block; background: radial-gradient(circle at 15% 15%, #1b2c62 0, transparent 45%), radial-gradient(circle at 90% 90%, #2a1d4a 0, transparent 40%), var(--ink); overflow-x: hidden; }
.lg-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.lg-bg::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(circle at 50% 50%, #000 0, transparent 75%); }
.lane { position: absolute; left: -10%; right: -10%; height: 3px; background: repeating-linear-gradient(90deg, rgba(255, 176, 32, 0.35) 0 34px, transparent 34px 70px); transform: rotate(-8deg); animation: lane 6s linear infinite; }
.lane.l1 { top: 18%; } .lane.l2 { top: 52%; opacity: 0.5; animation-duration: 9s; } .lane.l3 { top: 84%; opacity: 0.35; animation-duration: 12s; }
@keyframes lane { to { background-position: 140px 0; } }
.lg { position: relative; min-height: 100vh; max-width: 1120px; margin: 0 auto; padding: 40px 24px; display: grid; grid-template-columns: 1fr 440px; align-items: center; gap: 56px; }
.lg-side { color: #c9d2e8; }
.lg-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.lg-brand b { display: block; font: 800 20px/1.1 var(--h); color: #fff; }
.lg-brand small { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber); }
.tkt { position: relative; width: 340px; padding: 22px 24px 18px; border-radius: 20px; background: linear-gradient(160deg, #ffc451, var(--amber)); color: var(--ink); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5); transform: rotate(-4deg); animation: tktIn 0.7s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes tktIn { from { transform: translateY(30px) rotate(-10deg); opacity: 0; } }
.tkt::before, .tkt::after { content: ""; position: absolute; top: 132px; width: 26px; height: 26px; border-radius: 50%; background: #121c3e; }
.tkt::before { left: -13px; } .tkt::after { right: -13px; }
.tkt-top { display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 800; letter-spacing: 0.18em; opacity: 0.75; }
.tkt-no { font: 800 76px/1 var(--h); letter-spacing: 0.02em; margin: 10px 0 14px; }
.tkt-mid { display: flex; gap: 16px; align-items: center; padding-top: 16px; border-top: 2px dashed rgba(11, 18, 36, 0.35); }
.tkt-qr { flex: none; width: 86px; height: 86px; padding: 6px; border-radius: 10px; background: #fff; }
.tkt-qr svg { width: 100%; height: 100%; display: block; }
.tkt dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; font-size: 12.5px; }
.tkt dt { opacity: 0.65; } .tkt dd { margin: 0; font-weight: 800; }
.tkt-cut { margin: 16px -24px 10px; border-top: 2px dashed rgba(11, 18, 36, 0.35); }
.tkt-foot { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
.lg-feats { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 12px; max-width: 420px; }
.lg-feats li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; }
.lg-feats i { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(61, 107, 255, 0.18); color: #9db4ff; font-style: normal; font-weight: 800; }
.lg-card { position: relative; padding: 38px 36px 26px; border-radius: 26px; background: #fff; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.lg-card::before { content: ""; position: absolute; left: 36px; right: 36px; top: 0; height: 4px; border-radius: 0 0 6px 6px; background: linear-gradient(90deg, var(--blue), var(--amber)); }
.lg-kicker { justify-self: start; display: inline-block; margin-bottom: 8px; padding: 3px 10px; border-radius: 999px; background: var(--blue-50); color: var(--blue-d); font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.lg-card h1 { font-size: 25px; font-weight: 800; line-height: 1.2; }
.lg-card .muted { margin: 6px 0 22px; }
.lg-pane { display: grid; animation: fade 0.25s; }
.lg-pane label { display: grid; gap: 7px; margin-bottom: 16px; font-size: 12.5px; font-weight: 700; color: #3b4459; }
.lg-in { position: relative; display: flex; align-items: center; border: 1.5px solid #d5dbe8; border-radius: 14px; background: #f8f9fc; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.lg-in:focus-within { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(61, 107, 255, 0.15); }
.lg-in em { padding: 0 4px 0 14px; color: var(--muted); font-style: normal; font-weight: 700; }
.lg-in input { height: 50px; border: 0; background: transparent; box-shadow: none !important; font-size: 15px; font-weight: 600; letter-spacing: 0.02em; }
.lg-eye { margin-right: 8px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--blue-d); font: 700 12px var(--f); cursor: pointer; }
.lg-eye:hover { background: var(--blue-50); }
.lg-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: -4px 0 18px; font-size: 13px; }
.lg-row a { font-weight: 700; }
.small { font-size: 12px; }
.lg-btn { height: 52px !important; border-radius: 14px !important; font-size: 15.5px !important; }
.lg-btn span { transition: transform 0.15s; }
.lg-btn:hover span { transform: translateX(4px); }
.lg-back { margin-top: 14px; text-align: center; font-weight: 700; }
.lg-msg { min-height: 20px; margin: 12px 0 0; color: var(--red); font-weight: 600; font-size: 13px; }
.lg-msg.ok { color: var(--green-d); }
.lg-foot { margin: 22px 0 0; text-align: center; color: var(--muted); font-size: 12px; }
@media (max-width: 900px) {
  .lg { grid-template-columns: 1fr; gap: 28px; padding: 24px 16px; }
  .lg-side { display: flex; flex-direction: column; align-items: center; }
  .lg-brand { margin-bottom: 18px; }
  .tkt { width: 290px; transform: rotate(-2deg); padding: 16px 18px 14px; }
  .tkt-no { font-size: 56px; }
  .tkt::before, .tkt::after { top: 104px; }
  .lg-feats { display: none; }
  .lg-card { padding: 30px 20px 20px; }
}

/* ---------------------------------------------------------------- licence / setup / passwords */
.who b { display: block; font-weight: 600; }
.who small { color: var(--muted); font-size: 11.5px; }
.req { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #fde2e2; color: #9b1c1c; font: 700 10.5px var(--f); letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle; }
.mt { margin-top: 18px; }
.lic-chip { align-self: center; padding: 6px 12px; }
.warn-chip { background: var(--amber-50); color: #8a5a00; }
.lic-msg { margin: -4px 0 14px; padding: 10px 12px; border-radius: 10px; background: #fff1f1; color: #9b1c1c; font-weight: 600; }
.lic-form { display: flex; gap: 10px; align-items: flex-end; margin: 16px 0 10px; padding-top: 16px; border-top: 1px dashed var(--line); }
.lic-form label { flex: 1; margin: 0; }
.setup-page { max-width: 640px; margin: 30px auto; padding: 34px; text-align: center; }
.setup-ic { width: 64px; height: 64px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 18px; background: var(--amber-50); color: #b07000; font-size: 32px; }
.setup-page h1 { font-size: 24px; }
.setup-page > p { color: var(--muted); }
.setup-list { list-style: none; margin: 20px 0; padding: 0; text-align: left; display: grid; gap: 10px; }
.setup-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #fecaca; border-radius: 12px; background: #fff7f7; }
.setup-list .x { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #fde2e2; color: #b91c1c; font-weight: 800; }
.setup-list div { flex: 1; }
.setup-list b { display: block; }
.setup-list small { color: var(--muted); }
.pw-rules { list-style: none; margin: -2px 0 16px; padding: 0; display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.pw-rules li::before { content: "○"; margin-right: 8px; }
.pw-rules li.ok { color: var(--green-d); font-weight: 600; }
.pw-rules li.ok::before { content: "✓"; }
.first-pw { max-width: 520px; margin: 20px auto; }
body.is-locked .nav-a:not(.on), body.is-locked .dd-menu a { opacity: 0.55; }
.g-reset { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.rt-list { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--line); display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 16px; font-size: 13px; }
.rt-list li { display: flex; justify-content: space-between; }
.rt-list span { color: var(--muted); }
.swal2-popup { font-family: var(--f) !important; border-radius: 18px !important; }
.swal2-title { font-family: var(--h) !important; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .burger { display: block; }
  .nav { position: fixed; top: 62px; left: 0; right: 0; bottom: 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px; background: var(--ink); overflow: auto; transform: translateX(-100%); transition: transform 0.2s; }
  body.nav-open .nav { transform: none; }
  .nav-a { height: 46px; }
  .dd-menu { position: static; opacity: 1; visibility: visible; transform: none; display: none; margin: 4px 0 8px; box-shadow: none; }
  .nav-dd.open > .dd-menu { display: block; }
  .top-right .clock { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-in, .g-org { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .top-in { padding: 0 12px; gap: 10px; }
  .brand b { max-width: 120px; }
  .user-chip span { display: none; }
  .user-chip { padding: 3px; }
  .wrap { padding: 18px 12px 30px; }
  .row2, .o-dl, .o-times { grid-template-columns: 1fr 1fr; }
  .estimate { grid-template-columns: 1fr; }
  .out-card .row2 { grid-template-columns: 1fr; }
  .o-top { flex-wrap: wrap; gap: 12px; }
  input { min-width: 0; }
  .kpi b { font-size: 22px; }
  .pay-amt { font-size: 48px; }
  .scan-row { flex-direction: column; }
  #tokIn { max-width: none; }
}

/* ---------------------------------------------------------------- print */
@media print {
  body.print-token > *:not(#printArea), body.print-page > *:not(#printArea) { display: none !important; }
  body.print-token, body.print-page { background: #fff; display: block; }
  #printArea { display: block !important; }
  body.print-token #printArea .slip { width: 58mm; padding: 2mm; border: 0; border-radius: 0; }
  body.print-token .slip-no { font-size: 40px; }
  body.print-token .slip-qr svg { width: 34mm; height: 34mm; }
  body.print-page #printArea table { font-size: 11px; }
  body.print-page #printArea th { position: static; }
  body.print-page #printArea .tbl { max-height: none; overflow: visible; }
  .pr-head { display: flex; flex-direction: column; margin-bottom: 10px; }
  .pr-head b { font-size: 16px; }
  .pr-head small { color: #555; }
  @page { margin: 8mm; }
}
