/* ===== 后台管理样式 ===== */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;background:#f3f4f9;color:#1f2333;line-height:1.6}
a{text-decoration:none;color:inherit}

/* 登录页 */
.login-wrap{display:grid;place-items:center;min-height:100vh;background:linear-gradient(135deg,#6366f1,#8b5cf6);padding:20px}
.login-card{background:#fff;border-radius:18px;padding:38px 34px;width:100%;max-width:380px;box-shadow:0 20px 50px rgba(0,0,0,.2)}
.login-card h1{margin:0 0 4px;font-size:22px}
.login-card .sub{color:#6b7185;font-size:14px;margin:0 0 24px}
.login-card .err{background:#fef2f2;color:#dc2626;padding:10px 12px;border-radius:9px;font-size:13px;margin-bottom:16px}

/* 后台框架 */
.admin{display:flex;min-height:100vh}
.sidebar{width:230px;flex:0 0 auto;background:#11131f;color:#cfd2e3;padding:22px 16px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}
.sidebar .brand{display:flex;align-items:center;gap:10px;font-weight:800;color:#fff;font-size:17px;padding:4px 8px 18px}
.sidebar .brand .logo{width:32px;height:32px;border-radius:8px;background:linear-gradient(135deg,#6366f1,#8b5cf6);display:grid;place-items:center;color:#fff;font-weight:800}
.sidebar a.menu{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:10px;color:#aeb2c8;font-size:14px;margin-bottom:4px;transition:.15s}
.sidebar a.menu:hover{background:rgba(255,255,255,.06);color:#fff}
.sidebar a.menu.active{background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff}
.sidebar .spacer{flex:1}
.sidebar .me{font-size:13px;color:#8b90a8;padding:10px 12px 6px}
.sidebar .ver{font-size:12px;color:#6b6f88;padding:8px 12px 4px;text-align:center;border-top:1px solid rgba(255,255,255,.06);margin-top:6px}
.content{flex:1;padding:30px 34px;min-width:0}
.content h2{margin:0 0 4px;font-size:22px}
.content .page-sub{color:#6b7185;font-size:14px;margin:0 0 22px}

/* 卡片 */
.panel{background:#fff;border:1px solid #e7e9f3;border-radius:14px;padding:22px}
.panel + .panel{margin-top:20px}

/* 表格 */
table.list{width:100%;border-collapse:collapse;background:#fff;border-radius:14px;overflow:hidden;border:1px solid #e7e9f3}
table.list th,table.list td{padding:13px 14px;text-align:left;font-size:14px;border-bottom:1px solid #f0f1f7}
table.list th{background:#fafbff;color:#6b7185;font-weight:600;font-size:13px}
table.list tr:last-child td{border-bottom:none}
table.list tr:hover td{background:#fafbff}
.mini-icon{width:42px;height:42px;border-radius:10px;background:linear-gradient(135deg,#6366f1,#8b5cf6);display:grid;place-items:center;color:#fff;font-weight:700;overflow:hidden}
.mini-icon img{width:100%;height:100%;object-fit:cover}
.badge{font-size:12px;padding:2px 9px;border-radius:999px;font-weight:600}
.badge.on{background:#dcfce7;color:#16a34a}
.badge.off{background:#f1f2f7;color:#8b90a8}

/* 按钮 */
.btn{display:inline-flex;align-items:center;gap:6px;padding:9px 15px;border-radius:9px;font-weight:600;font-size:13.5px;cursor:pointer;border:1px solid transparent;transition:.15s}
.btn-primary{background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff}
.btn-primary:hover{opacity:.92}
.btn-ghost{background:#fff;border-color:#e0e3f0;color:#1f2333}
.btn-ghost:hover{border-color:#6366f1;color:#6366f1}
.btn-danger{background:#fee2e2;color:#dc2626}
.btn-danger:hover{background:#fecaca}
.btn-sm{padding:6px 11px;font-size:12.5px}
.link-danger{color:#dc2626;font-size:13px}
.link-edit{color:#6366f1;font-size:13px;margin-right:10px}

/* 表单 */
.form-row{margin-bottom:16px}
.form-row label{display:block;font-size:13.5px;font-weight:600;margin-bottom:6px}
.form-row .hint{font-weight:400;color:#9aa0b5;font-size:12.5px;margin-left:6px}
input[type=text],input[type=url],input[type=password],input[type=email],textarea,select{
  width:100%;padding:10px 12px;border:1px solid #dde0ec;border-radius:10px;font-size:14px;font-family:inherit;background:#fff;color:#1f2333;transition:.15s}
input:focus,textarea:focus,select:focus{outline:none;border-color:#6366f1;box-shadow:0 0 0 3px rgba(99,102,241,.15)}
textarea{resize:vertical;min-height:120px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media(max-width:760px){.grid-2{grid-template-columns:1fr}.admin{flex-direction:column}.sidebar{width:100%;height:auto;position:relative}.content{padding:20px}}

/* 上传预览 */
.upload-prev{display:flex;gap:14px;flex-wrap:wrap;margin-top:10px}
.preview{position:relative;width:84px;height:84px;border-radius:12px;overflow:hidden;border:1px solid #e0e3f0;background:#f4f5fb;transition:opacity .2s ease,transform .2s ease}
.preview img{width:100%;height:100%;object-fit:cover}
.preview.removing{opacity:0;transform:scale(.82)}
.preview .del{position:absolute;top:5px;right:5px;width:22px;height:22px;border:none;border-radius:50%;background:rgba(17,19,31,.62);color:#fff;font-size:13px;line-height:1;cursor:pointer;display:grid;place-items:center;opacity:.82;backdrop-filter:blur(2px);transition:background .15s ease,transform .15s ease,opacity .15s ease}
.preview .del:hover{background:#6366f1;opacity:1;transform:scale(1.1)}
.preview .del:active{transform:scale(.92)}
.shot-prev{width:72px;height:128px;border-radius:0}
.shot-prev .move{position:absolute;bottom:3px;left:3px;display:flex;gap:2px}
.shot-prev .mv{width:20px;height:18px;border:none;border-radius:5px;background:rgba(0,0,0,.6);color:#fff;font-size:11px;line-height:1;cursor:pointer;padding:0;font-family:inherit}
.shot-prev .mv:hover{background:#6366f1}

/* flash */
.flash{padding:12px 14px;border-radius:10px;font-size:14px;margin-bottom:18px}
.flash.success{background:#dcfce7;color:#15803d}
.flash.error{background:#fef2f2;color:#dc2626}
.flash.info{background:#eef2ff;color:#4338ca}

.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:16px;margin-bottom:22px}
.stat{background:#fff;border:1px solid #e7e9f3;border-radius:14px;padding:18px}
.stat .n{font-size:28px;font-weight:800}
.stat .l{color:#6b7185;font-size:13px;margin-top:2px}

/* 发布进度条浮层 */
.publish-overlay{display:none;position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(17,19,31,.72);z-index:200;align-items:center;justify-content:center}
.publish-overlay.show{display:flex}
.publish-box{background:#fff;border-radius:14px;padding:28px 34px;max-width:360px;width:90%;text-align:center;box-shadow:0 20px 60px rgba(0,0,0,.25)}
.publish-box p{margin:0 0 16px;font-size:15px;color:#1f2333;font-weight:600}
.publish-bar{height:8px;background:#e7e9f3;border-radius:999px;overflow:hidden}
.publish-bar-inner{width:40%;height:100%;background:linear-gradient(90deg,#6366f1,#8b5cf6);border-radius:999px;animation:publishMove 1.4s ease-in-out infinite}
@keyframes publishMove{
  0%{transform:translateX(-100%)}
  50%{transform:translateX(150%)}
  100%{transform:translateX(-100%)}
}

/* APP 地址二维码预览 */
.qr-box{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
#adminQr canvas,#adminQr img{display:block;border-radius:8px;border:1px solid #e7e9f3;background:#fff;padding:6px;width:128px;height:128px}
.qr-url{font-size:12px;color:#6b7185;word-break:break-all;margin:0}
.qr-platforms{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.pf-btn{padding:7px 12px;border:1px solid #e7e9f3;border-radius:9px;background:#fff;color:#1f2333;font-size:13px;font-weight:600;cursor:pointer;transition:.15s}
.pf-btn:hover{border-color:#6366f1;color:#6366f1}
.pf-btn.active{background:#6366f1;border-color:#6366f1;color:#fff}
