:root { color-scheme: light; font-family: Arial, "Microsoft YaHei", sans-serif; background: #f5f6f8; color: #18202a; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button { border: 0; border-radius: 6px; background: #0f6b7a; color: #fff; cursor: pointer; padding: 10px 14px; }
button.secondary { background: #e7ebef; color: #18202a; }
button.danger { background: #a93b35; }
button:disabled { cursor: not-allowed; opacity: .55; }
input, textarea { width: 100%; border: 1px solid #cbd3dc; border-radius: 6px; background: #fff; color: #18202a; padding: 10px 11px; }
label { display: grid; gap: 6px; color: #4a5663; font-size: 13px; }
.shell { min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #dce2e8; background: #fff; padding: 14px 24px; }
.brand { display: grid; gap: 2px; }
.brand strong { font-size: 18px; }
.brand span, .muted { color: #6b7581; font-size: 13px; }
.content { display: grid; gap: 18px; margin: 0 auto; max-width: 1180px; padding: 22px; }
.login { display: grid; gap: 18px; margin: 12vh auto; max-width: 420px; border: 1px solid #dce2e8; border-radius: 8px; background: #fff; padding: 24px; }
.panel { border: 1px solid #dce2e8; border-radius: 8px; background: #fff; padding: 18px; }
.panel h2, .login h1 { margin: 0; font-size: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 12px; align-items: end; margin-top: 14px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; }
.stat { border: 1px solid #dce2e8; border-radius: 8px; background: #fff; padding: 16px; }
.stat span { color: #6b7581; font-size: 13px; }
.stat strong { display: block; margin-top: 8px; font-size: 26px; }
.product-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.product-tab { background: #e7ebef; color: #18202a; }
.product-tab.selected { background: #0f6b7a; color: #fff; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th, td { border-bottom: 1px solid #e5e9ee; padding: 12px 10px; text-align: left; vertical-align: top; }
th { color: #56616e; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.code { font-family: Consolas, Monaco, monospace; font-weight: 700; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px; font-size: 12px; }
.badge.active { background: #dff2e5; color: #176536; }
.badge.revoked { background: #f7dedc; color: #8d2c27; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.devices { display: grid; gap: 8px; margin-top: 8px; }
.device { display: grid; gap: 4px; border-left: 3px solid #cbd3dc; padding-left: 9px; }
.toast { position: fixed; right: 18px; bottom: 18px; max-width: min(420px, calc(100vw - 36px)); border-radius: 8px; background: #18202a; color: #fff; padding: 12px 14px; box-shadow: 0 8px 26px rgba(24, 32, 42, .22); }
.hidden { display: none; }
.modal { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(20, 28, 36, .42); padding: 18px; }
.dialog { display: grid; gap: 14px; width: min(420px, 100%); border-radius: 8px; background: #fff; padding: 20px; box-shadow: 0 18px 50px rgba(20, 28, 36, .24); }
.dialog h2 { margin: 0; font-size: 20px; }
.product-registry { display: grid; gap: 8px; margin-top: 14px; }
.product-registry-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #e5e9ee; padding: 10px 0; }
.product-registry-row span { display: flex; align-items: center; gap: 10px; }
.product-registry-row code { color: #56616e; font-family: Consolas, Monaco, monospace; font-size: 12px; }
.product-toggle { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
@media (max-width: 760px) { .topbar { align-items: flex-start; flex-direction: column; } .content { padding: 14px; } .form-grid, .stats { grid-template-columns: 1fr; } }
