/*!
 * 超博AI财报管家 · 租户端样式
 * 设计规范：浅色商务风、主色 #1e5eff、渐变 Hero、卡片圆角 12px
 */

:root {
    --primary: #1e5eff;
    --primary-dark: #1749cc;
    --primary-light: #edf3ff;
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #1a2233;
    --text-2: #64708a;
    --text-3: #9aa4b8;
    --line: #e7ecf5;
    --radius: 12px;
    --ok: #12b76a;
    --warn: #f79009;
    --danger: #f04438;
    --info: #2e90fa;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .04);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

/* ============ 布局 ============ */
.app {
    display: flex;
    min-height: 100vh;
}

.side {
    width: 220px;
    flex: 0 0 220px;
    background: #fff;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.side-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 18px;
    border-bottom: 1px solid var(--line);
}

.side-logo svg {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
}

.side-logo strong {
    display: block;
    font-size: 15px;
    letter-spacing: .3px;
}

.side-logo span {
    display: block;
    font-size: 11px;
    color: var(--text-3);
    margin-top: 1px;
}

.side-nav {
    flex: 1;
    padding: 12px 12px;
    overflow-y: auto;
}

.side-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    color: #4a5773;
    font-size: 13.5px;
    margin-bottom: 2px;
    transition: all .16s;
}

.side-item svg {
    width: 17px;
    height: 17px;
    opacity: .75;
}

.side-item:hover {
    background: #f5f8ff;
    color: var(--primary);
}

.side-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.side-item.active svg {
    opacity: 1;
}

.side-foot {
    padding: 12px;
    border-top: 1px solid var(--line);
}

.quota-box {
    background: linear-gradient(135deg, #f2f6ff 0%, #eaf1ff 100%);
    border-radius: 10px;
    padding: 11px 13px;
    font-size: 12.5px;
    color: #4a5773;
    line-height: 1.9;
}

.quota-box b {
    color: var(--primary);
}

.quota-upgrade {
    display: block;
    margin-top: 8px;
    text-align: center;
    background: var(--primary);
    color: #fff !important;
    border-radius: 8px;
    padding: 7px 0;
    font-size: 12.5px;
    font-weight: 600;
}

.quota-upgrade:hover {
    background: var(--primary-dark);
}

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.crumb {
    font-size: 15px;
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-2);
}

.tenant-tag {
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 12.5px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #5b8bff);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.avatar svg {
    width: 16px;
    height: 16px;
}

.page {
    padding: 20px 22px 44px;
}

/* ============ Hero ============ */
.hero {
    background: linear-gradient(120deg, #1e5eff 0%, #3d7bff 55%, #5a95ff 100%);
    border-radius: 14px;
    padding: 26px 28px;
    color: #fff;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    box-shadow: 0 12px 30px rgba(30, 94, 255, .22);
}

.hero h1 {
    margin: 0 0 8px;
    font-size: 22px;
    letter-spacing: .4px;
}

.hero p {
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: 13.5px;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero .btn {
    height: 38px;
    padding: 0 18px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .34);
    color: #fff;
    display: inline-flex;
    align-items: center;
    font-size: 13.5px;
    cursor: pointer;
    transition: all .16s;
}

.hero .btn:hover {
    background: rgba(255, 255, 255, .26);
}

.hero .btn-primary {
    background: #fff;
    border-color: #fff;
    color: var(--primary);
    font-weight: 600;
}

.hero .btn-primary:hover {
    background: #f2f6ff;
}

/* ============ 卡片 ============ */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.card-title {
    font-size: 15px;
    font-weight: 600;
}

.card-body {
    padding: 18px 20px;
}

.card-body.np {
    padding: 0;
}

/* ============ 统计卡 ============ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.stat {
    background: #fff;
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    border-left: 3px solid var(--primary);
}

.stat-label {
    color: var(--text-2);
    font-size: 13px;
}

.stat-value {
    font-size: 25px;
    font-weight: 700;
    margin-top: 8px;
    letter-spacing: -.5px;
}

.stat-value small {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-2);
    margin-left: 4px;
}

.stat-sub {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 6px;
}

/* ============ 表格 ============ */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-2);
    background: #fafbfe;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.table td {
    padding: 13px 16px;
    border-bottom: 1px solid #f2f5fa;
    font-size: 13.5px;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: #fafcff;
}

.table .empty {
    text-align: center;
    color: var(--text-3);
    padding: 40px 0;
}

/* ============ 徽标与进度 ============ */
.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 12px;
    line-height: 19px;
    background: #f0f2f7;
    color: var(--text-2);
    white-space: nowrap;
    vertical-align: middle;
}

.badge-ok {
    background: #e7f8ef;
    color: #0e9f5c;
}

.badge-warn {
    background: #fef3e2;
    color: #c97706;
}

.badge-danger {
    background: #feeceb;
    color: #d92d20;
}

.badge-info {
    background: var(--primary-light);
    color: var(--primary);
}

.progress {
    height: 6px;
    border-radius: 6px;
    background: #eef1f7;
    overflow: hidden;
    min-width: 90px;
}

.progress-bar {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #3d7bff, var(--primary));
    transition: width .4s;
}

/* ============ 按钮 ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    font-size: 13.5px;
    cursor: pointer;
    transition: all .16s;
    font-family: inherit;
}

.btn:hover {
    border-color: #d3daea;
    background: #fafcff;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-danger {
    background: #fff;
    border-color: #f7c8c4;
    color: var(--danger);
}

.btn-sm {
    height: 30px;
    padding: 0 11px;
    font-size: 12.5px;
    border-radius: 8px;
}

.btn-block {
    width: 100%;
}

.btn[disabled] {
    opacity: .65;
    cursor: not-allowed;
}

/* ============ 表单 ============ */
.form-item {
    margin-bottom: 16px;
}

.form-item label {
    display: block;
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 7px;
}

.form-item .req::after {
    content: " *";
    color: var(--danger);
}

.input,
.select,
.textarea {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: all .16s;
    outline: none;
}

.textarea {
    height: auto;
    min-height: 90px;
    padding: 10px 12px;
    line-height: 1.6;
    resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 94, 255, .12);
}

.form-tip {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ============ 登录 / 注册 ============ */
.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #eef3ff 0%, #f6f9ff 45%, #e9f0ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 18px;
    padding: 38px 36px;
    box-shadow: 0 20px 56px rgba(24, 52, 120, .14);
}

.auth-brand {
    text-align: center;
    margin-bottom: 26px;
}

.auth-brand svg {
    width: 46px;
    height: 46px;
}

.auth-brand h1 {
    font-size: 21px;
    margin: 14px 0 6px;
}

.auth-brand p {
    margin: 0;
    color: var(--text-3);
    font-size: 13px;
}

.auth-foot {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: var(--text-2);
}

/* ============ 弹窗 ============ */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 40, .45);
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-mask.show {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 580px;
    max-height: 88vh;
    overflow: auto;
    box-shadow: 0 24px 60px rgba(16, 24, 40, .28);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    font-weight: 600;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}

.modal-close {
    cursor: pointer;
    color: var(--text-3);
    background: none;
    border: 0;
    font-size: 22px;
    line-height: 1;
}

.modal-body {
    padding: 18px 20px;
}

.modal-foot {
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ============ 筛选条 ============ */
.filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-bar .input,
.filter-bar .select {
    width: auto;
    min-width: 168px;
    height: 36px;
}

/* ============ 复选列表 ============ */
.check-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow: auto;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 13.5px;
}

.check-item small {
    color: var(--text-3);
    margin-left: auto;
}

/* ============ 指标卡 ============ */
.metric-group {
    margin-bottom: 18px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
    gap: 14px;
}

.metric-card {
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 14px 15px;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
}

.metric-card.lv1::before { background: var(--ok); }
.metric-card.lv2::before { background: var(--info); }
.metric-card.lv3::before { background: #b5bccb; }
.metric-card.lv4::before { background: var(--warn); }
.metric-card.lv5::before { background: var(--danger); }

.metric-name {
    font-size: 13px;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.metric-value {
    font-size: 22px;
    font-weight: 700;
    margin-top: 8px;
    letter-spacing: -.4px;
}

.metric-value small {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    margin-left: 3px;
}

.metric-foot {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.up { color: var(--ok); }
.down { color: var(--danger); }

.score-box {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.score-ring {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex: 0 0 108px;
    background: linear-gradient(135deg, #1e5eff, #5a95ff);
}

.score-ring b {
    font-size: 30px;
    line-height: 1;
}

.score-ring span {
    font-size: 11.5px;
    opacity: .86;
    margin-top: 4px;
}

.score-groups {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.score-group {
    min-width: 118px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 13px;
}

.score-group span {
    font-size: 12px;
    color: var(--text-2);
}

.score-group b {
    font-size: 18px;
}

/* ============ 标签页 ============ */
.tabs {
    display: flex;
    gap: 4px;
    background: #f2f5fa;
    padding: 3px;
    border-radius: 10px;
}

.tab {
    padding: 6px 15px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-2);
}

.tab.active {
    background: #fff;
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .08);
}

/* ============ 上传区 ============ */
.upload-box {
    border: 1.5px dashed #cfd9ec;
    border-radius: 12px;
    padding: 26px 20px;
    text-align: center;
    cursor: pointer;
    background: #fbfcff;
    transition: all .16s;
    margin-bottom: 16px;
}

.upload-box:hover,
.upload-box.dragging {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-box svg {
    width: 34px;
    height: 34px;
    color: var(--primary);
    opacity: .8;
}

.upload-title {
    font-size: 14px;
    font-weight: 600;
    margin-top: 10px;
}

.upload-tip {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 6px;
    line-height: 1.7;
}

.upload-file {
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--primary);
    word-break: break-all;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

/* ============ 解析结果 ============ */
.parse-result {
    margin-top: 18px;
    border: 1px solid #cfe6d8;
    background: #f4fcf7;
    border-radius: 11px;
    padding: 15px 17px;
    font-size: 13.5px;
    line-height: 1.9;
    color: #134e33;
}

.parse-result.error {
    border-color: #f7c8c4;
    background: #fdf4f3;
    color: #a5251c;
}

.parse-sheets {
    font-size: 12.5px;
    color: #3f6b55;
    margin-top: 4px;
}

.parse-result.error .parse-sheets {
    color: #a5251c;
}

.parse-tip {
    font-size: 12.5px;
    color: #8a6d3b;
    margin-top: 6px;
}

.card-foot {
    padding: 14px 20px;
    border-top: 1px solid var(--line);
}

/* ============ 分页 ============ */
.pagination {
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.pagination li a,
.pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-2);
    background: #fff;
}

.pagination li.active span {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

.pagination li.disabled span {
    color: var(--text-3);
    background: #f7f9fc;
}

/* ============ 明细页 ============ */
.kv-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px 22px;
}

.kv {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13.5px;
    padding: 7px 0;
    border-bottom: 1px dashed #eef1f7;
}

.kv span {
    color: var(--text-2);
}

.kv b {
    font-weight: 600;
}

.sheet-block {
    margin-bottom: 16px;
}

.sheet-block:last-child {
    margin-bottom: 0;
}

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #fafbfe;
    border-bottom: 1px solid var(--line);
    font-size: 13.5px;
    font-weight: 600;
}

.amount {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.amount.neg {
    color: var(--danger);
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: "";
    width: 3px;
    height: 14px;
    border-radius: 3px;
    background: var(--primary);
}

/* ============ 列表 / 表单补强 ============ */
.row-sub {
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-3);
}

.row-sub-inline {
    margin-left: 6px;
    font-size: 12px;
    color: var(--text-3);
}

.tpl-desc {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 9px;
    background: var(--primary-light);
    color: #2a4a8f;
    font-size: 13px;
    min-height: 20px;
}

.pick-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.pick {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13.5px;
    transition: all .16s;
}

.pick:hover {
    border-color: #c8d7f5;
    background: #fafcff;
}

.pick input {
    accent-color: var(--primary);
}

.pick .pick-main {
    font-weight: 600;
}

.pick em {
    margin-left: auto;
    font-style: normal;
    font-size: 12px;
    color: var(--text-3);
}

.pick-loading {
    grid-column: 1 / -1;
    font-size: 13px;
    color: var(--text-3);
    padding: 8px 2px;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--text-2);
}

/* ============ 报告页 ============ */
.report-head {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
}

.report-meta {
    flex: 1;
    min-width: 320px;
}

.report-summary {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f7f9ff;
    border: 1px solid #e8eeff;
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--text-2);
}

.report-summary b {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
}

.report-summary p {
    margin: 0;
}

.report-layout {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-top: 18px;
}

.report-toc {
    flex: 0 0 220px;
    position: sticky;
    top: 16px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 12px;
    max-height: calc(100vh - 40px);
    overflow: auto;
}

.toc-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
    letter-spacing: .5px;
    padding: 0 8px 8px;
}

.toc-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.4;
}

.toc-item:hover {
    background: #f5f8ff;
    color: var(--primary);
}

.toc-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.toc-item span {
    flex: 1;
}

.toc-item em {
    font-style: normal;
    font-size: 11.5px;
    color: var(--text-3);
}

.report-main {
    flex: 1;
    min-width: 0;
}

.report-main .card {
    margin-bottom: 16px;
}

.report-main .card:last-child {
    margin-bottom: 0;
}

.warn-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.warn-item {
    padding: 9px 13px;
    border-radius: 8px;
    background: #fff8ec;
    border: 1px solid #ffe6c2;
    font-size: 13px;
    color: #8a5a00;
}

/* ============ Markdown 正文 ============ */
.md-body {
    font-size: 14px;
    line-height: 1.85;
    color: #2b3446;
    word-break: break-word;
}

.md-body .md-h1,
.md-body .md-h2,
.md-body .md-h3,
.md-body .md-h4,
.md-body .md-h5,
.md-body .md-h6 {
    margin: 20px 0 10px;
    font-weight: 600;
    line-height: 1.5;
}

.md-body .md-h1 { font-size: 19px; }
.md-body .md-h2 { font-size: 17px; }
.md-body .md-h3 { font-size: 15.5px; }
.md-body .md-h4,
.md-body .md-h5,
.md-body .md-h6 { font-size: 14.5px; }

.md-body > *:first-child {
    margin-top: 0;
}

.md-body .md-p {
    margin: 10px 0;
}

.md-body .md-ul,
.md-body .md-ol {
    margin: 10px 0;
    padding-left: 22px;
}

.md-body .md-ul li,
.md-body .md-ol li {
    margin: 5px 0;
}

.md-body .md-quote {
    margin: 12px 0;
    padding: 10px 14px;
    border-left: 3px solid var(--primary);
    background: #f7f9ff;
    border-radius: 0 8px 8px 0;
    color: var(--text-2);
}

.md-body .md-hr {
    border: none;
    border-top: 1px dashed var(--line);
    margin: 18px 0;
}

.md-body .md-code {
    padding: 1px 6px;
    border-radius: 5px;
    background: #f1f4fa;
    font-size: 12.5px;
    font-family: Consolas, Menlo, monospace;
}

.md-body .md-pre {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 9px;
    background: #1a2233;
    color: #e6ebf5;
    overflow: auto;
    font-size: 12.5px;
}

.md-body .md-table-wrap {
    margin: 12px 0;
    overflow-x: auto;
}

.md-body .md-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.md-body .md-table th,
.md-body .md-table td {
    border: 1px solid var(--line);
    padding: 8px 11px;
    text-align: left;
}

.md-body .md-table th {
    background: #f7f9fd;
    font-weight: 600;
    white-space: nowrap;
}

.md-body .md-table .md-td-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 1080px) {
    .report-layout {
        flex-direction: column;
    }

    .report-toc {
        position: static;
        flex: none;
        width: 100%;
        max-height: none;
    }
}

/* ============ Toast ============ */
.ms-toast-box {
    position: fixed;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.ms-toast {
    background: #1a2233;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13.5px;
    box-shadow: 0 10px 28px rgba(16, 24, 40, .24);
    transition: all .24s;
    max-width: 420px;
}

.ms-toast-out {
    opacity: 0;
    transform: translateY(-10px);
}

.ms-toast-success {
    background: #0e9f5c;
}

.ms-toast-error {
    background: #d92d20;
}

.ms-spin {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ms-spin .7s linear infinite;
    margin-right: 6px;
    vertical-align: -1px;
}

@keyframes ms-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============ 列表补强：分页 / 空态 / 等宽 / 表单栅格 ============ */
.pager {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--line);
}

.pager-info {
    margin-right: auto;
    font-size: 12.5px;
    color: var(--text-3);
}

.empty-box {
    text-align: center;
    color: var(--text-3);
    padding: 40px 0;
    font-size: 13px;
}

.mono {
    font-family: Consolas, Menlo, monospace;
    font-size: 12.5px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 16px;
}

.form-tip {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.6;
}

/* ============ 成员管理 ============ */
.member-role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.member-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7aa5ff);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    vertical-align: middle;
}

.member-cell {
    display: flex;
    align-items: center;
}

.member-cell em {
    font-style: normal;
    font-size: 12px;
    color: var(--text-3);
    margin-left: 8px;
}

.pick-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px 14px;
    max-height: 190px;
    overflow: auto;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fafbff;
}

.pick-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-2);
}

.pick-item input {
    width: 15px;
    height: 15px;
}

@media (max-width: 860px) {
    .side {
        width: 62px;
        flex: 0 0 62px;
    }

    .side-logo strong,
    .side-logo span,
    .side-item span,
    .quota-box {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}
