/* ============================================================
 * 必过资料库 · PC 管理后台
 * 主色与小程序端统一：#1769e0
 * ============================================================ */
:root {
    --primary: #1769e0;
    --primary-dark: #0f52b8;
    --primary-soft: #eaf2ff;
    --bg: #f5f7fa;
    --card: #ffffff;
    --text: #1f2329;
    --text-sub: #646a73;
    --text-weak: #8f959e;
    --border: #e5e6eb;
    --border-light: #f0f1f3;
    --hover: #f7f9fc;
    --success: #00a870;
    --success-soft: #e8f8f1;
    --warn: #ed7b2f;
    --warn-soft: #fff3e8;
    --danger: #e34d59;
    --danger-soft: #fdecee;
    --purple: #7b61c9;
    --purple-soft: #f1ecfb;
    --sidebar-bg: #1b2434;
    --sidebar-text: #c3cad6;
    --shadow: 0 2px 12px rgba(31, 35, 41, 0.06);
    --shadow-lg: 0 12px 40px rgba(31, 35, 41, 0.16);
    --radius: 10px;
}

body[data-theme="dark"] {
    --bg: #14171c;
    --card: #1e222a;
    --text: #e8eaed;
    --text-sub: #a4abb6;
    --text-weak: #7c838f;
    --border: #30353e;
    --border-light: #282d35;
    --hover: #262b34;
    --primary-soft: #1b3358;
    --success-soft: #17372c;
    --warn-soft: #3a2a19;
    --danger-soft: #3a2024;
    --purple-soft: #2b2440;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c9ced6; border-radius: 8px; }
body[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #454b55; }
::-webkit-scrollbar-track { background: transparent; }

#app { display: flex; min-height: 100vh; }

/* ============ 侧边栏 ============ */
.sidebar {
    width: 224px;
    flex: 0 0 224px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 20;
}
.brand {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 18px 18px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.brand-logo {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, #2f83f5, #1769e0);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 17px; flex: 0 0 34px;
    box-shadow: 0 4px 12px rgba(23,105,224,.4);
}
.brand-name { color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .5px; }
.brand-sub { font-size: 11px; color: #8d98ab; margin-top: 1px; }
.nav-group { padding: 14px 0 2px; }
.nav-title { padding: 0 20px 8px; font-size: 11px; color: #6f7b8f; letter-spacing: 1px; }
.nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 20px; margin: 2px 10px; border-radius: 8px;
    cursor: pointer; font-size: 13.5px; color: var(--sidebar-text);
    transition: background .15s, color .15s;
    user-select: none;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(23,105,224,.35); }
.nav-icon { width: 18px; text-align: center; font-size: 15px; opacity: .9; }
.nav-badge {
    margin-left: auto; background: var(--danger); color: #fff;
    font-size: 11px; min-width: 18px; height: 18px; line-height: 18px;
    text-align: center; border-radius: 9px; padding: 0 5px;
}
.nav-item.active .nav-badge { background: rgba(255,255,255,.28); }
.sidebar-foot {
    margin-top: auto; padding: 16px 18px; font-size: 11px;
    color: #6f7b8f; border-top: 1px solid rgba(255,255,255,.07);
}

/* ============ 主区域 ============ */
.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: 60px; flex: 0 0 60px;
    background: var(--card); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 16px;
    padding: 0 24px; position: sticky; top: 0; z-index: 15;
}
.crumb { font-size: 13px; color: var(--text-weak); }
.crumb b { color: var(--text); font-size: 16px; font-weight: 600; margin-left: 8px; }
.topbar-spacer { flex: 1; }
.top-search {
    width: 240px; height: 34px; border: 1px solid var(--border);
    border-radius: 18px; background: var(--bg); display: flex;
    align-items: center; padding: 0 12px; gap: 7px; color: var(--text-weak);
}
.top-search input { border: 0; background: transparent; outline: none; flex: 1; color: var(--text); font-size: 13px; }
.top-btn {
    height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--card); color: var(--text-sub); cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
    position: relative;
}
.top-btn:hover { border-color: var(--primary); color: var(--primary); }
.top-btn .dot {
    position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px;
    line-height: 17px; padding: 0 4px; border-radius: 9px; background: var(--danger);
    color: #fff; font-size: 10px; text-align: center;
}
.identity {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 4px 8px 4px 4px; border-radius: 20px; border: 1px solid var(--border);
    position: relative;
}
.identity:hover { border-color: var(--primary); }
.avatar {
    width: 28px; height: 28px; border-radius: 50%; flex: 0 0 28px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 12px; font-weight: 600;
}
.identity-name { font-size: 13px; font-weight: 600; }
.identity-role { font-size: 11px; color: var(--text-weak); }
.identity-menu {
    position: absolute; top: 44px; right: 0; width: 230px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40;
}
.identity-menu .im-title { font-size: 11px; color: var(--text-weak); padding: 6px 10px; }
.identity-menu .im-item {
    display: flex; align-items: center; gap: 9px; padding: 8px 10px;
    border-radius: 7px; cursor: pointer; font-size: 13px;
}
.identity-menu .im-item:hover { background: var(--hover); }
.identity-menu .im-item.active { background: var(--primary-soft); color: var(--primary); }
.im-role { margin-left: auto; font-size: 11px; color: var(--text-weak); }

.page-content { padding: 22px 24px 48px; flex: 1; min-width: 0; }

/* ============ 通用卡片/区块 ============ */
.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 18px 20px; margin-bottom: 18px;
}
.card-head {
    display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.card-title { font-size: 15px; font-weight: 600; }
.card-sub { font-size: 12px; color: var(--text-weak); }
.card-head .spacer { flex: 1; }
.section-desc { font-size: 12.5px; color: var(--text-sub); margin: -6px 0 16px; }

.page-head {
    display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px;
}
.page-head h1 { margin: 0; font-size: 20px; font-weight: 650; }
.page-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-weak); }
.page-head .spacer { flex: 1; }

/* ============ 按钮 ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 34px; padding: 0 14px; border-radius: 7px; cursor: pointer;
    border: 1px solid var(--border); background: var(--card); color: var(--text);
    font-size: 13px; font-weight: 500; white-space: nowrap;
    transition: all .15s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .88; color: #fff; }
.btn-ghost { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn-ghost:hover { background: #dceaff; color: var(--primary); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 11.5px; border-radius: 5px; }
.btn-text { border: 0; background: transparent; padding: 0 6px; color: var(--primary); height: auto; }
.btn-text:hover { background: transparent; text-decoration: underline; }
.btn-text.danger { color: var(--danger); }
.btn-text.muted { color: var(--text-sub); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:hover { border-color: var(--border); color: var(--text); }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ 标签 chip ============ */
.chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 9px; border-radius: 999px; font-size: 11.5px;
    background: var(--border-light); color: var(--text-sub); white-space: nowrap;
}
.chip-primary { background: var(--primary-soft); color: var(--primary); }
.chip-success { background: var(--success-soft); color: var(--success); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.chip-purple { background: var(--purple-soft); color: var(--purple); }
.chip-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ============ 指标卡 ============ */
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.metric {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.metric::after {
    content: ''; position: absolute; right: -18px; top: -18px; width: 72px; height: 72px;
    border-radius: 50%; background: var(--primary-soft); opacity: .55;
}
.metric-label { font-size: 12.5px; color: var(--text-sub); display: flex; align-items: center; gap: 6px; }
.metric-icon {
    width: 26px; height: 26px; border-radius: 7px; display: inline-flex;
    align-items: center; justify-content: center; font-size: 14px;
    background: var(--primary-soft); color: var(--primary);
}
.metric-value { font-size: 26px; font-weight: 680; margin-top: 8px; letter-spacing: -.5px; position: relative; z-index: 1; }
.metric-foot { font-size: 11.5px; color: var(--text-weak); margin-top: 4px; position: relative; z-index: 1; }
.metric-foot .up { color: var(--danger); font-weight: 600; }
.metric-foot .down { color: var(--success); font-weight: 600; }

/* ============ 筛选栏 ============ */
.filter-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px;
}
.filter-bar .spacer { flex: 1; }
.field-inline {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-sub);
}
.input, .select {
    height: 34px; padding: 0 10px; border: 1px solid var(--border);
    border-radius: 7px; background: var(--card); color: var(--text); outline: none;
    transition: border-color .15s; font-size: 13px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); }
.input::placeholder { color: var(--text-weak); }
.input-sm { height: 30px; }
.textarea {
    width: 100%; padding: 9px 11px; border: 1px solid var(--border);
    border-radius: 7px; background: var(--card); color: var(--text);
    outline: none; resize: vertical; min-height: 80px; font-size: 13px; line-height: 1.6;
}
.select { min-width: 120px; cursor: pointer; }
.search-input { width: 220px; }

/* ============ Tab ============ */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab {
    padding: 9px 18px; cursor: pointer; font-size: 13.5px; color: var(--text-sub);
    border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-count {
    display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 9px;
    background: var(--border-light); font-size: 11px; color: var(--text-sub);
}
.tab.active .tab-count { background: var(--primary-soft); color: var(--primary); }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 9px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
table.tbl th {
    background: var(--hover); color: var(--text-sub); font-weight: 600; font-size: 12.5px;
    text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.tbl td {
    padding: 11px 12px; border-bottom: 1px solid var(--border-light); vertical-align: middle;
}
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--hover); }
table.tbl td.actions { white-space: nowrap; }
table.tbl td.actions .btn-text + .btn-text { margin-left: 2px; }
.cell-main { font-weight: 550; color: var(--text); }
.cell-sub { font-size: 11.5px; color: var(--text-weak); margin-top: 2px; }
.cell-mono { font-family: Consolas, Monaco, monospace; font-size: 12px; letter-spacing: .3px; }
.cell-num { font-variant-numeric: tabular-nums; }
.cell-strong { font-weight: 650; }
.cell-danger { color: var(--danger); font-weight: 600; }
.cell-success { color: var(--success); font-weight: 600; }
.row-avatar { display: flex; align-items: center; gap: 9px; }
.row-avatar .avatar { width: 30px; height: 30px; flex: 0 0 30px; }
.checkbox { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); }
.link { cursor: pointer; color: var(--primary); }
.link:hover { text-decoration: underline; }

.empty {
    padding: 54px 20px; text-align: center; color: var(--text-weak);
}
.empty-icon { font-size: 38px; opacity: .5; }
.empty-title { margin-top: 10px; font-size: 14px; color: var(--text-sub); }
.empty-sub { margin-top: 5px; font-size: 12px; }
.empty .btn { margin-top: 16px; }

/* ============ 分页 ============ */
.pager {
    display: flex; align-items: center; gap: 8px; margin-top: 16px;
    font-size: 12.5px; color: var(--text-sub); flex-wrap: wrap;
}
.pager .spacer { flex: 1; }
.pager-btn {
    min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--border);
    background: var(--card); border-radius: 6px; cursor: pointer; color: var(--text);
}
.pager-btn:hover:not([disabled]) { border-color: var(--primary); color: var(--primary); }
.pager-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager-btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ============ 图表 ============ */
.chart-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; }
.chart-box { width: 100%; overflow: hidden; }
.chart-box svg { display: block; width: 100%; height: auto; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--text-sub); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.donut-legend { display: flex; flex-direction: column; gap: 9px; font-size: 12.5px; }
.donut-legend .dl-item { display: flex; align-items: center; gap: 8px; }
.donut-legend .dl-item i { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 9px; }
.donut-legend .dl-item .dl-name { flex: 1; color: var(--text-sub); }
.donut-legend .dl-item .dl-val { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ============ 实时列表 ============ */
.mini-list { display: flex; flex-direction: column; }
.mini-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 0;
    border-bottom: 1px solid var(--border-light); font-size: 12.5px;
}
.mini-item:last-child { border-bottom: 0; }
.mini-item .mi-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-item .mi-time { color: var(--text-weak); font-size: 11.5px; white-space: nowrap; }
.mini-item .mi-amount { font-weight: 650; color: var(--text); }
.three-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ============ 弹窗 / 抽屉 ============ */
.overlay {
    position: fixed; inset: 0; background: rgba(15, 20, 30, .48);
    z-index: 100; display: flex; align-items: center; justify-content: center;
    animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(14px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideIn { from { transform: translateX(30px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.modal {
    background: var(--card); border-radius: 12px; box-shadow: var(--shadow-lg);
    width: 520px; max-width: calc(100vw - 32px); max-height: calc(100vh - 80px);
    display: flex; flex-direction: column; animation: slideUp .18s ease;
}
.modal.wide { width: 720px; }
.modal-head {
    display: flex; align-items: center; padding: 18px 22px 14px;
    border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 650; flex: 1; }
.modal-close {
    cursor: pointer; color: var(--text-weak); font-size: 20px; line-height: 1;
    border: 0; background: transparent; padding: 0 2px;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot {
    padding: 14px 22px; border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 10px;
}
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: 620px; max-width: 100vw;
    background: var(--card); box-shadow: var(--shadow-lg); z-index: 101;
    display: flex; flex-direction: column; animation: slideIn .2s ease;
}
.drawer-head {
    padding: 18px 22px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.drawer-title { font-size: 16px; font-weight: 650; flex: 1; }
.drawer-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ============ 表单 ============ */
.form-row { margin-bottom: 16px; }
.form-row:last-child { margin-bottom: 0; }
.form-label { display: block; font-size: 13px; font-weight: 550; margin-bottom: 7px; }
.form-label .req { color: var(--danger); margin-left: 3px; }
.form-hint { font-size: 11.5px; color: var(--text-weak); margin-top: 5px; line-height: 1.5; }
.form-row > .input, .form-row > .select, .form-row > .textarea { width: 100%; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .form-row.full { grid-column: 1 / -1; }
.radio-group, .check-group { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.radio-item, .check-item { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.radio-item input, .check-item input { accent-color: var(--primary); cursor: pointer; }
.confirm-body { font-size: 13.5px; line-height: 1.75; color: var(--text-sub); }
.confirm-danger { color: var(--danger); font-weight: 600; }
.confirm-box {
    margin-top: 14px; padding: 12px 14px; border-radius: 8px;
    background: var(--danger-soft); color: var(--danger); font-size: 12.5px;
}

/* ============ 详情（抽屉） ============ */
.detail-hero {
    display: flex; gap: 14px; align-items: center; padding-bottom: 18px;
    border-bottom: 1px solid var(--border); margin-bottom: 18px;
}
.detail-hero .avatar { width: 52px; height: 52px; flex: 0 0 52px; font-size: 19px; border-radius: 12px; }
.detail-hero h3 { margin: 0; font-size: 17px; }
.detail-hero .sub { font-size: 12px; color: var(--text-weak); margin-top: 3px; }
.kv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; margin-bottom: 18px; }
.kv { font-size: 12.5px; }
.kv .k { color: var(--text-weak); margin-bottom: 3px; }
.kv .v { font-weight: 550; word-break: break-all; }
.detail-section { margin-top: 22px; }
.detail-section h4 { margin: 0 0 10px; font-size: 14px; }
.detail-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.detail-table th { text-align: left; color: var(--text-weak); font-weight: 500; padding: 7px 8px; border-bottom: 1px solid var(--border); }
.detail-table td { padding: 8px; border-bottom: 1px solid var(--border-light); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============ Toast ============ */
.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 300; }
.toast {
    display: flex; align-items: center; gap: 9px; min-width: 200px; max-width: 460px;
    padding: 11px 16px; border-radius: 9px; background: var(--card);
    border: 1px solid var(--border); box-shadow: var(--shadow-lg);
    font-size: 13px; margin-bottom: 10px; animation: slideUp .2s ease;
}
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warn { border-left: 4px solid var(--warn); }
.toast-info { border-left: 4px solid var(--primary); }

/* ============ 其他 ============ */
.notice-bar {
    display: flex; align-items: center; gap: 10px; padding: 11px 15px;
    border-radius: 8px; background: var(--primary-soft); color: var(--primary);
    font-size: 12.5px; margin-bottom: 18px;
}
.notice-bar.warn { background: var(--warn-soft); color: var(--warn); }
.notice-bar .spacer { flex: 1; }
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.text-sub { color: var(--text-sub); }
.text-weak { color: var(--text-weak); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-primary { color: var(--primary); }
.text-mono { font-family: Consolas, Monaco, monospace; font-size: 12px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.progress { height: 8px; border-radius: 5px; background: var(--border-light); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--primary); border-radius: 5px; transition: width .3s; }
.log-diff { font-size: 12px; line-height: 1.7; }
.log-diff .before { color: var(--danger); background: var(--danger-soft); padding: 1px 5px; border-radius: 4px; }
.log-diff .after { color: var(--success); background: var(--success-soft); padding: 1px 5px; border-radius: 4px; }
.timeline { border-left: 2px solid var(--border); margin-left: 8px; padding-left: 18px; }
.timeline-item { position: relative; padding-bottom: 16px; font-size: 12.5px; }
.timeline-item::before {
    content: ''; position: absolute; left: -24px; top: 5px; width: 9px; height: 9px;
    border-radius: 50%; background: var(--primary); border: 2px solid var(--card);
}
.timeline-item .t { color: var(--text-weak); font-size: 11.5px; }
.banner-preview { display: flex; gap: 10px; flex-wrap: wrap; }
.banner-item {
    width: 190px; height: 82px; border-radius: 8px; padding: 12px;
    color: #fff; display: flex; flex-direction: column; justify-content: space-between;
    font-size: 12px; position: relative;
}
.banner-item b { font-size: 13px; }
.banner-item .x { position: absolute; top: 4px; right: 7px; cursor: pointer; opacity: .8; }
.perm-grid { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.perm-grid th, .perm-grid td { padding: 9px 8px; border: 1px solid var(--border); text-align: center; }
.perm-grid th { background: var(--hover); color: var(--text-sub); font-weight: 600; }
.perm-grid td:first-child { text-align: left; color: var(--text-sub); }
.perm-grid .yes { color: var(--success); font-weight: 700; }
.perm-grid .no { color: var(--text-weak); }
.pill-group { display: inline-flex; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.pill-group button {
    border: 0; background: var(--card); color: var(--text-sub); padding: 6px 13px;
    cursor: pointer; font-size: 12.5px; border-right: 1px solid var(--border);
}
.pill-group button:last-child { border-right: 0; }
.pill-group button.active { background: var(--primary); color: #fff; }

@media (max-width: 1200px) {
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .chart-grid { grid-template-columns: 1fr; }
    .three-cols { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .sidebar { width: 60px; flex: 0 0 60px; }
    .brand-name, .brand-sub, .nav-title, .nav-item span:not(.nav-icon):not(.nav-badge), .sidebar-foot { display: none; }
    .brand { justify-content: center; padding: 16px 0; }
    .nav-item { justify-content: center; padding: 12px 0; margin: 2px 8px; }
    .nav-badge { position: absolute; margin: 0; transform: translate(14px, -12px); }
    .top-search { display: none; }
}
