:root { color-scheme: dark; font-family: Inter, system-ui, sans-serif; background:#10131a; color:#e8ebf2; }
* { box-sizing:border-box; }
body { margin:0; }
header { position:sticky; top:0; z-index:20; height:64px; display:flex; align-items:center; justify-content:space-between; padding:0 28px; border-bottom:1px solid #2b3140; background:#151923; }
h1 { font-size:19px; margin:0; }
#status { color:#8dd7a8; font-size:13px; }
.header-actions { display:flex; align-items:center; gap:16px; }
.logout-button { color:#bfc8d9; background:#252c3a; padding:7px 12px; }
.logout-button:hover { color:white; background:#343f53; }
.admin-shell { display:grid; grid-template-columns:230px minmax(0, 1fr); min-height:calc(100vh - 64px); }
.sidebar { position:sticky; top:64px; align-self:start; height:calc(100vh - 64px); padding:24px 16px; border-right:1px solid #2b3140; background:#11151e; }
.sidebar-label { margin:0 12px 12px; color:#69758a; font-size:11px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
nav { display:flex; flex-direction:column; gap:7px; }
nav a { display:flex; align-items:center; min-height:44px; color:#aeb7c9; text-decoration:none; padding:11px 13px; border:1px solid transparent; border-radius:9px; line-height:1.25; transition:background .15s, color .15s, border-color .15s; }
nav a:hover { color:white; background:#1a2130; border-color:#2d3749; }
nav a.active { color:white; background:#2b5ed7; border-color:#3b70e8; box-shadow:0 8px 22px rgba(31,83,203,.22); }
main { width:100%; max-width:1480px; min-width:0; margin:0 auto; padding:28px 32px 60px; }
.page { display:none; background:#181d28; border:1px solid #2b3140; border-radius:12px; padding:24px; }
.page.active { display:block; }
h2 { margin-top:0; }
label { display:block; margin:16px 0; color:#cbd2df; }
input, select, textarea, button { font:inherit; }
input, select, textarea { color:#edf1fa; background:#0f131b; border:1px solid #394154; border-radius:7px; padding:9px 11px; }
textarea { display:block; width:100%; min-height:420px; margin:12px 0; resize:vertical; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; line-height:1.45; }
button { color:white; background:#2b5ed7; border:0; border-radius:7px; padding:10px 15px; cursor:pointer; }
button:hover { background:#3970ef; }
.button-link { display:inline-block; color:white; background:#2b5ed7; border-radius:7px; padding:10px 15px; text-decoration:none; }
.button-link:hover { background:#3970ef; }
button.secondary { background:#303849; margin-bottom:14px; }
button.secondary:hover { background:#414c62; }
.hint { color:#929db2; max-width:800px; }
.config-toolbar { display:flex; align-items:end; gap:18px; flex-wrap:wrap; }
.config-toolbar label { margin:8px 0; }
.config-toolbar input { width:110px; }
.config-toolbar select { min-width:360px; }
.config-summary { display:flex; flex-wrap:wrap; gap:8px; margin:18px 0 10px; }
.config-summary span { color:#b8c8e9; background:#101622; border:1px solid #34415a; border-radius:999px; padding:6px 10px; font-size:13px; }
.config-editor-label { margin-top:8px; }
#config-section-json { min-height:560px; }
details { margin:18px 0; padding:12px 14px; border:1px solid #30384a; border-radius:8px; background:#141924; }
summary { cursor:pointer; color:#b8c2d5; }
#config-hash { display:block; margin-top:14px; color:#8dd7a8; word-break:break-all; }
.online-config-list { color:#cbd2df; line-height:1.8; margin-bottom:22px; }
.ad-config-header { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:38px 0 18px; padding-bottom:15px; border-bottom:1px solid #30384a; }
.ad-config-header > div { display:flex; align-items:center; gap:10px; }
.ad-config-header h2 { margin:0; }
.ad-config-header p { margin:0; color:#7f8ba1; font-size:13px; }
.ad-config-icon { display:grid; place-items:center; width:30px; height:30px; color:#ff6177; border:2px solid #ff6177; border-radius:50%; font-weight:800; }
.ad-config-grid { display:grid; gap:10px; margin:18px 0; }
.ad-config-row { display:grid; grid-template-columns:minmax(190px,.72fr) minmax(220px,1.45fr) minmax(320px,1.4fr); align-items:center; gap:18px; margin:0; padding:12px 14px; border:1px solid #30384a; border-radius:10px; background:#141924; }
.ad-config-row input[type="number"] { width:100%; min-height:46px; padding:10px 14px; font-size:16px; }
.ad-config-key { color:#c9d1df; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:14px; font-weight:700; overflow-wrap:anywhere; }
.ad-config-description { display:flex; align-items:center; min-height:46px; padding:10px 14px; color:#aeb8ca; background:#0f141e; border:1px solid #343d50; border-radius:8px; font-size:14px; font-style:italic; line-height:1.35; }
.ad-config-checkbox { display:flex; align-items:center; gap:10px; min-height:46px; padding:0 14px; color:#dbe2ef; background:#0f131b; border:1px solid #394154; border-radius:7px; }
.ad-config-checkbox input { width:18px; height:18px; margin:0; accent-color:#3970ef; }
.ad-config-footnote { max-width:none; }
.toolbar { display:flex; gap:8px; margin-bottom:16px; }
.toolbar input { min-width:320px; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; font-size:13px; }
th, td { text-align:left; padding:10px 8px; border-bottom:1px solid #2b3140; white-space:nowrap; }
th { color:#9ba6ba; }
td select { padding:6px; }
.users-data-note { max-width:none; margin-bottom:18px; }
.user-columns-panel { margin:0 0 18px; padding:16px; border:1px solid #30384a; border-radius:10px; background:#141924; }
.user-columns-title { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:13px; }
.user-columns-title h3 { margin:0; font-size:15px; }
.user-column-picker { display:grid; grid-template-columns:repeat(4, minmax(160px, 1fr)); gap:9px; }
.user-column-option { display:flex; align-items:center; gap:8px; min-height:40px; margin:0; padding:8px 10px; border:1px solid #30384a; border-radius:8px; background:#10151f; cursor:pointer; }
.user-column-option:hover { border-color:#46536b; }
.user-column-option input { width:17px; height:17px; margin:0; padding:0; accent-color:#3970ef; }
.user-column-option span { font-size:12px; color:#c6cfdf; }
.users-table-wrap { max-height:620px; border:1px solid #2b3140; border-radius:9px; }
#users-table { min-width:max-content; }
#users-table thead { position:sticky; top:0; z-index:2; background:#181d28; }
#users-table tbody tr { cursor:pointer; }
#users-table tbody tr:hover { background:#1d2431; }
#users-table td { min-height:48px; }
.table-sort { width:100%; color:#9ba6ba; background:transparent; padding:2px 0; text-align:left; font-size:12px; font-weight:700; }
.table-sort:hover { color:white; background:transparent; }
.compact-button { padding:7px 10px; font-size:12px; white-space:nowrap; }
button.secondary.compact-button { margin:0; }
.user-balance-input { width:92px; padding:6px 8px; }
.user-pack-select { max-width:170px; padding:6px 8px; }
.user-access-input { width:18px; height:18px; padding:0; accent-color:#3970ef; }
.empty-table { padding:30px!important; color:#7f8ba1; text-align:center; }
pre { max-height:360px; overflow:auto; background:#0f131b; padding:14px; border-radius:8px; white-space:pre-wrap; }
.cards { display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; }
.cards article { background:#0f131b; border:1px solid #2b3140; padding:18px; border-radius:9px; }
.cards b { display:block; font-size:28px; }
.cards span { color:#929db2; }
.bar-row { display:grid; grid-template-columns:100px 1fr 70px; align-items:center; gap:10px; margin:9px 0; }
.bar { height:10px; background:#2b5ed7; border-radius:9px; min-width:2px; }
#toast { position:fixed; right:22px; bottom:22px; padding:12px 16px; border-radius:8px; background:#2c8d56; transform:translateY(100px); transition:.2s; }
#toast.show { transform:translateY(0); }

.login-body { min-height:100vh; overflow:auto; background:
  radial-gradient(circle at 18% 18%, rgba(49,105,238,.28), transparent 34%),
  radial-gradient(circle at 82% 76%, rgba(29,186,152,.18), transparent 32%),
  linear-gradient(145deg, #0b0f18, #121928 58%, #0d121c); }
.login-body::before { content:""; position:fixed; inset:0; pointer-events:none; opacity:.35; background-image:
  linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size:44px 44px; }
.login-shell { min-height:100vh; display:grid; place-items:center; padding:28px; position:relative; }
.login-card { width:min(100%, 440px); padding:42px; border:1px solid rgba(122,151,207,.24); border-radius:24px;
  background:rgba(20,27,40,.88); box-shadow:0 28px 90px rgba(0,0,0,.45); backdrop-filter:blur(18px); }
.login-mark { width:58px; height:58px; display:grid; grid-template-columns:1fr 1fr; gap:5px; padding:10px; margin-bottom:24px;
  border-radius:17px; background:linear-gradient(145deg,#3974f2,#1e4fc4); box-shadow:0 12px 30px rgba(42,101,225,.35); }
.login-mark span { display:block; border-radius:4px; background:#fff; opacity:.95; }
.login-mark span:nth-child(2), .login-mark span:nth-child(3) { opacity:.62; }
.login-eyebrow { margin:0 0 8px; color:#71a0ff; font-size:12px; font-weight:800; letter-spacing:.16em; }
.login-card h1 { font-size:30px; line-height:1.18; margin:0 0 10px; }
.login-subtitle { margin:0 0 30px; color:#929db2; line-height:1.55; }
.login-card label { margin:18px 0 8px; font-size:13px; font-weight:650; color:#cbd3e2; }
.login-card input { display:block; width:100%; height:50px; margin-top:8px; padding:0 14px; border-color:#3a4559; border-radius:11px; background:#0e141f; }
.login-card input:focus { outline:none; border-color:#4b83f4; box-shadow:0 0 0 3px rgba(58,120,242,.17); }
.password-field { display:block; position:relative; }
.password-field input { padding-right:92px; }
.password-toggle { position:absolute; right:7px; top:15px; height:36px; color:#8ea7d4; background:transparent; padding:0 8px; font-size:12px; }
.password-toggle:hover { color:white; background:#202b3e; }
.login-error { min-height:20px; margin:12px 0 4px; color:#ff8d99; font-size:13px; }
.login-submit { width:100%; height:50px; border-radius:11px; margin-top:8px; font-weight:750; background:linear-gradient(135deg,#346ef0,#2456cd); box-shadow:0 12px 26px rgba(37,91,211,.25); }
.login-submit:disabled { opacity:.65; cursor:wait; }
.login-security { margin:24px 0 0; color:#6f7b90; font-size:12px; text-align:center; }
@media(max-width:1000px){ .admin-shell{grid-template-columns:200px minmax(0,1fr)}.user-column-picker{grid-template-columns:repeat(3,minmax(150px,1fr))} }
@media(max-width:900px){ .admin-shell{grid-template-columns:180px minmax(0,1fr)}.sidebar{padding:20px 12px}.ad-config-row{grid-template-columns:minmax(170px,.7fr) 1fr}.ad-config-description{grid-column:1/-1} }
@media(max-width:700px){ header{padding:0 14px}h1{font-size:15px}.header-actions{gap:9px}#status{font-size:11px}.admin-shell{grid-template-columns:150px minmax(0,1fr)}.sidebar{padding:16px 8px}.sidebar-label{margin-left:10px}.sidebar nav a{min-height:42px;padding:9px 10px;font-size:12px;overflow-wrap:anywhere}.cards{grid-template-columns:1fr}main{padding:16px 10px 42px}.page{padding:16px}.toolbar input{min-width:0}.config-toolbar select{min-width:0;width:100%}.ad-config-header{align-items:flex-start}.ad-config-row{grid-template-columns:1fr}.ad-config-description{grid-column:auto}.ad-config-header p{display:none}.user-column-picker{grid-template-columns:repeat(2,minmax(135px,1fr))} }
@media(max-width:520px){ .admin-shell{grid-template-columns:132px minmax(0,1fr)}.sidebar{padding-left:6px;padding-right:6px}.sidebar nav a{padding:9px 8px}.logout-button{padding:7px 9px}.login-shell{padding:16px}.login-card{padding:28px 22px;border-radius:19px}.login-card h1{font-size:25px} }
