/* 管理后台样式 */
:root{
  --a-bg:#07070a; --a-panel:#0e0e13; --a-panel2:#131319;
  --a-border:rgba(255,255,255,.09); --a-border2:rgba(255,255,255,.16);
  --a-text:#e9e9ef; --a-muted:#9a9aa6; --a-muted2:#6b6b78;
  --a-purple:#5e5ce5; --a-gold:#ffcc48; --a-red:#ff6b6b; --a-green:#3ddc97;
}
*{ box-sizing:border-box; }
/* hidden 属性必须能压过任何 display 设置，否则面板/弹窗会一直显示且关不掉 */
[hidden]{ display:none !important; }
body{ margin:0; background:var(--a-bg); color:var(--a-text);
  font-family:'Inter','PingFang SC','Microsoft YaHei',sans-serif; font-size:14px; line-height:1.6; }
a{ color:inherit; text-decoration:none; }
button,input,select,textarea{ font-family:inherit; }

.login-wrap{ position:fixed; inset:0; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(circle at 50% 0%,rgba(94,92,229,.20),transparent 60%),var(--a-bg); padding:20px; }
.login-box{ width:100%; max-width:400px; background:var(--a-panel); border:1px solid var(--a-border);
  border-radius:16px; padding:36px 32px; box-shadow:0 24px 60px rgba(0,0,0,.5); }
.lb-brand{ display:flex; align-items:center; gap:14px; margin-bottom:28px; }
.lb-brand .mark{ width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,var(--a-purple),var(--a-gold)); color:#000; font-weight:700; font-size:20px; }
.lb-brand h1{ font-size:20px; margin:0; font-weight:600; }
.lb-brand p{ margin:2px 0 0; color:var(--a-muted); font-size:13px; }
.login-box label{ display:block; color:var(--a-muted); font-size:13px; margin:14px 0 6px; }
.login-box input{ width:100%; padding:11px 14px; border-radius:10px; background:#08080c;
  border:1px solid var(--a-border); color:#fff; font-size:14px; outline:none; }
.login-box input:focus{ border-color:var(--a-purple); }
.login-box button{ width:100%; margin-top:22px; }
.login-err{ color:var(--a-red); font-size:13px; min-height:20px; margin-top:10px; text-align:center; }
.lb-foot{ margin-top:18px; text-align:center; font-size:13px; color:var(--a-muted2); }
.lb-foot a:hover{ color:var(--a-gold); }

.cms{ display:flex; min-height:100vh; }
.cms-side{ width:220px; flex:0 0 220px; background:var(--a-panel); border-right:1px solid var(--a-border);
  display:flex; flex-direction:column; position:sticky; top:0; height:100vh; }
.cs-brand{ display:flex; align-items:center; gap:10px; padding:20px 18px; border-bottom:1px solid var(--a-border); }
.cs-brand .mark{ width:34px; height:34px; border-radius:9px; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,var(--a-purple),var(--a-gold)); color:#000; font-weight:700; }
.cs-brand b{ display:block; font-size:14px; }
.cs-brand small{ color:var(--a-muted2); font-size:12px; }
#cmsNav{ padding:12px 10px; flex:1; overflow:auto; }
#cmsNav a{ display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px;
  color:var(--a-muted); font-size:14px; margin-bottom:2px; }
#cmsNav a i{ font-style:normal; width:18px; text-align:center; opacity:.8; }
#cmsNav a:hover{ background:rgba(255,255,255,.05); color:#fff; }
#cmsNav a.on{ background:linear-gradient(135deg,rgba(94,92,229,.28),rgba(255,204,72,.12)); color:#fff; }
.cs-foot{ padding:14px 16px; border-top:1px solid var(--a-border); font-size:13px; color:var(--a-muted2); }
.cs-foot a{ display:block; margin-bottom:8px; }
.cs-foot a:hover{ color:var(--a-gold); }
.cs-foot button{ background:none; border:1px solid var(--a-border); color:var(--a-muted);
  padding:6px 10px; border-radius:8px; cursor:pointer; font-size:12px; }
.cs-foot button:hover{ border-color:var(--a-red); color:var(--a-red); }
.cs-user{ margin-top:10px; font-size:12px; color:var(--a-muted2); }

.cms-main{ flex:1; min-width:0; display:flex; flex-direction:column; }
.cm-top{ height:60px; display:flex; align-items:center; gap:14px; padding:0 24px;
  border-bottom:1px solid var(--a-border); background:rgba(255,255,255,.02); position:sticky; top:0; z-index:5; }
.cm-top h2{ font-size:17px; margin:0; font-weight:600; }
.cm-menu{ display:none; background:none; border:1px solid var(--a-border); color:#fff;
  border-radius:8px; width:34px; height:34px; cursor:pointer; }
.cm-actions{ margin-left:auto; display:flex; gap:8px; }
.cm-body{ padding:24px; flex:1; }

.btn{ padding:8px 16px; border-radius:9px; border:1px solid var(--a-border); background:transparent;
  color:var(--a-text); cursor:pointer; font-size:13px; }
.btn:hover{ border-color:var(--a-border2); }
.btn.primary{ background:linear-gradient(135deg,var(--a-purple),#7b6ef0); border:none; color:#fff; font-weight:600; }
.btn.primary:hover{ filter:brightness(1.12); }
.btn.danger{ border-color:rgba(255,107,107,.4); color:var(--a-red); }
.btn.danger:hover{ background:rgba(255,107,107,.12); }
.btn.sm{ padding:5px 10px; font-size:12px; }

.card{ background:var(--a-panel); border:1px solid var(--a-border); border-radius:14px; padding:20px; margin-bottom:18px; }
.card > h3{ margin:0 0 4px; font-size:15px; font-weight:600; }
.card > .desc{ margin:0 0 16px; color:var(--a-muted2); font-size:13px; }

table.tb{ width:100%; border-collapse:collapse; font-size:13px; }
table.tb th,table.tb td{ padding:11px 12px; border-bottom:1px solid var(--a-border); text-align:left; vertical-align:top; }
table.tb th{ color:var(--a-muted); font-weight:500; white-space:nowrap; }
table.tb tr:hover td{ background:rgba(255,255,255,.025); }
table.tb td.ops{ white-space:nowrap; text-align:right; }
table.tb td.ops .btn{ margin-left:6px; }
td .clamp{ max-width:300px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; color:var(--a-muted); }

.badge{ display:inline-block; padding:2px 8px; border-radius:20px; font-size:12px; border:1px solid var(--a-border); color:var(--a-muted); }
.badge.p0{ color:var(--a-gold); border-color:rgba(255,204,72,.4); background:rgba(255,204,72,.1); }
.badge.p1{ color:var(--a-green); border-color:rgba(61,220,151,.4); }
.badge.p2{ color:var(--a-red); border-color:rgba(255,107,107,.4); }

.fr{ margin-bottom:14px; }
.fr > label{ display:block; color:var(--a-muted); font-size:13px; margin-bottom:6px; }
.fr input,.fr select,.fr textarea{ width:100%; padding:9px 12px; border-radius:9px; background:#08080c;
  border:1px solid var(--a-border); color:#fff; font-size:14px; outline:none; }
.fr input:focus,.fr select:focus,.fr textarea:focus{ border-color:var(--a-purple); }
.fr textarea{ resize:vertical; line-height:1.7; }
.fr-row{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width:700px){ .fr-row{ grid-template-columns:1fr; } }

.rep{ border:1px dashed var(--a-border); border-radius:12px; padding:12px; margin-bottom:14px; }
.rep-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.rep-head b{ font-size:13px; color:var(--a-muted); font-weight:500; }
.rep-item{ background:var(--a-panel2); border:1px solid var(--a-border); border-radius:10px; padding:12px; margin-bottom:10px; }
.rep-item .ri-top{ display:flex; justify-content:flex-end; gap:6px; margin-bottom:6px; }
.rep-item .ri-grid{ display:grid; gap:10px; }
.rep-empty{ color:var(--a-muted2); font-size:13px; text-align:center; padding:8px; }

.modal{ position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center; }
.modal[hidden]{ display:none; }
.modal-mask{ position:absolute; inset:0; background:rgba(0,0,0,.6); backdrop-filter:blur(3px); }
.modal-box{ position:relative; width:100%; max-width:640px; max-height:88vh; display:flex; flex-direction:column;
  background:var(--a-panel); border:1px solid var(--a-border); border-radius:16px; box-shadow:0 30px 80px rgba(0,0,0,.6); }
.modal-head{ display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid var(--a-border); }
.modal-head h3{ margin:0; font-size:16px; font-weight:600; }
.modal-x{ background:none; border:none; color:var(--a-muted); font-size:24px; cursor:pointer; line-height:1; }
.modal-body{ padding:20px; overflow:auto; flex:1; }
.modal-foot{ display:flex; justify-content:flex-end; gap:10px; padding:14px 20px; border-top:1px solid var(--a-border); }

.toast{ position:fixed; left:50%; bottom:40px; transform:translateX(-50%); z-index:200;
  background:var(--a-panel2); border:1px solid var(--a-border); color:#fff; padding:11px 20px;
  border-radius:10px; font-size:14px; box-shadow:0 10px 30px rgba(0,0,0,.5); }
.toast.ok{ border-color:rgba(61,220,151,.5); }
.toast.err{ border-color:rgba(255,107,107,.5); }

.empty{ text-align:center; color:var(--a-muted2); padding:40px 0; font-size:14px; }
.tip{ color:var(--a-muted2); font-size:12px; margin-top:6px; }
.hint{ background:rgba(94,92,229,.10); border:1px solid rgba(94,92,229,.25); border-radius:10px;
  padding:12px 14px; color:var(--a-muted); font-size:13px; margin-bottom:18px; line-height:1.8; }

@media (max-width:900px){
  .cms-side{ position:fixed; left:-230px; z-index:50; transition:left .25s; }
  .cms-side.open{ left:0; }
  .cm-menu{ display:block; }
}
