:root {
  color-scheme: light;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #263247;
  background: #f6f8fb;
  font-synthesis: none;
  --accent: #4c5de5;
  --muted: #7b8698;
  --border: #e7ebf2;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { transition: background .16s, border-color .16s, box-shadow .16s; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid #a5afff; outline-offset: 3px; }
input, select, textarea { outline: none; }
input:focus, select:focus, textarea:focus { border-color: #8793ef !important; box-shadow: 0 0 0 3px #4c5de512; }
[hidden] { display: none !important; }
.icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hdr { height: 76px; border-bottom: 1px solid var(--border); background: #fff; }
.hdr-inner { height: 100%; max-width: 1600px; margin: auto; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; background: #4c5de5; color: #fff; border-radius: 11px; box-shadow: 0 3px 7px #4c5de51c; }
.brand-mark .icon { width: 23px; height: 23px; }
.brand-name { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.4px; line-height: 1.5; }
.brand-caption { display: block; font-size: 10px; color: var(--muted); letter-spacing: 1.4px; }
.header-context { margin-left: 22px; padding-left: 26px; border-left: 1px solid var(--border); font-size: 13px; color: #778297; }
.header-actions { display: flex; align-items: center; gap: 20px; }
.account { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #69758a; }
.account.signed-in::before { content: ""; width: 6px; height: 6px; background: #2caa7d; border-radius: 50%; box-shadow: 0 0 0 3px #eaf8f2; }
.logout { display: flex; align-items: center; gap: 7px; border: 0; padding: 6px 0; background: none; color: #8a94a5; font-size: 12px; }
.logout:hover { color: #c65160; }
.logout .icon { width: 15px; height: 15px; }
.main { display: none; max-width: 1600px; margin: 0 auto; padding: 36px 40px 70px; }
.main.on { display: block; animation: enter .25s ease-out; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.eyebrow { display: flex; align-items: center; gap: 7px; margin: 0 0 9px; color: #8b95a7; font-size: 11px; letter-spacing: .4px; }
.eyebrow .icon { width: 13px; height: 13px; }
h1 { margin: 0; color: #202b3e; font-size: 29px; font-weight: 700; letter-spacing: -1px; line-height: 1.45; }
#pageTitle:focus { outline: none; }
.page-description { margin: 8px 0 0; font-size: 13px; color: #7b8698; line-height: 1.7; }
.heading-actions { display: flex; gap: 10px; flex-shrink: 0; padding-top: 15px; }
.btn { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.btn .icon { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 3px 5px #4c5de514; }
.btn-primary:hover { background: #3f50d3; }
.btn-secondary { background: #fff; color: #5c687e; border-color: #dfe5ee; }
.btn-secondary:hover { background: #f8f9fc; border-color: #cbd3e1; }
.btn-approve { background: #edf7f2; color: #27825e; border-color: #e0efe6; }
.btn-approve:hover { background: #dff1e7; border-color: #cce5d7; }
.btn-danger { background: #fff; color: #bf6670; border-color: #f0dfe2; }
.btn-danger:hover { background: #fff1f3; border-color: #e7c4cb; }
.btn-quiet { background: transparent; color: #8691a2; }
.btn-quiet:hover { background: #f0f3f8; color: #536079; }
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 30px; }
.stat { padding: 18px 20px 17px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-label { font-size: 12px; font-weight: 500; color: #6d788d; }
.stat-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; color: #929caf; background: #f5f7fa; }
.stat-icon .icon { width: 16px; height: 16px; }
.stat-number { display: block; margin-top: 9px; color: #28344b; font-family: "Segoe UI", sans-serif; font-size: 32px; font-weight: 650; letter-spacing: -1.2px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-note { margin-top: 9px; color: #8d97a8; font-size: 10px; }
.stat.total { background: #f0f2ff; border-color: #e0e5fc; }
.stat.total .stat-number { color: #4c5de5; }
.stat.total .stat-icon { color: #6170e6; background: #e4e8fd; }
.stat.pending .stat-icon { color: #c58d33; background: #fff5df; }
.stat.approved .stat-icon, .stat.online .stat-icon { color: #39a37a; background: #eaf7f1; }
.stat.rejected .stat-icon { color: #ca7a86; background: #fdf0f2; }
.registry { overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 4px 16px #25324b03; }
.registry-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 23px 24px 18px; }
.registry-title { display: flex; align-items: center; gap: 9px; }
h2 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.2px; }
.total-count { padding: 2px 7px; background: #f1f3f8; color: #808ba0; border-radius: 5px; font-size: 10px; font-variant-numeric: tabular-nums; }
.registry-note { display: flex; align-items: center; gap: 6px; color: #929bad; font-size: 11px; }
.registry-note .icon { width: 13px; height: 13px; }
.tbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 24px 20px; }
.tabs { display: flex; gap: 3px; padding: 4px; border: 1px solid #eef0f5; border-radius: 8px; background: #f6f8fb; }
.tab { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 31px; padding: 6px 12px; border: 1px solid transparent; border-radius: 5px; background: none; color: #7a8598; font-size: 12px; white-space: nowrap; }
.tab:hover { color: #4c5de5; }
.tab.sel { background: #fff; color: #4c5de5; border-color: #e9ecf4; font-weight: 600; box-shadow: 0 1px 3px #25324b06; }
.tab-count { min-width: 15px; font-size: 10px; font-variant-numeric: tabular-nums; opacity: .8; }
.tab[data-tab="pending"] .tab-count:not(:empty) { color: #b78226; }
.search { position: relative; display: flex; align-items: center; width: 290px; flex-shrink: 0; }
.search > .icon { position: absolute; left: 11px; width: 16px; height: 16px; color: #9ba4b3; pointer-events: none; }
.search input { width: 100%; height: 38px; padding: 8px 34px 8px 35px; border: 1px solid #e4e8ef; border-radius: 7px; background: #fff; color: #44516a; font-size: 11px; }
.search input::-webkit-search-cancel-button { appearance: none; }
input::placeholder, textarea::placeholder { color: #a0a8b6; }
.search-clear { position: absolute; right: 7px; display: grid; place-items: center; width: 24px; height: 24px; padding: 4px; background: none; border: 0; color: #8994a6; border-radius: 4px; }
.search-clear:hover { background: #f0f2f7; }
.search-clear .icon { width: 13px; height: 13px; }
.table-scroll { overflow-x: auto; scrollbar-width: thin; scrollbar-color: #d2d9e5 transparent; }
.table-scroll.is-empty table { min-width: 0; }
.table-scroll.is-empty thead, .table-scroll.is-empty colgroup { display: none; }
table { width: 100%; min-width: 1190px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.col-device { width: 25%; }
.col-status { width: 9%; }
.col-opencode { width: 10%; }
.col-assignee { width: 8%; }
.col-expiry { width: 13%; }
.col-online { width: 12%; }
.col-notes { width: 12%; }
.col-actions { width: 11%; }
th { height: 44px; padding: 10px 14px; border-top: 1px solid #edf0f5; border-bottom: 1px solid #edf0f5; background: #f9fafc; color: #8a94a6; text-align: left; font-size: 11px; font-weight: 500; white-space: nowrap; }
td { padding: 19px 14px; border-bottom: 1px solid #edf0f5; font-size: 12px; vertical-align: middle; color: #606e84; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcff; }
.device { display: flex; gap: 11px; align-items: flex-start; }
.device-icon { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border: 1px solid #e9edf5; background: #f7f9fc; color: #8a97ae; border-radius: 8px; margin-top: 1px; }
.device-icon .icon { width: 17px; height: 17px; }
.device-info { min-width: 0; }
.device-name { display: block; color: #39465e; font-weight: 600; font-size: 12px; margin: 0 0 5px; overflow-wrap: anywhere; }
.machine-id { display: block; color: #8791a4; font-family: Consolas, "SFMono-Regular", monospace; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.secondary { display: block; margin-top: 5px; color: #9aa3b2; font-size: 10px; line-height: 1.5; }
.device-info .secondary { margin-top: 4px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 5px; font-size: 10px; font-weight: 500; white-space: nowrap; background: #f0f2f6; color: #808b9e; }
.badge::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.badge.pending { background: #fff5df; color: #b38329; }
.badge.approved { background: #eaf7f0; color: #358966; }
.badge.rejected { background: #fcf0f2; color: #bf7180; }
.badge.revoked { background: #f0f2f6; color: #8690a1; }
.switch-label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 10px; color: #8b95a7; white-space: nowrap; }
.switch { appearance: none; flex-shrink: 0; position: relative; width: 31px; height: 18px; margin: 0; border-radius: 20px; border: 1px solid #dbe1eb; background: #e4e8f0; cursor: pointer; transition: .18s; }
.switch::after { content: ""; position: absolute; width: 12px; height: 12px; top: 2px; left: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #26324724; transition: transform .18s; }
.switch:checked { background: #6573e9; border-color: #6573e9; }
.switch:checked::after { transform: translateX(13px); }
.switch:disabled { opacity: .45; cursor: not-allowed; }
.edit-field { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 0; border: 0; background: none; color: #65738a; font-size: 12px; text-align: left; border-radius: 3px; }
.edit-field .icon { width: 11px; height: 11px; opacity: 0; color: #7e8aee; flex-shrink: 0; }
.edit-field:hover, .edit-field:focus-visible { color: #4c5de5; }
.edit-field:hover .icon, .edit-field:focus-visible .icon { opacity: 1; }
.edit-field.unset { color: #a4adbb; font-size: 11px; }
.edit-field.expired { color: #c97180; }
.edit-field.notes span { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; line-height: 1.7; font-size: 11px; }
.online-time { display: flex; align-items: center; gap: 6px; font-size: 11px; font-variant-numeric: tabular-nums; }
.online-dot { width: 5px; height: 5px; background: #cdd4df; border-radius: 50%; flex-shrink: 0; }
.online-dot.active { background: #49ae87; }
.ip { font-family: Consolas, monospace; }
.row-actions { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.row-actions .btn { padding: 5px 8px; min-height: 28px; font-size: 10px; border-radius: 5px; }
.table-footer { min-height: 49px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-top: 1px solid var(--border); color: #9ba4b4; font-size: 10px; }
.table-footer strong { color: #66738b; font-weight: 500; }
.footer-hint { display: flex; align-items: center; gap: 6px; }
.footer-hint .icon { width: 12px; height: 12px; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; margin-bottom: 18px; border: 1px solid #f0dfc1; border-radius: 8px; background: #fffbf3; color: #a17c43; font-size: 12px; }
.notice button { border: 0; background: none; color: #886124; font-size: 12px; text-decoration: underline; }
.empty-cell { text-align: center; padding: 58px 24px 62px !important; }
.empty-icon { display: grid; place-items: center; margin: 0 auto 14px; width: 48px; height: 48px; border: 1px solid #e8ecf4; border-radius: 14px; color: #a0abc0; background: #f8faff; }
.empty-icon .icon { width: 23px; height: 23px; }
.empty-title { margin: 0 0 7px; font-size: 13px; font-weight: 600; color: #68758c; }
.empty-description { margin: 0; color: #9ba5b6; font-size: 11px; line-height: 1.8; }
.empty-cell .btn { margin-top: 16px; }
.loading .icon, .refreshing .icon { animation: spin 1s linear infinite; }
.login-wrap { display: grid; justify-items: center; padding: 75px 24px 80px; }
.login-intro { text-align: center; margin-bottom: 27px; }
.login-intro .eyebrow { justify-content: center; margin-bottom: 10px; font-size: 10px; color: #919bb0; letter-spacing: 2px; }
.login-intro h1 { font-size: 28px; letter-spacing: -.8px; }
.login-intro p { margin: 11px 0 0; font-size: 12px; color: #8792a6; }
.login { width: 390px; max-width: 100%; padding: 32px; border: 1px solid #e3e8f2; border-radius: 16px; background: #fff; box-shadow: 0 12px 36px #34456b08, 0 2px 4px #34456b02; }
.login-lock { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid #e4e8ff; border-radius: 12px; color: #6877e3; background: #f2f4ff; margin-bottom: 21px; }
.login-lock .icon { width: 21px; height: 21px; }
.login h2 { font-size: 18px; color: #344058; }
.login-description { margin: 9px 0 26px; font-size: 12px; color: #929bae; line-height: 1.8; }
.login label, .modal label { display: block; font-size: 12px; color: #69758c; font-weight: 500; margin: 17px 0 8px; }
.login input, .modal input, .modal select, .modal textarea { width: 100%; min-height: 40px; padding: 10px 12px; border: 1px solid #e0e5ef; border-radius: 7px; background: #fff; color: #49566e; font-size: 12px; }
.login .btn { width: 100%; margin-top: 19px; min-height: 41px; }
.login .btn .icon { margin-left: auto; }
.login .btn span { margin-left: auto; }
.login-error { margin: 12px 0 0; padding: 9px 11px; border-radius: 6px; color: #bb6572; background: #fff2f4; font-size: 11px; line-height: 1.6; }
.login-footnote { display: flex; align-items: center; gap: 6px; margin-top: 23px; color: #a1aabd; font-size: 10px; }
.login-footnote .icon { width: 12px; height: 12px; }
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 100; padding: 24px; background: #18244165; backdrop-filter: blur(4px); align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal { position: relative; width: 460px; max-width: 100%; max-height: calc(100dvh - 48px); overflow-y: auto; padding: 29px; background: #fff; border: 1px solid #ffffff80; border-radius: 16px; box-shadow: 0 24px 80px #18244138; animation: enter .18s ease-out; }
.modal h2 { padding-right: 25px; font-size: 19px; color: #344158; }
.modal-description { margin: 8px 0 22px; color: #909aad; font-size: 12px; line-height: 1.7; }
.modal-close { position: absolute; top: 22px; right: 21px; width: 28px; height: 28px; padding: 5px; border: 0; border-radius: 6px; color: #97a1b3; background: none; }
.modal-close:hover { background: #f0f3f8; color: #5f6b81; }
.modal input:disabled { background: #f7f9fc; color: #8d97ab; font-family: Consolas, monospace; font-size: 11px; }
.modal textarea { min-height: 90px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-help { margin: 7px 0 0; color: #a0a9b9; font-size: 10px; }
.secondary-inline { color: #a0a9b9; font-size: 10px; font-weight: 400; }
.modal .btns { display: flex; justify-content: flex-end; gap: 8px; padding-top: 21px; margin-top: 24px; border-top: 1px solid #edf0f5; }
.toasts { position: fixed; right: 24px; top: 90px; z-index: 200; display: grid; gap: 9px; max-width: min(390px, calc(100vw - 48px)); }
.toast { display: flex; align-items: center; gap: 9px; padding: 13px 17px; border: 1px solid #d5e9df; border-radius: 9px; background: #f8fffb; color: #3e8466; font-size: 12px; line-height: 1.7; box-shadow: 0 7px 25px #25324b12; animation: enter .18s ease-out; overflow-wrap: anywhere; }
.toast.err { color: #b86070; border-color: #f1d8df; background: #fff8fa; }
.toast .icon { width: 16px; height: 16px; }
.ver { position: fixed; left: 0; bottom: 0; z-index: 60; display: flex; gap: 8px; padding: 9px 18px; background: #f6f8fbef; color: #a1aabd; font-size: 10px; font-variant-numeric: tabular-nums; pointer-events: none; }
.ver b { color: #8c97ac; font-weight: 500; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 1250px) {
  th:last-child, td:last-child { position: sticky; right: 0; background: #fff; box-shadow: -6px 0 12px -10px #3c4a68; }
  th:last-child { background: #f9fafc; }
}
@media (max-width: 1200px) {
  .hdr-inner { padding: 0 28px; }
  .main { padding: 30px 28px 65px; }
  .stats { gap: 10px; }
  .stat { padding: 15px; }
  .stat-note { font-size: 9px; }
}
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 17px 20px; }
  .stat-number { font-size: 29px; }
  .stat-note { font-size: 10px; }
  .tbar { align-items: stretch; flex-direction: column; gap: 14px; }
  .tabs { align-self: flex-start; }
  .search { width: 100%; }
  .registry-note { display: none; }
  .header-context { margin-left: 16px; padding-left: 20px; }
}
@media (max-width: 600px) {
  .hdr { height: 66px; }
  .hdr-inner { padding: 0 18px; gap: 12px; }
  .brand { gap: 9px; }
  .brand-mark { width: 31px; height: 31px; border-radius: 9px; }
  .brand-mark .icon { width: 20px; height: 20px; }
  .brand-name { font-size: 14px; }
  .brand-caption { font-size: 8px; letter-spacing: 1.1px; }
  .header-context, .account { display: none; }
  .header-actions { gap: 0; }
  .logout { font-size: 11px; }
  .main { padding: 25px 16px 60px; }
  .page-heading { flex-direction: column; align-items: stretch; gap: 18px; margin-bottom: 22px; }
  h1 { font-size: 26px; }
  .page-description { font-size: 12px; margin-top: 6px; }
  .heading-actions { padding: 0; gap: 8px; }
  .heading-actions .btn { flex: 1; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 23px; }
  .stat { padding: 14px 16px; border-radius: 10px; }
  .stat-number { font-size: 28px; margin-top: 8px; }
  .stat-note { margin-top: 7px; }
  .registry-heading { padding: 20px 16px 16px; }
  .tbar { padding: 0 16px 16px; gap: 12px; }
  .tabs { max-width: 100%; width: 100%; overflow-x: auto; gap: 1px; padding: 3px; scrollbar-width: none; }
  .tab { flex: 1 0 auto; padding: 7px 8px; font-size: 11px; gap: 4px; }
  .tab-count { min-width: 9px; font-size: 9px; }
  .table-footer { padding: 12px 16px; }
  .footer-hint { font-size: 9px; }
  .footer-hint .icon { display: none; }
  .login-wrap { padding: 50px 20px 65px; }
  .login-intro h1 { font-size: 25px; }
  .login { padding: 28px; }
  .modal-overlay { padding: 16px; }
  .modal { padding: 25px 22px; max-height: calc(100dvh - 32px); }
  .ver { padding: 7px 14px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
