[hidden]{display:none!important}
:root{--bg:#f4f6f1;--ink:#10271f;--muted:#718078;--line:#dfe7df;--lime:#baff3c;--danger:#d94b3f}*{box-sizing:border-box}body{margin:0;font:14px system-ui,"Microsoft YaHei",sans-serif;background:var(--bg);color:var(--ink)}button,input,select,textarea{font:inherit}.login{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 20% 10%,#dfffab,transparent 35%),var(--bg)}.card{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 10px 30px #173c2110}.login-card{width:min(420px,92vw);padding:34px;display:grid;gap:14px}.login-card h1{margin:18px 0 0;font-size:32px}.login-card p{margin:0 0 12px;color:var(--muted)}input,select,textarea{width:100%;border:1px solid #ced8d0;border-radius:10px;padding:11px;background:#fff;outline:none}input:focus,select:focus,textarea:focus{border-color:#7faf2d;box-shadow:0 0 0 3px #baff3c40}button{border:0;border-radius:10px;padding:11px 17px;background:var(--ink);color:#fff;font-weight:700;cursor:pointer}button:hover{transform:translateY(-1px)}.ghost{background:#edf1ec;color:var(--ink)}.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:18px}.brand b{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:var(--ink);color:var(--lime)}#app{display:grid;grid-template-columns:230px 1fr;min-height:100vh}aside{padding:24px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:30px}nav{display:grid;gap:8px}nav a{padding:12px;border-radius:10px;color:var(--muted);cursor:pointer}nav a.active{background:#eaf6d7;color:var(--ink);font-weight:700}aside .ghost{margin-top:auto}main{padding:28px;min-width:0}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}header h1{font-size:30px;margin:0}header p{color:var(--muted);margin:6px 0 0}#createBtn{background:var(--lime);color:var(--ink)}.stats{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:16px}.stat{padding:18px;border-radius:16px;background:#fff;border:1px solid var(--line)}.stat b{font-size:27px;display:block}.stat span{color:var(--muted)}.toolbar{display:grid;grid-template-columns:1fr 160px 160px auto;gap:10px;padding:14px;margin-bottom:16px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:1000px}th,td{text-align:left;padding:14px;border-bottom:1px solid #edf0ed;vertical-align:top}th{font-size:12px;color:var(--muted);background:#fafbf9}.key{font-family:ui-monospace,Consolas,monospace;font-weight:700}.sub{font-size:12px;color:var(--muted);margin-top:4px}.badge{display:inline-block;padding:5px 9px;border-radius:99px;font-size:12px;font-weight:700}.unused{background:#edf0ed}.active{background:#dcf9ae}.disabled{background:#ffe0dc;color:#8c251d}.expired{background:#eee5ff;color:#62419a}.row-actions{display:flex;gap:6px;flex-wrap:wrap}.row-actions button{padding:6px 9px;font-size:12px}.empty{text-align:center;padding:50px;color:var(--muted)}dialog{border:0;border-radius:18px;padding:0;box-shadow:0 25px 80px #0004;width:min(500px,92vw)}dialog::backdrop{background:#0f251db0;backdrop-filter:blur(3px)}dialog form,dialog>div{padding:25px;display:grid;gap:14px}dialog h2{margin:0}label{display:grid;gap:6px;color:var(--muted)}textarea{min-height:85px;resize:vertical}.actions{display:flex;justify-content:flex-end;gap:9px}.error{color:var(--danger);min-height:20px}#resultKeys{min-height:170px;font-family:ui-monospace,Consolas,monospace}.logs-panel{max-height:75vh}.logs-panel #logs{overflow:auto;display:grid;gap:8px}.log{padding:10px;background:#f5f7f4;border-radius:9px}.log b{font-family:monospace}.log small{display:block;color:var(--muted)}#toast{position:fixed;right:22px;bottom:22px;background:var(--ink);color:#fff;padding:12px 18px;border-radius:10px;opacity:0;transform:translateY(12px);transition:.2s;pointer-events:none}#toast.show{opacity:1;transform:none}@media(max-width:900px){#app{grid-template-columns:1fr}aside{display:none}main{padding:16px}.stats{grid-template-columns:repeat(2,1fr)}.toolbar{grid-template-columns:1fr 1fr}.toolbar input{grid-column:1/-1}header{align-items:flex-start;gap:10px}.stats .stat:first-child{grid-column:1/-1}}
.announcement-dialog{width:min(980px,96vw);max-height:92vh}.announcement-dialog>form{border-bottom:1px solid var(--line)}.check-label{display:flex;align-items:center;gap:9px}.check-label input{width:auto}.ann-image-box{padding:12px;border:1px dashed #b9c7bb;border-radius:12px;background:#f8faf6}.ann-image-box img{display:block;max-width:100%;max-height:260px;margin:0 auto 10px;border-radius:10px;object-fit:contain}.announcement-history{padding:24px}.history-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}.history-title h2,.history-title p{margin:0}.history-title p{margin-top:5px;color:var(--muted)}.ann-history-list{display:grid;gap:10px}.ann-history-item{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fafcf8}.ann-history-item>img{width:90px;height:70px;object-fit:cover;border-radius:9px}.ann-history-main{min-width:0}.ann-history-head{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.ann-history-main p{margin:7px 0;color:#53635a;white-space:pre-wrap;max-height:48px;overflow:hidden}.ann-history-main small{color:var(--muted)}.current-tag,.enabled-tag,.disabled-tag{padding:3px 7px;border-radius:99px;font-size:11px}.current-tag{background:#173029;color:#c8ff57}.enabled-tag{background:#dcf9ae}.disabled-tag{background:#edf0ed;color:#68736d}.ann-history-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.ann-history-actions button{padding:7px 10px;font-size:12px}.danger-btn{background:#ffe0dc;color:#8c251d}.empty-history{text-align:center;padding:30px;color:var(--muted)}@media(max-width:700px){.ann-history-item{grid-template-columns:1fr}.ann-history-item>img{width:100%;height:150px}.ann-history-actions{justify-content:flex-start}}
.referrals-dialog{width:min(1100px,96vw);max-height:88vh}.referrals-panel{padding:24px}.referrals-panel table{min-width:900px}.device-short{font-family:ui-monospace,Consolas,monospace}.referrals-panel>.actions{margin-top:14px}
.renew-btn,.renew-quick button{background:#baff3c;color:#10271f}.renew-license{display:grid;gap:5px;padding:13px;border-radius:12px;background:#f2f8e8}.renew-license b{font-family:ui-monospace,Consolas,monospace}.renew-license span,.renew-tip{color:var(--muted)}.renew-tip{margin:0;line-height:1.7}.renew-quick{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.renew-quick button{padding:9px 6px}button:disabled{opacity:.55;cursor:not-allowed;transform:none}
