/* ===== VXVX — admin ===== */
body.admin-body { padding:0; }
.admin { width:min(1280px,100%); margin:0 auto; padding:22px; }
.admin-bar { display:flex; align-items:center; gap:14px; margin-bottom:22px; flex-wrap:wrap; }
.admin-bar h1 { font-size:22px; font-weight:700; margin:0; letter-spacing:-.02em; display:flex; align-items:center; gap:10px; }
.admin-bar h1 .x { color:var(--accent); }
.admin-bar .dot-sub { font-size:13px; color:var(--text-dim); margin-top:3px; }
.admin-bar .sp { flex:1; }
.abtn { display:inline-flex; align-items:center; gap:8px; padding:9px 15px; border-radius:10px; font-size:13.5px;
  font-weight:600; border:1px solid var(--border); background:var(--surface-2); color:var(--text-dim); transition:.14s; }
.abtn:hover { color:var(--text); border-color:var(--border-2); background:var(--surface-3); }
.abtn.primary { background:var(--accent); color:#fff; border-color:transparent; }
.abtn.primary:hover { filter:brightness(1.08); color:#fff; }
.abtn.danger { color:oklch(0.66 0.21 8); }
.abtn.danger:hover { background:var(--accent-soft); border-color:var(--accent-line); }

.admin-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:22px; }
.astat { background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:16px 18px; }
.astat-k { font-size:12px; color:var(--text-faint); display:flex; align-items:center; gap:8px; margin-bottom:9px; font-weight:500; }
.astat-v { font-family:var(--ff-mono); font-size:26px; font-weight:600; letter-spacing:-.02em; }
.astat-v.accent { color:var(--accent); }

.admin-grid { display:grid; grid-template-columns:420px minmax(0,1fr); gap:22px; align-items:start; }
.panel { background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:20px; }
.panel.sticky { position:sticky; top:22px; }
.panel-h { font-size:15px; font-weight:700; margin:0 0 16px; display:flex; align-items:center; gap:9px; }
.panel-h .x { color:var(--accent); }

.field { margin-bottom:14px; }
.field label { display:block; font-size:12.5px; font-weight:600; color:var(--text-dim); margin-bottom:7px; }
.field label .req { color:var(--accent); }
.input, .textarea { width:100%; background:var(--bg-2); border:1px solid var(--border); border-radius:10px; color:var(--text);
  padding:11px 13px; font-size:14px; font-family:inherit; transition:.14s; }
.input::placeholder, .textarea::placeholder { color:var(--text-faint); }
.input:focus, .textarea:focus { outline:none; border-color:var(--accent-line); background:var(--surface); }
.textarea { resize:vertical; min-height:120px; line-height:1.6; }
.row2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }

.toggles { display:flex; gap:10px; margin:4px 0 16px; }
.toggle { flex:1; display:flex; align-items:center; justify-content:space-between; gap:8px; background:var(--bg-2);
  border:1px solid var(--border); border-radius:10px; padding:10px 13px; font-size:13px; font-weight:600; color:var(--text-dim); cursor:pointer; }
.switch { width:38px; height:22px; border-radius:100px; background:var(--surface-3); position:relative; transition:.18s; flex-shrink:0; }
.switch i { position:absolute; top:3px; right:3px; width:16px; height:16px; border-radius:50%; background:var(--text-faint); transition:.18s; }
.toggle.on { color:var(--text); }
.toggle.on .switch { background:var(--accent); }
.toggle.on .switch i { right:19px; background:#fff; }

.form-actions { display:flex; gap:10px; margin-top:6px; }
.form-actions .abtn { flex:1; justify-content:center; padding:12px; }

.preview-wrap { margin-top:20px; }
.preview-label { font-size:11px; font-weight:600; letter-spacing:.07em; text-transform:uppercase; color:var(--text-faint);
  margin-bottom:10px; display:flex; align-items:center; gap:8px; }
.preview-label::after { content:""; flex:1; height:1px; background:var(--border); }

.list-tools { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.list-tools .search { max-width:none; flex:1; }
.list-count { font-family:var(--ff-mono); font-size:12px; color:var(--text-faint); white-space:nowrap; }
.plist { display:flex; flex-direction:column; gap:8px; max-height:760px; overflow-y:auto; padding-inline-end:4px; }
.prow { display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:12px; background:var(--bg-2);
  border:1px solid var(--border); transition:border-color .14s, background .14s; }
.prow:hover { border-color:var(--border-2); background:var(--surface-2); }
.prow.dragging { opacity:.4; }
.prow.drag-over { border-color:var(--accent-line); }
.handle { color:var(--text-faint); cursor:grab; display:grid; place-items:center; }
.handle:active { cursor:grabbing; }
.prow-thumb { width:46px; height:46px; border-radius:9px; flex-shrink:0; display:grid; place-items:center; color:#fff; overflow:hidden; }
.prow-thumb img { width:100%; height:100%; object-fit:cover; }
.prow-main { flex:1; min-width:0; }
.prow-title { font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:flex; align-items:center; gap:7px; }
.prow-sub { font-family:var(--ff-mono); font-size:11px; color:var(--text-faint); margin-top:4px; display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.prow-sub .sd { display:inline-flex; align-items:center; gap:4px; }
.mini-badge { font-size:10px; font-family:var(--ff-mono); padding:2px 6px; border-radius:5px; color:var(--gold); background:var(--gold-soft); }
.prow-acts { display:flex; gap:4px; }
.iconbtn-sm { width:32px; height:32px; border-radius:8px; border:1px solid transparent; background:transparent; color:var(--text-faint);
  display:grid; place-items:center; transition:.14s; }
.iconbtn-sm:hover { background:var(--surface-3); color:var(--text); }
.iconbtn-sm.del:hover { color:var(--accent); background:var(--accent-soft); }

/* login */
.login-wrap { min-height:100vh; display:grid; place-items:center;
  background:radial-gradient(120% 80% at 50% -10%, oklch(0.66 0.21 8 / .14), transparent 60%), var(--bg); }
.login-card { width:min(380px,90vw); background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:34px 30px; }
.login-card .brand { font-size:34px; font-weight:700; letter-spacing:-.04em; text-align:center; margin-bottom:6px; }
.login-card .brand .x { color:var(--accent); }
.login-card h3 { text-align:center; font-size:16px; font-weight:600; color:var(--text-dim); margin:0 0 24px; }
.login-card input { margin-bottom:14px; }
.login-card .abtn { width:100%; justify-content:center; padding:13px; font-size:15px; }
.login-err { color:var(--accent); font-size:13px; text-align:center; margin-bottom:14px; }

.toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px); background:var(--surface-3);
  border:1px solid var(--border-2); color:var(--text); padding:12px 20px; border-radius:12px; font-size:13.5px; font-weight:600;
  z-index:200; display:flex; align-items:center; gap:10px; box-shadow:var(--shadow-lg); opacity:0; pointer-events:none; transition:.3s; }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
.toast .ck { width:22px; height:22px; border-radius:50%; background:var(--green); display:grid; place-items:center; color:#fff; }

@media (max-width:980px) { .admin-grid { grid-template-columns:1fr; } .panel.sticky { position:static; } .admin-stats { grid-template-columns:repeat(2,1fr); } }
