:root { color-scheme: dark; --bg:#0c1018; --panel:#141b27; --line:#283246; --text:#eaf0fa; --muted:#94a2b9; --accent:#76baff; --green:#70d7ad; --warn:#f3be72; --red:#f28e9e; font-family:'Microsoft JhengHei UI','Microsoft JhengHei','PingFang TC',system-ui,sans-serif; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); font-size:14px; line-height:1.5; }
button,input,select { font:inherit; }
button { border:1px solid #39475e; background:#1c283a; color:var(--text); padding:9px 14px; border-radius:8px; cursor:pointer; white-space:nowrap; }
button:hover { border-color:var(--accent); background:#24364d; }
button:disabled { opacity:.45; cursor:wait; }
button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
button.primary { background:var(--accent); color:#071c31; border-color:var(--accent); font-weight:700; }
button.quiet { background:transparent; }
button.danger { color:var(--red); border-color:#753f4d; background:#2b1d29; }
button.small { padding:5px 9px; font-size:12px; }
input,select { min-width:0; width:100%; color:var(--text); background:#0f1622; border:1px solid #344158; border-radius:8px; padding:10px 12px; }
input::placeholder { color:#64748c; }
label { display:block; color:#c7d2e2; font-size:13px; margin-bottom:6px; }
h1,h2,p { margin-top:0; }
h1 { font-size:30px; letter-spacing:-.04em; line-height:1.25; margin-bottom:10px; }
h2 { font-size:17px; margin-bottom:6px; }
.muted,.note,.footer-note { color:var(--muted); }
.topbar { height:86px; padding:0 max(24px,calc((100% - 1420px)/2)); display:flex; align-items:center; justify-content:space-between; gap:20px; border-bottom:1px solid var(--line); background:#111824; }
.brand { display:flex; align-items:center; gap:12px; color:var(--accent); text-decoration:none; font:700 28px/1 ui-monospace,Consolas,monospace; }
.brand>span { color:var(--text); font:600 15px/1.4 system-ui,sans-serif; letter-spacing:.02em; }
.brand>svg { flex:none; }
.brand small { display:block; color:var(--muted); font:12px/1.4 system-ui,sans-serif; }
.top-actions { display:flex; align-items:center; gap:14px; }
.connection { color:var(--muted); font-size:12px; }
.connection.connected { color:var(--green); }
main { max-width:1468px; margin:auto; padding:34px 24px 48px; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:14px; }
.login { max-width:450px; padding:34px; margin:8vh auto 0; }
.login form { margin-top:25px; }
.login form button { width:100%; margin-top:14px; }
.note { font-size:12px; margin:20px 0 0; }
.eyebrow { color:var(--accent); font-size:12px; font-weight:700; margin-bottom:8px; letter-spacing:.1em; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:22px; }
.page-heading p:last-child { margin-bottom:0; }
.refresh { display:flex; align-items:center; gap:12px; font-size:12px; }
.message { margin:0; color:var(--green); white-space:pre-line; overflow-wrap:anywhere; }
.message:not(:empty) { margin:12px 0 16px; padding:12px 14px; background:#142c28; border:1px solid #28564a; border-radius:8px; }
.message.error { color:var(--warn); background:#2b251a; border-color:#5c4930; }
.summary { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin:24px 0; }
.summary>div { display:flex; justify-content:space-between; align-items:center; background:#111a28; border:1px solid var(--line); border-radius:10px; padding:15px 20px; }
.summary span { color:var(--muted); font-size:13px; }
.summary strong { font-size:26px; font-variant-numeric:tabular-nums; }
.issue-card { padding:22px; margin-bottom:24px; }
.issue-intro p { margin:0; font-size:12px; }
.issue-form { display:grid; grid-template-columns:minmax(170px,1fr) auto; align-items:flex-end; gap:14px; margin-top:18px; }
.issue-form>button { grid-column:2; grid-row:1; }
.expiry-options { grid-column:1/-1; display:flex; align-items:flex-start; gap:18px; padding-top:4px; }
.expiry-options>div { min-width:220px; }
.expiry-preview { margin:24px 0 0; font-size:12px; }
.issued small { display:block; margin-top:6px; color:var(--green); }
.issued { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-top:20px; padding:15px; border:1px solid #315d50; background:#142922; border-radius:10px; }
.issued span { color:var(--green); font-size:12px; }
.issued strong { margin-left:12px; font-size:13px; }
.issued code { display:block; margin-top:6px; overflow-wrap:anywhere; font-size:14px; user-select:all; }
.records { overflow:hidden; }
.records-toolbar { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:16px 18px; border-bottom:1px solid var(--line); }
.tabs { display:flex; gap:6px; }
.tabs button { background:transparent; color:var(--muted); border-color:transparent; }
.tabs button[aria-selected=true] { color:var(--accent); background:#1c3047; }
.search { width:340px; margin:0; }
.search input { font-size:12px; }
.list-note { padding:10px 20px 0; margin:0; font-size:12px; }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; text-align:left; }
th { color:var(--muted); font-size:12px; font-weight:500; padding:15px 16px; white-space:nowrap; }
td { padding:14px 16px; border-top:1px solid var(--line); vertical-align:top; font-size:13px; }
tbody tr:hover { background:#182233; }
td code { font:12px/1.65 ui-monospace,Consolas,monospace; }
.serial { max-width:280px; overflow-wrap:anywhere; display:block; user-select:all; color:#c9e5ff; }
.copy { margin-top:7px; }
.machine-code { display:block; max-width:220px; overflow-wrap:anywhere; color:var(--muted); user-select:all; }
.cell-sub { display:block; margin-top:5px; color:var(--muted); font-size:11px; white-space:nowrap; }
.date { white-space:nowrap; font:12px/1.7 ui-monospace,Consolas,monospace; }
.badge { display:inline-block; color:var(--green); background:#183b30; border:1px solid #2c5a48; border-radius:5px; padding:2px 7px; font-size:11px; white-space:nowrap; }
.badge.disabled { color:var(--red); background:#35232e; border-color:#634151; }
.badge.expired { color:var(--muted); background:#252c36; border-color:#3e4655; }
.action-column { text-align:right; }
td:last-child { text-align:right; }
.empty { padding:36px 24px; text-align:center; color:var(--muted); font-size:13px; margin:0; }
.footer-note { font-size:12px; margin:16px 0 0; }
dialog { max-width:calc(100vw - 32px); width:520px; max-height:88vh; overflow:auto; color:var(--text); background:var(--panel); border:1px solid #3b4a61; border-radius:14px; padding:24px; }
dialog::backdrop { background:#030811b8; }
dialog h2 { font-size:20px; }
dialog .expiry-preview { margin-top:12px; }
.expiry-date { margin-top:16px; }
.dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:22px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
[hidden] { display:none!important; }
@media (max-width:900px) { .expiry-options { flex-wrap:wrap; } .expiry-preview { margin-top:0; } .summary { gap:8px; } .summary>div { padding:12px; } .page-heading { align-items:flex-start; } .refresh { flex-direction:column; align-items:flex-end; } }
@media (max-width:600px) { main { padding:24px 14px; } .topbar { height:74px; padding:0 16px; } h1 { font-size:25px; } .login { padding:25px; margin-top:5vh; } .summary { grid-template-columns:repeat(2,1fr); } .page-heading { gap:8px; } .records-toolbar { flex-direction:column; align-items:stretch; gap:12px; } .search { width:auto; } .issue-card { padding:18px; } .issued { align-items:flex-start; flex-direction:column; gap:12px; } .connection { max-width:90px; text-align:right; } }
