/* ================= 抖音号管理台 · 后台样式 ================= */
:root {
    --bg: #070a10;
    --panel: rgba(255, 255, 255, 0.04);
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.15);
    --text: #eaf0fa;
    --text-2: #b7c2d4;
    --muted: #7d8a9f;
    --accent: #0b85f2;
    --accent-2: #6e6bff;
    --green: #22c98a;
    --amber: #f5a524;
    --red: #f4526b;
    --radius: 18px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.glow { position: fixed; border-radius: 50%; filter: blur(130px); pointer-events: none; z-index: 0; opacity: .5; }
.glow-a { width: 520px; height: 520px; top: -200px; left: 10%; background: rgba(11, 133, 242, .26); }
.glow-b { width: 460px; height: 460px; bottom: -240px; right: 2%; background: rgba(110, 107, 255, .2); }

.app { position: relative; z-index: 1; display: grid; grid-template-columns: 246px 1fr; min-height: 100vh; }

/* ---------------- 侧栏 ---------------- */
.sidebar {
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column;
    padding: 22px 14px;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .008));
    backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 22px; }
.logo {
    width: 40px; height: 40px; border-radius: 12px; flex: none;
    display: grid; place-items: center;
    font-weight: 800; font-size: 18px; color: #fff;
    background: linear-gradient(140deg, #0b85f2, #6e6bff);
    box-shadow: 0 8px 22px rgba(11, 133, 242, .38);
}
.logo.lg { width: 52px; height: 52px; border-radius: 16px; font-size: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.35; overflow: hidden; }
.brand-text b { font-size: 14.5px; letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text span { font-size: 9px; color: var(--muted); letter-spacing: 2px; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 11px;
    border: 1px solid transparent;
    color: var(--text-2); font-size: 13.5px;
    transition: .18s ease;
}
.nav-item svg { width: 17px; height: 17px; fill: currentColor; opacity: .7; flex: none; }
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-item.active {
    background: linear-gradient(100deg, rgba(11, 133, 242, .22), rgba(110, 107, 255, .1));
    border-color: rgba(11, 133, 242, .38);
    color: #fff;
}
.nav-item.active svg { opacity: 1; fill: #6fb6ff; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.userbox {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px; border-radius: 13px;
    background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
}
.user-meta { flex: 1; min-width: 0; }
.user-meta b { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta span { font-size: 10.5px; color: var(--muted); }
.logout { font-size: 11px; color: var(--muted); padding: 3px 7px; border-radius: 7px; border: 1px solid var(--line); }
.logout:hover { color: #ff9dab; border-color: rgba(244, 82, 107, .4); }
.ver { font-size: 10px; color: #4d5a70; padding-left: 3px; }

/* ---------------- 主区 ---------------- */
.main { min-width: 0; padding: 24px 28px 48px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.titles h1 { font-size: 23px; font-weight: 650; letter-spacing: .3px; }
.titles p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.clock {
    font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--text-2);
    padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
}
.content { display: flex; flex-direction: column; gap: 16px; }

/* ---------------- 通用控件 ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font-family: inherit; font-size: 13px; font-weight: 500;
    padding: 9px 15px; border-radius: 11px; cursor: pointer;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, .05); color: var(--text);
    transition: .18s ease; white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, .1); transform: translateY(-1px); }
.btn.primary {
    background: linear-gradient(120deg, #0b85f2, #4a7bff 60%, #6e6bff);
    border-color: transparent; color: #fff; font-weight: 600;
    box-shadow: 0 10px 24px rgba(11, 133, 242, .28);
}
.btn.primary:hover { box-shadow: 0 12px 30px rgba(11, 133, 242, .4); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 11px; font-size: 12px; }
.btn.block { width: 100%; }
.btn.danger { color: #ff8c9c; border-color: rgba(244, 82, 107, .32); background: rgba(244, 82, 107, .08); }

.mini {
    font-family: inherit; font-size: 11.5px; cursor: pointer;
    padding: 5px 10px; border-radius: 8px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
    color: var(--text-2); transition: .16s; display: inline-block;
}
.mini:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.mini.danger:hover { background: rgba(244, 82, 107, .16); color: #ff9dab; border-color: rgba(244, 82, 107, .3); }

.link { color: #7dc0ff; }
.link:hover { text-decoration: underline; }
.inline { display: inline; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.mono { font-family: Consolas, "SF Mono", monospace; font-size: 12.5px; }
.sub { display: block; font-size: 11px; color: var(--muted); }

.input, .select {
    width: 100%; height: 38px; padding: 0 12px;
    border-radius: 10px; border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    color: var(--text); font-family: inherit; font-size: 13px;
    outline: none; transition: .16s;
}
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7d8a9f 50%), linear-gradient(135deg, #7d8a9f 50%, transparent 50%); background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.input:focus, .select:focus { border-color: rgba(11, 133, 242, .6); box-shadow: 0 0 0 3px rgba(11, 133, 242, .14); }
textarea.input { height: auto; padding: 11px 12px; resize: vertical; line-height: 1.7; }
.input[readonly] { color: var(--text-2); }
input[type="file"].input { padding: 8px 10px; height: auto; font-size: 12px; }
input[type="file"]::file-selector-button {
    font-family: inherit; font-size: 12px; margin-right: 10px;
    padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer;
}
select option { background: #121824; color: var(--text); }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.field > span i { font-style: normal; color: #7dc0ff; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form-foot { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.panel {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 18px 20px;
    backdrop-filter: blur(14px);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { font-size: 14.5px; font-weight: 600; letter-spacing: .2px; }
.hint { font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.empty { padding: 26px 10px; text-align: center; color: var(--muted); font-size: 12.5px; }
.list-meta { font-size: 12px; color: var(--muted); padding-left: 2px; }

.alert { padding: 12px 14px; border-radius: 12px; font-size: 12.5px; line-height: 1.85; }
.alert.ok { background: rgba(34, 201, 138, .1); border: 1px solid rgba(34, 201, 138, .28); color: #7ee8bd; }
.alert.warn { background: rgba(245, 165, 36, .1); border: 1px solid rgba(245, 165, 36, .28); color: #ffc46b; }
.alert.err { background: rgba(244, 82, 107, .1); border: 1px solid rgba(244, 82, 107, .3); color: #ff9dab; }
.alert.info { background: rgba(11, 133, 242, .1); border: 1px solid rgba(11, 133, 242, .28); color: #9dcbff; }

/* ---------------- 概览 ---------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.stat {
    position: relative; overflow: hidden;
    padding: 17px 18px; border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
}
.stat::after {
    content: ""; position: absolute; right: -46px; top: -46px;
    width: 130px; height: 130px; border-radius: 50%;
    background: radial-gradient(circle, rgba(11, 133, 242, .25), transparent 70%);
}
.stat .k { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.stat .k i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.stat .v { font-size: 29px; font-weight: 700; letter-spacing: -.5px; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 11.5px; color: var(--muted); }
.stat .s b { color: var(--green); }

.chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 6px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.chart-bar { flex: 1; width: 100%; max-width: 46px; display: flex; align-items: flex-end; background: rgba(255, 255, 255, .04); border-radius: 8px; overflow: hidden; }
.chart-bar i { display: block; width: 100%; border-radius: 8px; background: linear-gradient(180deg, #4da6ff, #0b85f2 70%, #6e6bff); min-height: 4px; transition: .4s; }
.chart-col b { font-size: 11.5px; color: var(--text-2); font-weight: 500; }
.chart-col span { font-size: 10.5px; color: var(--muted); }

.list { display: flex; flex-direction: column; gap: 7px; }
.li {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 13px; border-radius: 11px;
    background: rgba(255, 255, 255, .025); border: 1px solid transparent; transition: .16s;
}
.li:hover { border-color: var(--line); background: rgba(255, 255, 255, .045); }
.li .time { font-size: 12px; color: #8fb7e8; font-variant-numeric: tabular-nums; white-space: nowrap; }
.li .body { flex: 1; min-width: 0; }
.li .body b { display: block; font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .body span { font-size: 11.5px; color: var(--muted); }

.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; align-items: start; }
.two-col.wide-right { grid-template-columns: 1fr 1fr; }

.log-list { display: flex; flex-direction: column; gap: 1px; max-height: 320px; overflow-y: auto; }
.log-list.tall { max-height: 560px; }
.log-row { display: flex; gap: 9px; align-items: baseline; padding: 7px 9px; border-radius: 8px; font-size: 12px; color: var(--text-2); }
.log-row:hover { background: rgba(255, 255, 255, .035); }
.log-row time { color: #5d6a80; font-size: 11px; font-variant-numeric: tabular-nums; flex: none; }
.log-row .lv { font-size: 10px; padding: 1px 6px; border-radius: 5px; flex: none; }
.lv.info { color: #8fb7e8; background: rgba(11, 133, 242, .14); }
.lv.success { color: #5fe0ad; background: rgba(34, 201, 138, .14); }
.lv.warn { color: #ffc46b; background: rgba(245, 165, 36, .14); }
.lv.error { color: #ff8c9c; background: rgba(244, 82, 107, .14); }
.log-row .src { font-size: 10px; color: #4d5a70; flex: none; }

.rhythm { display: flex; flex-direction: column; gap: 9px; }
.rhythm-row { display: grid; grid-template-columns: 160px 1fr 76px; gap: 12px; align-items: center; font-size: 12.5px; }
.rhythm-row span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 7px; border-radius: 7px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, #0b85f2, #6e6bff); }
.rhythm-row b { text-align: right; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------------- 工具条 / 卡片 ---------------- */
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.toolbar-form { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; flex: 1 1 560px; min-width: 0; }
.toolbar-form .search { flex: 1 1 240px; min-width: 200px; }
.toolbar-form .select { width: auto; flex: 0 0 auto; min-width: 118px; }
.toolbar-form .btn { flex: 0 0 auto; }
.spacer { flex: 1; }
.search {
    display: flex; align-items: center; gap: 8px;
    height: 38px; padding: 0 12px; min-width: 260px;
    border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
}
.search.sm { min-width: 180px; height: 34px; }
.search svg { width: 15px; height: 15px; fill: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--text); font-family: inherit; font-size: 13px; }
.search input::placeholder { color: #59657a; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 13px; }
.acc-card, .ct-card {
    border-radius: var(--radius); border: 1px solid var(--line);
    background: linear-gradient(165deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
    transition: .2s ease;
}
.acc-card { padding: 16px; }
.acc-card:hover, .ct-card:hover { transform: translateY(-3px); border-color: rgba(11, 133, 242, .32); box-shadow: var(--shadow); }
.acc-top { display: flex; align-items: center; gap: 11px; }
.avatar {
    width: 42px; height: 42px; border-radius: 13px; flex: none;
    display: grid; place-items: center; font-weight: 700; font-size: 17px; color: #fff;
    background: linear-gradient(140deg, #0b85f2, #6e6bff);
}
.avatar.lg { width: 54px; height: 54px; border-radius: 16px; font-size: 22px; }
.avatar.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
.acc-name { flex: 1; min-width: 0; }
.acc-name b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-name span { font-size: 11.5px; color: var(--muted); }
.acc-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 13px 0 10px; }
.acc-note { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.acc-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.chip {
    display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 8px;
    background: rgba(255, 255, 255, .06); color: var(--text-2);
    border: 1px solid rgba(255, 255, 255, .05); white-space: nowrap;
}
.chip.blue { background: rgba(11, 133, 242, .14); color: #7dc0ff; border-color: rgba(11, 133, 242, .2); }
.chip.green { background: rgba(34, 201, 138, .12); color: #5fe0ad; border-color: rgba(34, 201, 138, .2); }
.chip.amber { background: rgba(245, 165, 36, .12); color: #ffc46b; border-color: rgba(245, 165, 36, .2); }
.chip.red { background: rgba(244, 82, 107, .12); color: #ff8c9c; border-color: rgba(244, 82, 107, .2); }
.chip.gray { color: var(--muted); }
.chip.sm { font-size: 10px; padding: 1px 6px; }

.ct-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.ct-cover {
    position: relative; height: 152px; background: #0d121b center/cover no-repeat;
    display: grid; place-items: center; border-bottom: 1px solid var(--line);
}
.ct-cover .ph { font-size: 11px; color: #4d5a70; letter-spacing: 1px; }
.ct-cover .play {
    position: absolute; width: 42px; height: 42px; border-radius: 50%;
    background: rgba(0, 0, 0, .5); border: 1px solid rgba(255, 255, 255, .3);
    display: grid; place-items: center; backdrop-filter: blur(6px);
}
.ct-cover .play::after {
    content: ""; border-style: solid; border-width: 7px 0 7px 11px;
    border-color: transparent transparent transparent #fff; margin-left: 3px;
}
.ct-type { position: absolute; left: 10px; top: 10px; font-size: 10.5px; padding: 2px 8px; border-radius: 7px; background: rgba(0, 0, 0, .55); color: #cfe3ff; }
.ct-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.ct-body h3 { font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.ct-body p { font-size: 11.5px; color: var(--muted); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ct-foot { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.ct-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, .05); }

.tabs { display: inline-flex; gap: 3px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); padding: 4px; border-radius: 11px; flex-wrap: wrap; }
.tab { font-size: 12.5px; padding: 6px 13px; border-radius: 8px; color: var(--muted); transition: .16s; display: inline-flex; align-items: center; gap: 5px; }
.tab:hover { color: #fff; }
.tab.active { background: rgba(255, 255, 255, .09); color: #fff; }
.tab em { font-style: normal; font-size: 10.5px; color: inherit; opacity: .65; }

/* ---------------- 表格 ---------------- */
.table-panel { padding: 4px 2px 2px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 860px; }
.table th {
    text-align: left; font-size: 11.5px; font-weight: 500; color: var(--muted);
    padding: 12px 13px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 12px 13px; font-size: 12.5px; border-bottom: 1px solid rgba(255, 255, 255, .04); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(255, 255, 255, .028); }
.table .right { text-align: right; }
.table td.title-cell { max-width: 250px; }
.table td.title-cell b { display: block; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table td.title-cell span { font-size: 11px; color: var(--muted); }
.table td.msg { max-width: 220px; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: 5px; justify-content: flex-end; flex-wrap: wrap; }

.pill { display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 20px; white-space: nowrap; border: 1px solid transparent; }
.pill.wait { color: #7dc0ff; background: rgba(11, 133, 242, .12); border-color: rgba(11, 133, 242, .22); }
.pill.manual { color: #ffc46b; background: rgba(245, 165, 36, .12); border-color: rgba(245, 165, 36, .22); }
.pill.running { color: #c9b3ff; background: rgba(110, 107, 255, .14); border-color: rgba(110, 107, 255, .25); }
.pill.done { color: #5fe0ad; background: rgba(34, 201, 138, .12); border-color: rgba(34, 201, 138, .22); }
.pill.fail { color: #ff8c9c; background: rgba(244, 82, 107, .12); border-color: rgba(244, 82, 107, .22); }

/* ---------------- 新建发布 ---------------- */
.compose-grid { display: grid; grid-template-columns: 1.1fr 1fr 1.1fr 0.8fr; gap: 14px 16px; align-items: start; }
.compose-grid .field.wide { grid-column: 1 / -1; }
.picker-tools { display: flex; gap: 6px; margin-bottom: 4px; }
.account-picker {
    display: flex; flex-direction: column; gap: 12px;
    max-height: 320px; overflow-y: auto;
    padding: 12px; border-radius: 12px;
    border: 1px solid var(--line); background: rgba(0, 0, 0, .18);
}
.picker-group-name { font-size: 11px; color: var(--muted); margin-bottom: 7px; letter-spacing: .4px; }
.picker-list { display: flex; gap: 7px; flex-wrap: wrap; }
.pick {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 12px; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
    font-size: 12.5px; color: var(--text-2); transition: .15s; user-select: none;
}
.pick input { display: none; }
.pick:hover { border-color: var(--line-strong); }
.pick.on { background: rgba(11, 133, 242, .16); border-color: rgba(11, 133, 242, .55); color: #fff; }
.pick .dot { width: 6px; height: 6px; border-radius: 50%; background: #6b7789; }
.pick .dot.ok { background: var(--green); }
.pick .tag-api { font-size: 9.5px; padding: 0 5px; border-radius: 5px; background: rgba(110, 107, 255, .2); color: #b9aaff; }
.pick .tag-off { font-size: 9.5px; padding: 0 5px; border-radius: 5px; background: rgba(245, 165, 36, .16); color: #ffc46b; }

/* ---------------- 内容编辑 ---------------- */
.type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-card {
    display: flex; flex-direction: column; gap: 3px; cursor: pointer;
    padding: 13px 15px; border-radius: 13px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
    transition: .16s;
}
.type-card input { display: none; }
.type-card b { font-size: 13.5px; }
.type-card span { font-size: 11.5px; color: var(--muted); }
.type-card.on { border-color: rgba(11, 133, 242, .55); background: rgba(11, 133, 242, .12); }
.type-card.on b { color: #fff; }

.file-cur { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.file-cur .thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.img-item { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 3/4; background: #0d121b; }
.img-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-del {
    position: absolute; left: 0; right: 0; bottom: 0;
    font-size: 10.5px; color: #fff; background: rgba(0, 0, 0, .6);
    display: flex; align-items: center; gap: 4px; padding: 4px 6px;
}
.img-del input { accent-color: #f4526b; }

/* ---------------- 发布包 ---------------- */
.pack-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pack-account { display: flex; align-items: center; gap: 13px; }
.pack-account h2 { font-size: 18px; font-weight: 600; }
.pack-account p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.pack-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pack-tip { font-size: 11.5px; color: var(--muted); margin-top: 9px; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row .input { flex: 1; }
.copybox { background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; font-size: 12px; color: var(--text-2); word-break: break-all; }
.pack-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.pack-img { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #0d121b; }
.pack-img img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.pack-img-foot { display: flex; align-items: center; justify-content: space-between; padding: 7px 9px; font-size: 11px; color: var(--muted); }
.video-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.video-preview { width: min(360px, 100%); border-radius: 12px; background: #000; aspect-ratio: 9/16; max-height: 420px; }
.video-info { display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--muted); }
.video-info b { color: var(--text); font-size: 13px; word-break: break-all; }
.pack-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

/* ---------------- 设置 ---------------- */
.switch-row { display: flex; align-items: center; gap: 11px; }
.switch-row i { font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.switch {
    width: 46px; height: 26px; border-radius: 20px; flex: none; position: relative;
    border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .08);
    cursor: pointer; transition: .2s; padding: 0;
}
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #9aa7bb; transition: .2s; }
.switch.on { background: rgba(11, 133, 242, .45); border-color: rgba(11, 133, 242, .7); }
.switch.on::after { left: 23px; background: #fff; }
.inline-form { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.inline-form .input { width: auto; min-width: 130px; }

/* ---------------- 登录页 ---------------- */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card {
    position: relative; z-index: 2; width: min(400px, 100%);
    padding: 32px 28px 24px; border-radius: 22px;
    background: linear-gradient(170deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025));
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow); backdrop-filter: blur(20px);
}
.login-head { text-align: center; margin-bottom: 22px; }
.login-head .logo { margin: 0 auto 14px; }
.login-head h1 { font-size: 19px; font-weight: 650; }
.login-head p { font-size: 12px; color: var(--muted); margin-top: 6px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form .btn { margin-top: 6px; padding: 11px; }
.login-foot { text-align: center; font-size: 10.5px; color: #4d5a70; margin-top: 18px; }
.login-card .alert { margin-bottom: 14px; }

/* ---------------- Toast ---------------- */
.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 120; display: flex; flex-direction: column; gap: 9px; align-items: flex-end; }
.toast {
    padding: 11px 15px; border-radius: 11px; font-size: 13px; max-width: 360px;
    background: #16202e; border: 1px solid var(--line-strong); color: var(--text);
    box-shadow: var(--shadow); animation: slideIn .24s ease both;
}
.toast.ok { border-color: rgba(34, 201, 138, .4); }
.toast.err { border-color: rgba(244, 82, 107, .45); }
@keyframes slideIn { from { opacity: 0; transform: translateX(18px); } }

@media (max-width: 1360px) {
    .compose-grid { grid-template-columns: 1fr 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1180px) {
    .two-col, .two-col.wide-right { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .app { grid-template-columns: 66px 1fr; }
    .brand-text, .nav-item span, .user-meta, .logout, .ver { display: none; }
    .nav-item { justify-content: center; padding: 11px 6px; }
    .sidebar { padding: 16px 8px; }
    .main { padding: 18px 14px 40px; }
    .topbar { align-items: flex-start; }
    .titles h1 { font-size: 20px; }
    .clock { display: none; }
    .compose-grid, .grid-2 { grid-template-columns: 1fr; }
    .cards { grid-template-columns: 1fr; }
    .top-actions .btn.ghost { display: none; }
}

/* ================= 扫码添加账号 · 弹窗 ================= */
.btn-ico { width: 16px; height: 16px; fill: currentColor; margin-right: 6px; vertical-align: -3px; }

.modal-mask {
    position: fixed; inset: 0; z-index: 90;
    display: grid; place-items: center;
    padding: 24px;
    background: rgba(3, 6, 12, .72);
    backdrop-filter: blur(6px);
    animation: maskIn .18s ease both;
}
@keyframes maskIn { from { opacity: 0 } to { opacity: 1 } }

.modal {
    width: min(440px, 100%);
    max-height: calc(100vh - 48px);
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, #121a28, #0d1420);
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    animation: modalIn .22s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98) } to { opacity: 1; transform: none } }

.modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px 12px;
}
.modal-head h2 { font-size: 17px; letter-spacing: .3px; }
.modal-x {
    width: 30px; height: 30px; border-radius: 10px;
    display: grid; place-items: center;
    font-size: 20px; line-height: 1; color: var(--muted);
    border: 1px solid transparent;
}
.modal-x:hover { color: var(--text); background: rgba(255, 255, 255, .06); }

.modal-body { padding: 0 20px 4px; overflow-y: auto; }
.modal-lead { font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.modal-lead strong { color: var(--text); }

.qr-box {
    display: grid; place-items: center;
    padding: 14px; margin: 0 auto 14px;
    width: 232px; height: 232px;
    background: #fff; border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.qr-box svg { width: 100%; height: 100%; display: block; shape-rendering: crispEdges; }
.qr-loading { color: #7a879b; font-size: 13px; }

.bind-code { text-align: center; font-size: 13px; color: var(--muted); }
.bind-code b { color: var(--text); font-size: 18px; letter-spacing: 4px; font-family: ui-monospace, Menlo, Consolas, monospace; margin: 0 2px; }
.bind-code span { display: block; margin-top: 6px; font-size: 12px; color: #5f6c80; }
.bind-code code { color: #8fa6c4; word-break: break-all; }
.bind-url {
    margin-top: 8px; font-size: 12px; line-height: 1.7;
    color: #5f6c80; text-align: center; word-break: break-all;
}
.bind-url code { color: #8fa6c4; }

.warn {
    margin-top: 14px; padding: 10px 12px;
    font-size: 12.5px; line-height: 1.7; color: #ffcf8a;
    background: rgba(245, 165, 36, .1);
    border: 1px solid rgba(245, 165, 36, .3);
    border-radius: 12px;
}

.bind-status {
    display: flex; align-items: center; gap: 8px;
    margin-top: 16px; padding: 11px 13px;
    font-size: 13px; color: var(--text-2);
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--line);
    border-radius: 13px;
}
.bind-status .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent); flex: none;
    box-shadow: 0 0 0 0 rgba(11, 133, 242, .55);
    animation: pulse 1.6s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(11, 133, 242, .5) }
    70% { box-shadow: 0 0 0 10px rgba(11, 133, 242, 0) }
    100% { box-shadow: 0 0 0 0 rgba(11, 133, 242, 0) }
}
.bind-status.ok { color: #9df0c8; border-color: rgba(34, 201, 138, .3); background: rgba(34, 201, 138, .08); }
.bind-status.ok .dot { background: var(--green); animation: none; }
.bind-status.expired { color: #ffb3be; border-color: rgba(244, 82, 107, .3); background: rgba(244, 82, 107, .08); }
.bind-status.expired .dot { background: var(--red); animation: none; }

.bind-added { list-style: none; margin: 12px 0 0; }
.bind-added li {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; margin-bottom: 8px;
    background: rgba(34, 201, 138, .07);
    border: 1px solid rgba(34, 201, 138, .22);
    border-radius: 12px; font-size: 13px;
    animation: modalIn .2s ease both;
}
.bind-added li .tick { color: var(--green); font-weight: 700; flex: none; }
.bind-added li span { color: var(--muted); font-size: 12px; margin-left: auto; }

.modal-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--line);
    margin-top: 16px;
}
.modal-foot .hint { font-size: 12px; color: #5f6c80; }
.modal-foot .btn { flex: none; }

/* ================= 表单折叠区 / 顶部提示条 ================= */
.tip-bar {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 16px; padding: 12px 16px;
    font-size: 13px; color: var(--text-2);
    background: rgba(11, 133, 242, .08);
    border: 1px solid rgba(11, 133, 242, .22);
    border-radius: 14px;
}
.tip-bar b { color: #8fc4ff; }

.fold {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 4px;
}
.fold > summary {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 2px; cursor: pointer;
    font-size: 13px; color: var(--text-2); list-style: none;
    user-select: none;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before {
    content: "＋";
    width: 18px; height: 18px; flex: none;
    display: grid; place-items: center;
    font-size: 13px; color: var(--muted);
    border: 1px solid var(--line-strong); border-radius: 6px;
    transition: transform .18s ease, color .18s ease;
}
.fold[open] > summary::before { content: "－"; color: #8fc4ff; border-color: rgba(11, 133, 242, .45); }
.fold > summary:hover { color: var(--text); }
.fold-body { padding: 2px 2px 8px; }
.fold-adv > summary { color: #7f8ca3; font-size: 12.5px; }
.fold-adv[open] > summary { color: var(--text-2); }

.panel > details.fold:last-of-type { margin-bottom: 4px; }
.panel.fold { margin-top: 16px; border-top: 0; padding-top: 16px; }
.panel.fold > summary { padding: 0; font-size: 13px; }
.panel.fold > summary + .fold-body { padding-top: 14px; }

.bind-copy { margin-top: 12px; }
.bind-copy .input { height: 36px; font-size: 12px; color: #93a4bd; }
.bind-copy .btn { height: 36px; font-size: 12px; }
