/* 慧剪 —— 深色简洁主题 */
* { box-sizing: border-box; }
:root {
  --bg: #12141a; --panel: #1b1e27; --line: #2a2e3b; --text: #e6e8ee;
  --muted: #8a90a3; --accent: #4f8cff; --ok: #2fbf7a; --bad: #ff5d5d;
}
body { margin: 0; background: var(--bg); color: var(--text);
       font: 14px/1.6 "Segoe UI", "Microsoft YaHei", sans-serif; }
[v-cloak] { display: none; }

.topbar { display: flex; justify-content: space-between; align-items: center;
          padding: 14px 24px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 18px; margin: 0; }
.health { font-size: 12px; padding: 4px 10px; border-radius: 12px; }
.health.ok { background: rgba(47,191,122,.15); color: var(--ok); }
.health.bad { background: rgba(255,93,93,.15); color: var(--bad); }

.tabs { display: flex; gap: 6px; padding: 12px 24px 0; flex-wrap: wrap; }
.tabs button { background: none; border: none; color: var(--muted); font-size: 14px;
               padding: 8px 16px; cursor: pointer; border-radius: 8px 8px 0 0; }
.tabs button.active { color: var(--text); background: var(--panel); }

main { padding: 18px 24px 60px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
         padding: 18px; max-width: 1100px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.panel-head h2 { margin: 0 0 6px; font-size: 16px; }
.muted { color: var(--muted); font-size: 12px; margin: 4px 0 14px; }
.empty { color: var(--muted); text-align: center; padding: 24px; }

.btn { background: #262b38; color: var(--text); border: 1px solid var(--line);
       border-radius: 8px; padding: 8px 16px; cursor: pointer; font-size: 13px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 3px 10px; font-size: 12px; }

table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th, table.grid td { text-align: left; padding: 8px 10px;
                               border-bottom: 1px solid var(--line); }
table.grid th { color: var(--muted); font-weight: normal; }
td.name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.msg { max-width: 260px; color: var(--muted); font-size: 12px;
         overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.rowbtns { white-space: nowrap; }
.tag { padding: 1px 8px; border-radius: 10px; font-size: 12px; background: #2c3446; }
.tag.audio { background: #234235; } .tag.subtitle { background: #45372a; } .tag.image { background: #3d2f4d; }

.status { padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.status.queued { background: #2c3446; } .status.running { background: #1d3a5f; color: #7db6ff; }
.status.done { background: #1c4532; color: var(--ok); } .status.failed { background: #4c2323; color: var(--bad); }
.status.cancelled { background: #413a22; color: #d6b95f; }
.prog { min-width: 130px; } .prog .bar { display: inline-block; width: 80px; height: 8px;
  background: #262b38; border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.prog .bar i { display: block; height: 100%; background: var(--accent); }
.uploading { margin: 4px 0 14px; padding: 12px 14px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; }
.uploading .up-meta { display: flex; justify-content: space-between; font-size: 13px;
  color: var(--text); margin-bottom: 6px; word-break: break-all; }
.uploading .bar { height: 10px; background: #262b38; border-radius: 5px; overflow: hidden; }
.uploading .bar i { display: block; height: 100%; width: 0;
  background: var(--accent); transition: width .2s ease; }
.uploading .muted { margin: 6px 0 0; }
.outs { max-width: 220px; }
.out-link { display: inline-block; color: var(--accent); font-size: 12px;
            text-decoration: none; margin: 1px 6px 1px 0; max-width: 200px;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

.form { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.form label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 13px; }
.form select, .form input, .form textarea {
  background: #12151d; color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 10px; font-size: 13px; font-family: inherit; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkbox-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
                 gap: 6px; max-height: 180px; overflow: auto; padding: 8px;
                 border: 1px solid var(--line); border-radius: 8px; }
.chk { flex-direction: row !important; align-items: center; gap: 6px; color: var(--text); }
.slots { border: 1px dashed var(--line); border-radius: 8px; padding: 10px;
         display: flex; flex-direction: column; gap: 8px; }
.group-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px;
              display: flex; flex-direction: column; gap: 10px; background: #171a22; }
.group-head { display: flex; justify-content: space-between; align-items: center; }
.slot-head { color: var(--muted); font-size: 12px; }
.slot { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.slot select { flex: 1; }

.toast { position: fixed; bottom: 24px; right: 24px; padding: 12px 18px; border-radius: 8px;
         background: #262b38; border: 1px solid var(--line); box-shadow: 0 4px 18px rgba(0,0,0,.4);
         max-width: 420px; z-index: 99; }
.toast.ok { border-color: var(--ok); } .toast.error { border-color: var(--bad); }

/* ───────── 会员站新增：顶栏常驻项、目录树、素材网格、报价条、弹窗、档位卡 ───────── */
.muted.sm, .muted.tiny, .tiny { font-size: 12px; }
.muted.tiny { font-size: 11px; }
.ok { color: var(--ok); } .bad { color: var(--bad); }
.block { display: block; width: 100%; }
.sep { color: var(--line); margin: 0 6px; }
.grow { flex: 1; }
.row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
label.inline { flex-direction: row !important; align-items: center; gap: 8px; }
.panel.wide { max-width: 1400px; }

.topbar { flex-wrap: wrap; gap: 10px; }
.top-stats { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.top-stats .stat { background: #222633; border: 1px solid var(--line); border-radius: 12px;
                   padding: 3px 12px; }
.top-stats .stat b { color: var(--accent); font-size: 15px; }
.top-stats .stat.plan { background: #1d2b45; }
.top-stats .stat em { font-style: normal; color: var(--muted); margin-left: 4px; }
.top-stats .who { color: var(--muted); max-width: 180px; overflow: hidden;
                  text-overflow: ellipsis; white-space: nowrap; }

.quotebar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
            margin: 12px 24px 0; padding: 10px 16px; background: #171d2b;
            border: 1px solid var(--line); border-left: 3px solid var(--accent);
            border-radius: 8px; font-size: 13px; max-width: 1400px; }
.quotebar .credits { color: var(--accent); font-size: 17px; }

/* 素材库三栏：目录树 / 面包屑+网格 */
.media-layout { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: start; }
.side { background: #171a22; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.side-head { display: flex; justify-content: space-between; align-items: center;
             color: var(--muted); font-size: 12px; padding: 2px 6px 8px; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { padding-left: 14px; border-left: 1px dashed var(--line); margin-left: 8px; }
.node { display: flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 6px;
        font-size: 13px; }
.node:hover { background-color: rgba(79,140,255,.1); }
.node.active { background: rgba(79,140,255,.18); }
.node .caret { color: var(--muted); cursor: pointer; width: 12px; user-select: none; }
.node .node-name { flex: 1; cursor: pointer; overflow: hidden; text-overflow: ellipsis;
                   white-space: nowrap; color: var(--text); }
.node .node-name em { font-style: normal; color: var(--muted); margin-left: 5px; font-size: 11px; }
.node .node-ops { display: none; gap: 2px; }
.node:hover .node-ops { display: flex; }
button.mini { background: none; border: 1px solid transparent; color: var(--muted); cursor: pointer;
              border-radius: 4px; font-size: 12px; padding: 0 4px; line-height: 18px; }
button.mini:hover { color: var(--text); border-color: var(--line); }
button.mini.danger:hover { color: var(--bad); }

.crumbs { display: flex; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { cursor: pointer; color: var(--accent); }
.crumbs a:not(:first-child)::before { content: "/ "; color: var(--muted); }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.toolbar input, .toolbar select { background: #12151d; color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; font-size: 13px; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.batchbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 10px;
            background: #1d2331; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.batchbar select { background: #12151d; color: var(--text); border: 1px solid var(--line);
                   border-radius: 6px; padding: 5px 8px; }
.quota { height: 5px; background: #262b38; border-radius: 3px; overflow: hidden; margin-bottom: 12px; }
.quota i { display: block; height: 100%; background: var(--accent); }

.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.mcard { background: #171a22; border: 1px solid var(--line); border-radius: 10px;
         overflow: hidden; position: relative; }
.mcard.picked { border-color: var(--accent); }
.mcard .pick { position: absolute; top: 6px; left: 8px; z-index: 2; }
.mcard .thumb { height: 106px; background: #0e1016; display: flex; align-items: center;
                justify-content: center; cursor: pointer; position: relative; overflow: hidden; }
.mcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.mcard .thumb .ph { color: var(--muted); font-size: 12px; }
.mcard .thumb .dur { position: absolute; right: 5px; bottom: 4px; font-style: normal;
                     background: rgba(0,0,0,.6); color: #fff; font-size: 11px;
                     padding: 1px 5px; border-radius: 4px; }
.mcard .card-body { padding: 8px 10px 10px; }
.mcard .fname { margin: 0 0 4px; font-size: 13px; overflow: hidden; text-overflow: ellipsis;
                white-space: nowrap; }
.mcard .meta { margin: 2px 0; font-size: 11px; color: var(--muted); display: flex; gap: 6px;
               flex-wrap: wrap; }
.ops { margin: 6px 0 0; font-size: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.ops.inline { margin: 4px 0 10px; }
.ops a { color: var(--accent); cursor: pointer; }
.ops a.danger { color: var(--bad); }

.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.plan-card { background: #171a22; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.plan-card.current { border-color: var(--accent); }
.plan-card.pack { background: #1b2028; }
.plan-card h4 { margin: 0 0 6px; font-size: 15px; }
.plan-card h4 em { font-style: normal; font-size: 11px; color: var(--ok); margin-left: 6px; }
.plan-card .price { margin: 0 0 8px; font-size: 22px; color: var(--accent); }
.plan-card .price span { font-size: 12px; color: var(--muted); }
.plan-card ul { margin: 0 0 12px; padding-left: 18px; color: var(--muted); font-size: 12px; }
.plan-card li { margin: 3px 0; }
h3 { font-size: 14px; margin: 22px 0 10px; border-left: 3px solid var(--accent); padding-left: 8px; }
.pos { font-style: normal; color: #7db6ff; font-size: 11px; display: block; }

.mask { position: fixed; inset: 0; background: rgba(6,8,12,.72); display: flex;
        align-items: center; justify-content: center; z-index: 90; padding: 20px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
         padding: 22px; max-width: 380px; width: 100%; text-align: center; }
.modal.wide { max-width: 860px; text-align: left; }
.modal h3 { margin: 0 0 10px; border: none; padding: 0; }
.modal video, .modal img { width: 100%; max-height: 60vh; background: #000; border-radius: 8px; }
.modal audio { width: 100%; }
.modal .price.big { font-size: 26px; color: var(--accent); margin: 6px 0; }
.modal .qr { display: block; margin: 12px auto; width: 240px; min-height: 40px; padding: 8px;
             background: #fff; border-radius: 8px; text-align: center;
             white-space: pre-wrap; word-break: break-all; font-size: 12px; color: #111; }
.modal .qr svg, .modal .qr canvas, .modal .qr img { width: 100%; height: auto; display: block; }
.modal .pre { white-space: pre-wrap; word-break: break-all; max-height: 50vh; overflow: auto; }

/* 登录页 */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
             padding: 28px; width: 100%; max-width: 380px; }
.auth-title { font-size: 18px; margin: 0 0 18px; text-align: center; }
.auth-card h2 { font-size: 16px; margin: 0 0 14px; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; }
.auth-card label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 13px; }
.auth-card input { background: #12151d; color: var(--text); border: 1px solid var(--line);
                   border-radius: 6px; padding: 9px 11px; font-size: 14px; }
.auth-links { text-align: center; font-size: 13px; color: var(--muted); margin: 16px 0 0; }
.auth-links a { color: var(--accent); text-decoration: none; }
.auth-links span { margin: 0 8px; }
.err { color: var(--bad); font-size: 13px; margin: 4px 0; }
.foot { text-align: center; margin: 18px 0 0; }

/* 运营后台 */
.admin-layout { display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: start; }
.admin-nav { background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
             padding: 8px; position: sticky; top: 12px; }
.admin-nav button { display: block; width: 100%; text-align: left; background: none; border: none;
                    color: var(--muted); padding: 8px 10px; border-radius: 6px; cursor: pointer;
                    font-size: 13px; }
.admin-nav button.active { background: rgba(79,140,255,.18); color: var(--text); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px;
        margin-bottom: 14px; }
.kpi { background: #171a22; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.kpi b { display: block; font-size: 20px; color: var(--accent); }
.kpi span { font-size: 12px; color: var(--muted); }
input.row-input, select.row-select { background: #12151d; color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; font-size: 13px; }
textarea { background: #12151d; color: var(--text); border: 1px solid var(--line);
           border-radius: 6px; padding: 8px 10px; font-size: 13px; font-family: inherit; }
.scroll-x { overflow-x: auto; }

/* 弹窗里的表单：与主站 .form 同一口径，但不依赖外层 class */
.modal label, .panel label { display: flex; flex-direction: column; gap: 5px;
                             color: var(--muted); font-size: 13px; margin: 10px 0; }
.modal input, .modal select, .modal textarea { background: #12151d; color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 13px;
  font-family: inherit; width: 100%; }
.modal .chk, .modal label.inline { flex-direction: row; align-items: center; }
.modal .chk input, .modal .chk input[type=checkbox] { width: auto; }
.modal h4 { margin: 16px 0 6px; font-size: 13px; color: var(--muted); }
.modal table.grid { font-size: 12px; }
/* 勾选行与上传按钮不该吃块级 label 的外边距 */
.checkbox-list .chk, .modal .chk, .panel .chk { margin: 0; }
.panel .filebtn, .toolbar .filebtn { display: inline-block; margin: 0; width: auto; }

/* 页脚：技术支持与联系方式（文案来自 /api/meta，不写死在前端）。
   叫 sitefoot 不叫 foot：auth.html 早就用 .foot 给一段提示文字，不能搭便车。 */
.sitefoot { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center;
        margin: 26px 0 8px; padding-top: 12px; border-top: 1px solid var(--line);
        color: var(--muted); font-size: 12px; }
.sitefoot a { color: var(--muted); text-decoration: none; }
.sitefoot a:hover { color: var(--text); }
