:root{color-scheme:light;--bg:#f3f5f8;--panel:#fff;--ink:#182230;--muted:#667085;--line:#dfe4ec;--line-strong:#cfd6df;--primary:#2563eb;--danger:#b42318;--success:#067647}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif;letter-spacing:0}
button,input,select,textarea{font:inherit;letter-spacing:0}
.auth-shell{width:min(430px,calc(100% - 28px));min-height:100vh;margin:auto;display:grid;align-content:center;padding:24px 0}
.auth-panel{overflow:hidden;border:1px solid var(--line);border-radius:8px;background:var(--panel);box-shadow:0 16px 40px rgba(16,24,40,.08)}
.auth-head{padding:24px 24px 18px;border-bottom:1px solid #edf0f3}
.auth-head h1{margin:0;font-size:24px;line-height:1.25}.auth-head p{margin:7px 0 0;color:var(--muted);font-size:14px;line-height:1.55}
.auth-form{display:grid;gap:16px;padding:22px 24px 24px}
.field{display:grid;gap:7px}.field>span{color:#344054;font-size:13px;font-weight:650}.field input,.field select,.field textarea{width:100%;border:1px solid var(--line-strong);border-radius:7px;background:#fff;color:var(--ink);outline:none}.field input,.field select{height:42px;padding:0 11px}.field textarea{min-height:88px;padding:10px 11px;line-height:1.5;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:#7cb0f3;box-shadow:0 0 0 3px #dbeafe}
.password-wrap{position:relative}.password-wrap input{padding-right:64px}.password-toggle{position:absolute;top:5px;right:5px;height:32px;padding:0 9px;border:0;border-radius:5px;background:#f2f4f7;color:#475467;font-size:12px;cursor:pointer}
.primary,.secondary,.danger{min-height:40px;padding:8px 13px;border-radius:7px;font-weight:680;cursor:pointer}.primary{border:1px solid var(--primary);background:var(--primary);color:#fff}.secondary{border:1px solid var(--line-strong);background:#fff;color:#344054}.danger{border:1px solid #fda29b;background:#fff;color:var(--danger)}button:disabled{cursor:wait;opacity:.58}
.status{min-height:18px;color:var(--muted);font-size:13px;line-height:1.4}.status.error{color:var(--danger)}.status.success{color:var(--success)}
.page-shell{width:min(1120px,calc(100% - 28px));margin:24px auto 48px}.page-head{display:flex;align-items:center;gap:12px;margin-bottom:14px;padding:18px 20px;border:1px solid var(--line);border-radius:8px;background:#fff}.page-title{min-width:0;margin-right:auto}.page-title h1{margin:0;font-size:22px}.page-title p{margin:5px 0 0;color:var(--muted);font-size:13px}.back-link{flex:none;padding:8px 10px;border:1px solid var(--line-strong);border-radius:7px;background:#fff;color:#344054;font-size:13px;font-weight:650;text-decoration:none}
.settings{max-width:560px;border:1px solid var(--line);border-radius:8px;background:#fff}.settings-head{padding:18px 20px;border-bottom:1px solid #edf0f3}.settings-head strong{font-size:16px}.settings-head span{display:block;margin-top:5px;color:var(--muted);font-size:13px}.settings .auth-form{padding:18px 20px 20px}
.admin-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:12px}.summary{margin-right:auto;color:var(--muted);font-size:13px}
.user-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:8px;background:#fff}.user-table{width:100%;min-width:980px;border-collapse:collapse}.user-table th,.user-table td{padding:11px 12px;border-bottom:1px solid #edf0f3;text-align:left;font-size:13px;white-space:nowrap}.user-table th{background:#f8fafc;color:#667085;font-weight:650}.user-table tr:last-child td{border-bottom:0}.username{font-weight:700;color:#1d2939}.role,.state{display:inline-flex;align-items:center;min-height:24px;padding:3px 7px;border-radius:6px;background:#f2f4f7;color:#475467;font-size:12px;font-weight:650}.role.admin{background:#eef4ff;color:#2457a6}.state.active{background:#ecfdf3;color:#067647}.state.inactive{background:#fef3f2;color:#b42318}.admin-note{display:block;max-width:240px;overflow:hidden;color:#475467;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}.row-actions{display:flex;gap:6px}.icon-action{min-height:30px;padding:5px 9px;border:1px solid var(--line-strong);border-radius:6px;background:#fff;color:#344054;font-size:12px;cursor:pointer}
dialog{width:min(480px,calc(100% - 24px));padding:0;border:0;border-radius:8px;background:#fff;color:var(--ink);box-shadow:0 24px 70px rgba(15,23,42,.3)}dialog::backdrop{background:rgba(15,23,42,.42)}.dialog-head{display:flex;align-items:center;gap:10px;padding:16px 18px;border-bottom:1px solid #edf0f3}.dialog-head strong{margin-right:auto;font-size:17px}.dialog-close{display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid var(--line-strong);border-radius:6px;background:#fff;color:#475467;font-size:22px;cursor:pointer}.dialog-form{display:grid;gap:14px;padding:17px 18px 18px}.inline-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.check-field{display:flex;align-items:center;gap:8px;color:#344054;font-size:13px}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:3px}
.empty{padding:40px 20px;color:var(--muted);text-align:center}.loading{opacity:.65}
@media(max-width:600px){.auth-head{padding:21px 19px 16px}.auth-form{padding:19px}.page-shell{width:calc(100% - 16px);margin-top:8px}.page-head{padding:14px}.page-title h1{font-size:19px}.settings{max-width:none}.settings-head{padding:15px}.settings .auth-form{padding:15px}.admin-toolbar{padding:0 4px}.inline-fields{grid-template-columns:1fr}.user-table th,.user-table td{padding:10px}.auth-shell{width:calc(100% - 20px)}}
