:root { color-scheme: dark; --bg:#151617; --surface:#1d1f21; --surface-2:#25272a; --line:#383b3f; --line-soft:#2c2f32; --text:#eceeef; --muted:#9ca1a6; --accent:#747a82; --accent-hover:#898f97; --good:#72b58a; --warn:#d0a65a; --bad:#d16f73; }
* { box-sizing:border-box; }
html, body { min-height:100%; margin:0; background:var(--bg); color:var(--text); font-family:"Microsoft YaHei UI","Segoe UI",sans-serif; font-size:14px; }
button, input, textarea, select { font:inherit; }
button { height:36px; padding:0 14px; border:1px solid var(--line); border-radius:6px; color:var(--text); background:var(--surface-2); cursor:pointer; }
button:hover { background:#303337; }
button:disabled { opacity:.45; cursor:not-allowed; }
button.primary { border-color:#858b92; background:var(--accent); color:#fff; }
button.primary:hover { background:var(--accent-hover); }
button.danger { border-color:#704347; color:#ef9ca0; background:#352527; }
input, textarea, select { border:1px solid var(--line); border-radius:6px; outline:none; color:var(--text); background:#202225; }
input { height:39px; padding:0 11px; }
select { height:39px; padding:0 32px 0 11px; }
input:focus, textarea:focus, select:focus { border-color:#7e848b; box-shadow:0 0 0 2px #7e848b22; }
.hidden { display:none !important; }
.login-view { min-height:100vh; display:grid; place-items:center; padding:24px; }
.login-panel { width:min(390px,100%); display:grid; gap:15px; padding:28px; border:1px solid var(--line); border-radius:8px; background:var(--surface); box-shadow:0 18px 50px #0005; }
.brand-mark { width:52px; height:52px; display:grid; place-items:center; margin:auto; border:1px solid #747980; border-radius:8px; color:#f5f5f5; background:#44484d; font-weight:800; }
.login-panel h1 { margin:0; text-align:center; font-size:21px; }
.login-panel p { margin:-8px 0 4px; color:var(--muted); text-align:center; font-size:12px; }
.login-panel label { display:grid; gap:7px; color:#c9cccf; font-weight:600; }
.form-error { min-height:18px; color:#e58a8e; text-align:center; font-size:12px; }
.admin-view { min-height:100vh; }
.topbar { height:58px; display:flex; align-items:center; justify-content:space-between; padding:0 28px; border-bottom:1px solid var(--line); background:#191b1d; }
.topbar strong { font-size:18px; }
.topbar span { margin-left:10px; color:var(--muted); }
.topbar-actions { display:flex; align-items:center; gap:8px; }
.topbar-actions #admin-name { margin-right:8px; color:#c7cacf; }
.tabs { height:49px; display:flex; gap:4px; padding:7px 28px 0; border-bottom:1px solid var(--line); background:#191b1d; }
.tabs button { height:42px; border:0; border-bottom:2px solid transparent; border-radius:0; color:var(--muted); background:transparent; }
.tabs button.active { border-bottom-color:#aeb2b7; color:var(--text); }
.tabs button span:not(:empty) { display:inline-grid; min-width:19px; height:19px; place-items:center; margin-left:5px; padding:0 5px; border-radius:9px; color:#fff; background:#704347; font-size:11px; }
.summary { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); border-bottom:1px solid var(--line); background:var(--surface); }
.summary div { min-height:88px; display:flex; flex-direction:column; justify-content:center; padding:0 28px; border-right:1px solid var(--line-soft); }
.summary div:last-child { border-right:0; }
.summary span { color:var(--muted); font-size:12px; }
.summary strong { margin-top:7px; font-size:25px; font-weight:700; }
.workspace { padding:24px 28px 40px; }
.section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin-bottom:18px; }
.section-head h2 { margin:0; font-size:19px; }
.section-head p { margin:6px 0 0; color:var(--muted); font-size:12px; }
.search { display:flex; gap:7px; }
.search input { width:250px; }
.inline-form { display:flex; align-items:flex-end; gap:8px; }
.inline-form label { display:grid; gap:5px; color:var(--muted); font-size:12px; }
.inline-form input { width:95px; }
.filter-label { display:grid; gap:5px; color:var(--muted); font-size:12px; }
.table-scroll { overflow:auto; border:1px solid var(--line); border-radius:7px; }
table { width:100%; border-collapse:collapse; min-width:880px; }
th { height:39px; padding:0 13px; color:#bfc3c7; background:#26282b; text-align:left; font-size:12px; font-weight:650; }
td { height:51px; padding:6px 13px; border-top:1px solid var(--line-soft); background:#1c1e20; white-space:nowrap; }
tbody tr:hover td { background:#222427; }
.row-actions { display:flex; gap:6px; }
.row-actions button { height:30px; padding:0 9px; font-size:12px; }
.status { display:inline-flex; align-items:center; gap:6px; }
.status::before { content:""; width:7px; height:7px; border-radius:50%; background:var(--muted); }
.status.active::before { background:var(--good); }
.status.expired::before { background:var(--warn); }
.status.disabled::before { background:var(--bad); }
.status.pending::before { background:var(--warn); }
.reason-cell { min-width:220px; max-width:360px; white-space:normal; line-height:1.5; }
.muted { color:var(--muted); }
.empty-row { height:110px; color:var(--muted); text-align:center; }
dialog { width:min(440px,calc(100% - 30px)); padding:0; border:1px solid var(--line); border-radius:8px; color:var(--text); background:var(--surface); }
dialog::backdrop { background:#08090acc; }
.dialog-panel { display:grid; gap:16px; padding:20px; }
.dialog-head { display:flex; align-items:center; justify-content:space-between; }
.dialog-head h3 { margin:0; font-size:17px; }
.dialog-head button { width:32px; padding:0; font-size:21px; }
.dialog-panel p { margin:0; color:var(--muted); line-height:1.6; }
.dialog-panel label { display:grid; gap:7px; }
.dialog-actions { display:flex; justify-content:flex-end; gap:8px; }
.generated-panel textarea { width:100%; height:230px; padding:11px; resize:none; font-family:Consolas,monospace; line-height:1.7; }
.toast { position:fixed; left:50%; bottom:25px; z-index:20; max-width:min(520px,calc(100% - 30px)); transform:translate(-50%,12px); padding:10px 15px; border:1px solid var(--line); border-radius:6px; opacity:0; pointer-events:none; color:var(--text); background:#2b2e31; box-shadow:0 12px 30px #0007; transition:.18s; }
.toast.show { transform:translate(-50%,0); opacity:1; }
.toast.error { border-color:#77464a; color:#f0a0a4; background:#352527; }
@media (max-width:760px) { .topbar { padding:0 14px; } .topbar-actions #admin-name { display:none; } .tabs { padding-left:14px; overflow:auto; } .tabs button { white-space:nowrap; } .summary { grid-template-columns:repeat(2,1fr); } .summary div:nth-child(2) { border-right:0; } .summary div { padding:0 16px; border-bottom:1px solid var(--line-soft); } .workspace { padding:20px 14px; } .section-head { align-items:stretch; flex-direction:column; } .search input { min-width:0; width:100%; } .search { width:100%; } .search input { flex:1; } .inline-form { align-items:flex-end; flex-wrap:wrap; } }
