:root { color-scheme: light; font: 15px/1.6 "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; color: #213047; background: #fff; }
* { box-sizing: border-box; scrollbar-color: #a9b8cc #f4f7fb; scrollbar-width: auto; }
body { margin: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
[hidden] { display: none !important; }
::selection { color: #173b7a; background: #dce9fc; }
a { color: #245ca7; text-underline-offset: 3px; }
button, .devices-entry-link { min-height: 44px; padding: 8px 14px; font: inherit; border: 1px solid #cbd6e4; border-radius: 4px; background: #fff; color: #245ca7; cursor: pointer; }
button:hover:enabled, .devices-entry-link:hover { background: #edf3fd; }
button:disabled { color: #647287; background: #f4f6f9; cursor: default; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid #6394df; outline-offset: 3px; }
.devices-skip { position: fixed; left: 164px; top: -80px; z-index: 20; padding: 12px; background: #fff; }
.devices-skip:focus { top: 6px; }
.devices-sidebar { position: fixed; inset: 0 auto 0 0; width: 152px; border-right: 1px solid #e1e7ef; background: #f7f9fc; padding: 20px 12px; display: flex; flex-direction: column; }
.devices-brand { display: flex; align-items: center; min-height: 44px; color: #173b7a; font-size: 20px; font-weight: 700; text-decoration: none; padding: 0 8px; }
.devices-sidebar nav { display: grid; gap: 6px; margin-top: 20px; }
.devices-sidebar nav a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 4px; color: #46566d; text-decoration: none; }
.devices-sidebar nav a:hover { background: #edf3fd; }
.devices-sidebar nav [aria-current] { background: #e7effb; color: #245ca7; font-weight: 600; }
.devices-sidebar>p { margin: auto 8px 0; color: #53647a; font-size: 14px; }
.devices-shell { min-width: 0; margin-left: 152px; }
.devices-topbar { height: 56px; padding: 0 24px; border-bottom: 1px solid #e1e7ef; display: flex; align-items: center; gap: 24px; font-size: 14px; color: #53647a; }
.devices-topbar a { display: inline-flex; align-items: center; min-height: 44px; }
.devices-content { min-width: 0; padding: 24px; }
.devices-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
h1 { margin: 0; font-size: 24px; line-height: 1.5; font-weight: 600; }
h2 { margin: 0; font-size: 18px; line-height: 1.6; font-weight: 600; }
.devices-header p { margin: 6px 0 0; color: #53647a; font-size: 14px; }
.devices-entry-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; flex: 0 0 auto; }
.devices-sections { display: flex; gap: 24px; border-bottom: 1px solid #dce3ec; margin-bottom: 16px; }
.devices-sections a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; }
.devices-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.devices-toolbar p { margin: 0; overflow-wrap: anywhere; }
.devices-feedback { margin: 12px 0 24px; padding: 10px 12px; background: #f0f5fc; color: #345375; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.devices-feedback p { margin: 0; }
.devices-feedback[data-state="error"] { background: #fff0ef; color: #9b2d2d; }
.devices-feedback[data-state="unknown"] { background: #fff6e5; color: #805510; }
.devices-feedback[data-state="success"] { background: #edf7f0; color: #245f3c; }
.devices-panel { margin-top: 24px; min-width: 0; }
.devices-panel + .devices-panel { padding-top: 24px; border-top: 1px solid #dce3ec; }
.devices-panel-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 20px; }
.devices-panel-heading h2 { scroll-margin-top: 16px; }
.devices-panel-heading p, .devices-list-state, .devices-note { font-size: 14px; color: #53647a; line-height: 1.7; }
.devices-panel-heading p { margin: 0; }
.devices-list-state { margin: 8px 0 12px; }
.devices-list-state[data-state="error"] { color: #9b2d2d; }
.devices-table-wrap { overflow: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; min-width: 850px; font-size: 15px; text-align: left; font-variant-numeric: tabular-nums; }
th { padding: 11px 12px; background: #f3f6fb; color: #46566d; font-size: 14px; font-weight: 600; white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid #e5eaf1; vertical-align: top; line-height: 1.6; }
tbody tr:hover { background: #f8faff; }
.devices-cell-detail { display: block; color: #53647a; font-size: 14px; max-width: 205px; overflow-wrap: anywhere; }
.devices-cell-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.devices-cell-actions button { min-height: 44px; padding: 7px 10px; }
.devices-status { display: inline-block; border-radius: 3px; padding: 2px 7px; font-size: 14px; background: #f0f3f7; white-space: nowrap; }
.devices-status[data-status="pending"] { color: #805510; background: #fff6e5; }
.devices-status[data-status="approved"], .devices-status[data-status="active"] { color: #245f3c; background: #edf7f0; }
.devices-danger { color: #9b2d2d; border-color: #ddb7b7; }
.devices-note { margin: 24px 0 0; max-width: 75ch; }
dialog { width: min(100% - 32px, 510px); max-height: calc(100dvh - 24px); overflow: auto; padding: 24px; border: 0; border-radius: 8px; color: inherit; box-shadow: 0 12px 40px #21304733; }
dialog::backdrop { background: rgb(27 42 61 / 40%); }
dialog p { font-size: 14px; line-height: 1.7; }
.devices-confirm-details { display: grid; grid-template-columns: 70px 1fr; gap: 10px; font-size: 14px; line-height: 1.6; }
.devices-confirm-details dt { color: #53647a; }
.devices-confirm-details dd { margin: 0; overflow-wrap: anywhere; }
.devices-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.devices-confirm-error { color: #9b2d2d; }
@media (max-width: 767px) {
 .devices-sidebar { display: none; }
 .devices-shell { margin-left: 0; }
 .devices-skip { left: 12px; }
 .devices-topbar { padding: 0 12px; justify-content: space-between; gap: 12px; }
 .devices-content { padding: 20px 12px 32px; }
 .devices-header { flex-direction: column; gap: 12px; margin-bottom: 12px; }
 .devices-header h1 { font-size: 22px; }
 .devices-toolbar { flex-wrap: wrap; }
 .devices-feedback { margin-bottom: 20px; }
 .devices-table-wrap { overflow: visible; }
 table, tbody { display: block; min-width: 0; width: 100%; }
 thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
 tbody tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 16px; padding: 16px 0; border-top: 1px solid #dce3ec; }
 td { display: block; border: 0; padding: 0; overflow-wrap: anywhere; min-width: 0; }
 td:nth-child(2), td:last-child { grid-column: 1 / -1; }
 td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: #53647a; font-size: 14px; }
 .devices-cell-detail { max-width: 100%; }
 .devices-cell-actions { gap: 8px; }
 .devices-cell-actions button { flex: 1 1 130px; }
 .devices-status { white-space: normal; }
 dialog { padding: 20px; }
 .devices-dialog-actions { flex-wrap: wrap; }
 .devices-dialog-actions button { flex: 1 1 130px; }
}
