:root{color-scheme:dark;--bg:#101112;--surface:#17191b;--surface-hover:#202326;--text:#eff1f3;--muted:#93999f;--line:#2a2d30;--accent:#78adff;--accent-fill:#3375d9;--success:#68c89d;--warning:#e3bd69;--danger:#ee7b85;--field:#111315;--shadow:0 18px 65px #0008}
:root[data-theme=light]{color-scheme:light;--bg:#f8f9fa;--surface:#fff;--surface-hover:#f0f2f5;--text:#202328;--muted:#707780;--line:#e1e4e8;--accent:#2865bb;--accent-fill:#2869c9;--success:#27825b;--warning:#927221;--danger:#bd3349;--field:#fff;--shadow:0 18px 65px #17233024}
*{box-sizing:border-box;letter-spacing:0}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 "Segoe UI","Microsoft YaHei",sans-serif}button,input,select,textarea{font:inherit;color:inherit}button,a,input,select,textarea{outline-offset:3px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent)}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}button,a{-webkit-tap-highlight-color:transparent}button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:36px;border:1px solid transparent;border-radius:6px;background:transparent;padding:8px 13px;white-space:nowrap;transition:background .15s,opacity .15s}button:not(:disabled):active{transform:translateY(1px)}button:not(:disabled):hover{background:var(--surface-hover)}button svg{width:17px;height:17px;stroke-width:1.8;flex-shrink:0}.primary-button{background:var(--accent-fill);color:#fff;border-color:var(--accent-fill)}.primary-button:not(:disabled):hover{background:var(--accent-fill);filter:brightness(1.12)}.quiet-button{border-color:var(--line);background:var(--surface)}.danger-button{background:#b93348;color:#fff}.danger-button:not(:disabled):hover{background:#cb3952}.danger-quiet-button{color:var(--danger)}.icon-button{width:36px;height:36px;min-width:36px;padding:0}.icon-button svg{width:18px;height:18px}input,select,textarea{width:100%;min-width:0;background:var(--field);border:1px solid var(--line);border-radius:6px;padding:10px 12px;min-height:42px}input::placeholder{color:var(--muted)}input[type=number]{font-variant-numeric:tabular-nums}label{display:block;margin:16px 0 7px;font-size:13px;color:var(--text)}select{cursor:pointer}h1,h2,h3,p{margin:0}h1{font-size:26px;line-height:1.3;font-weight:600}h2{font-size:18px;font-weight:600}h3{font-size:13px;font-weight:600}a{color:inherit;text-decoration:none}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.app-header{height:70px;display:flex;align-items:center;justify-content:space-between;padding:0 36px;border-bottom:1px solid var(--line);background:var(--surface)}.brand{display:flex;align-items:center;gap:10px;min-width:0;font-size:18px;font-weight:600}.brand img{flex-shrink:0}.brand-divider{height:20px;width:1px;background:var(--line);margin:0 8px}.brand-subtitle{font-size:13px;font-weight:400;color:var(--muted)}.header-actions{display:flex;align-items:center;gap:8px}.connection{font-size:12px;color:var(--muted);margin-right:10px}.connection.connected{color:var(--success)}.workspace{max-width:1520px;margin:0 auto;padding:34px 36px 22px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.eyebrow{font-size:11px;color:var(--muted);margin-bottom:6px}.summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border-bottom:1px solid var(--line);margin:30px 0 24px;padding-bottom:20px;gap:18px}.stat{display:flex;align-items:flex-start;flex-direction:column;padding:6px 12px;min-height:85px;position:relative;border-radius:4px;gap:6px}.stat:first-child{padding-left:0}.stat span{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:7px}.stat strong{font-size:28px;line-height:1.2;font-weight:600;font-variant-numeric:tabular-nums}.stat.selected span{color:var(--text)}.stat.selected:after{content:"";position:absolute;bottom:-20px;left:12px;right:12px;height:2px;background:var(--accent)}.stat:first-child:after{left:0}.dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--muted)}.dot.active{background:var(--success)}.dot.pending{background:var(--accent)}.dot.expired{background:var(--warning)}.dot.revoked{background:var(--danger)}.list-toolbar{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:18px}.search-field{position:relative;width:365px;max-width:60%;display:flex;align-items:center}.search-field>svg{position:absolute;left:12px;width:16px;height:16px;color:var(--muted);pointer-events:none}.search-field input{padding-left:38px;background:var(--surface);height:40px;min-height:40px}.toolbar-right{display:flex;align-items:center;gap:10px}.toolbar-right select{width:128px;min-height:40px;padding:8px 11px}.table-region{position:relative;min-height:260px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;min-width:920px}th{font-size:12px;font-weight:400;color:var(--muted);padding:14px 12px;background:var(--bg);white-space:nowrap}td{padding:16px 12px;border-top:1px solid var(--line);font-size:12px;color:var(--muted);height:76px}th:first-child,td:first-child{padding-left:0}tr:hover td{background:var(--surface)}.grant-column{width:29%}.actions-column{width:50px}.grant-link{display:block;text-align:left;padding:0;min-height:0;color:var(--text);font-family:"Cascadia Code",Consolas,monospace;font-size:12px}.grant-link:not(:disabled):hover{background:none;color:var(--accent)}.row-note{font-size:12px;margin-top:5px;max-width:290px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status-label{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}.status-label.active{color:var(--success)}.status-label.expired{color:var(--warning)}.status-label.revoked{color:var(--danger)}.status-label.unactivated{color:var(--accent)}.device-label{font-family:Consolas,monospace;font-size:11px}.date-line{display:block;font-variant-numeric:tabular-nums}.list-footer{display:flex;align-items:center;justify-content:space-between;padding-top:15px;color:var(--muted);font-size:12px}.page-controls{display:flex;align-items:center;gap:12px}.page-controls>span{min-width:45px;text-align:center;font-variant-numeric:tabular-nums}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:260px;gap:8px;color:var(--muted)}.empty-state>svg{width:32px;height:32px;margin-bottom:8px;opacity:.65}.empty-state h2{font-size:14px;color:var(--text)}.empty-state p{font-size:12px}.loading-state{position:absolute;inset:44px 0 0;display:flex;align-items:center;justify-content:center;gap:12px;background:var(--bg);color:var(--muted);font-size:13px}.spinner{width:17px;height:17px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:spin .75s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.login-view{width:360px;max-width:calc(100% - 40px);margin:100px auto 40px}.login-heading{text-align:center}.login-heading img{margin-bottom:18px}.login-heading h1{font-size:24px}.login-heading p{font-size:13px;color:var(--muted);margin-top:8px}.login-view form{margin-top:34px}.login-view form>.primary-button{width:100%;margin-top:12px}.form-error{font-size:12px;min-height:0;color:var(--danger);margin-top:10px;white-space:pre-line}.form-error:empty{display:none}.subtle{font-size:12px;color:var(--muted);line-height:1.7;margin-top:14px}.optional{font-size:11px;color:var(--muted);margin-left:5px}.notice{display:flex;align-items:flex-start;gap:10px;font-size:12px;line-height:1.8;color:var(--warning);margin:10px 0 16px}.notice svg{width:18px;height:18px;flex-shrink:0;margin-top:2px}dialog{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:24px;width:520px;max-width:calc(100% - 28px);max-height:calc(100dvh - 40px);overflow-y:auto;box-shadow:var(--shadow)}dialog::backdrop{background:#0008;backdrop-filter:blur(4px)}.small-dialog{width:440px}.dialog-header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:-3px -6px 10px 0}.dialog-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;border-top:1px solid var(--line);margin-top:24px;padding-top:18px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.duration-presets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line);border-radius:6px;overflow:hidden}.duration-presets button{border-radius:0;border:0;border-right:1px solid var(--line);min-height:40px}.duration-presets button:last-child{border-right:0}.duration-presets button.selected{background:var(--surface-hover);color:var(--accent)}#generated-codes{font:12px/2 Consolas,"Cascadia Code",monospace;white-space:pre;overflow-x:auto;resize:vertical;min-height:180px}.detail-grid{display:grid;grid-template-columns:100px minmax(0,1fr);gap:10px 16px;font-size:12px;margin:16px 0 22px}.detail-grid dt{color:var(--muted)}.detail-grid dd{margin:0;overflow-wrap:anywhere}.detail-grid dd.mono{font-family:Consolas,monospace;font-size:11px}.note-editor{display:flex;align-items:center;gap:6px}.note-editor .icon-button{border:1px solid var(--line);height:42px;width:42px;min-width:42px}.audit-heading{margin-top:24px;padding-top:18px;border-top:1px solid var(--line)}.audit-list{list-style:none;padding:0;margin:12px 0 0;max-height:180px;overflow-y:auto;font-size:12px}.audit-list li{display:flex;justify-content:space-between;gap:12px;padding:6px 0;color:var(--muted)}.toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);max-width:calc(100% - 32px);width:max-content;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:6px;padding:12px 18px;box-shadow:var(--shadow);font-size:13px;z-index:20}.toast.error{border-color:var(--danger)}
@media(max-width:850px){.app-header{padding:0 20px}.workspace{padding:28px 20px 20px}.brand-subtitle{display:none}.brand-divider{display:none}.connection{display:none}.summary{gap:6px}.stat{padding:5px 8px}.stat strong{font-size:24px}.stat span{font-size:11px}.stat.selected:after{left:8px;right:8px}.list-toolbar{gap:10px}.search-field{max-width:none;flex:1;min-width:0}.toolbar-right select{width:108px;font-size:12px}}@media(max-width:480px){.app-header{height:62px;padding:0 16px}.brand{font-size:16px;gap:8px}.header-actions{gap:2px}.workspace{padding:24px 16px 18px}h1{font-size:23px}.page-heading{align-items:flex-end}.page-heading>.primary-button{font-size:12px;padding:9px 10px;gap:5px}.summary{gap:2px;margin-top:24px}.stat{padding:6px 4px;min-height:76px}.stat span{font-size:10px;gap:4px}.stat strong{font-size:22px}.stat.selected:after{left:4px;right:4px}.toolbar-right{gap:4px}.toolbar-right select{width:94px;padding-left:8px}.search-field input{font-size:12px}.form-grid{gap:12px}dialog{padding:20px}.dialog-footer{gap:7px;flex-wrap:wrap}.detail-grid{grid-template-columns:82px minmax(0,1fr)}.login-view{margin-top:65px}.audit-list li{font-size:11px}}
.workspace{display:flex;flex-direction:column;height:calc(100dvh - 70px)}.page-heading,.summary,.list-toolbar,.list-footer{flex-shrink:0}.summary{margin-top:24px;margin-bottom:20px;padding-bottom:16px}.stat{min-height:68px}.stat.selected:after{bottom:-16px}.table-region{flex:1;min-height:220px;overflow:auto}th{position:sticky;top:0;z-index:1}td{height:64px;padding-top:12px;padding-bottom:12px}
@media(max-width:480px){.workspace{height:calc(100dvh - 62px)}.summary{margin-top:24px}.stat{min-height:68px}}
.product-bar{display:flex;align-items:center;gap:12px;margin-top:18px;flex-shrink:0;font-size:12px;color:var(--muted)}.product-bar label{white-space:nowrap;flex:none}.product-bar select{width:180px;flex:none}.product-bar a{margin-left:auto;color:var(--accent);text-decoration:none;white-space:nowrap;flex:none}.status-label.disabled{color:var(--warning)}#issue-form>select,#claw-options select{width:100%;margin-bottom:12px}#claw-options label{display:block}.summary{margin-top:18px}
@media(max-width:480px){#issue-dialog{padding:18px;max-height:calc(100dvh - 24px)}#issue-dialog .dialog-header{margin-bottom:12px}#issue-form label{margin-top:10px}#issue-form .dialog-footer{position:sticky;bottom:-18px;background:var(--surface);padding:12px 0;margin-top:14px}.product-bar{gap:8px}.product-bar select{width:145px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.password-action{font-size:12px;padding:7px 10px;height:36px}.plan-options{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--line);border-radius:6px;overflow:hidden}.plan-options label{position:relative;display:flex;align-items:center;justify-content:center;min-height:40px;margin:0;cursor:pointer}.plan-options label+label{border-left:1px solid var(--line)}.plan-options input{position:absolute;opacity:0;width:1px;height:1px;min-height:0;padding:0}.plan-options label:has(input:checked){color:var(--accent);background:var(--surface-hover)}.plan-options label:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:-2px}
