/* ============================================================
   组件层
   ============================================================ */

/* 图标基础：全部使用本地 Lucide 描边图标 */
.ico {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
    vertical-align: -0.15em;
}
.caret { width: 14px; height: 14px; opacity: .6; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 36px; padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fffdf8;
    color: #3c4c44;
    font-size: 12.5px; font-weight: 600;
    white-space: nowrap;
    transition: .17s;
    box-shadow: 0 1px 1px rgba(16, 42, 32, .03);
}
.btn .ico { width: 15px; height: 15px; }
.btn:hover { border-color: #c9c2b1; background: #fff; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: none; }
.btn-primary {
    background: linear-gradient(135deg, #1e7c51, #14603f);
    border-color: #14603f; color: #fff;
    box-shadow: 0 6px 16px rgba(20, 96, 63, .2), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.btn-primary:hover { background: linear-gradient(135deg, #248b5b, #176b47); border-color: #176b47; color: #fff; }
.btn-gold {
    background: linear-gradient(135deg, #d8b464, #bf9539);
    border-color: #b98f33; color: #3a2b09;
    box-shadow: 0 6px 16px rgba(191, 149, 57, .22);
}
.btn-gold:hover { color: #3a2b09; border-color: #a98127; }
.btn-soft { background: var(--leaf-soft); border-color: #cfe4d7; color: #176b47; }
.btn-soft:hover { background: #dff0e6; border-color: #b8d8c4; }
.btn-danger { color: var(--danger); border-color: #eed6d1; background: #fffaf9; }
.btn-danger:hover { background: var(--danger-soft); border-color: #e4bdb5; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn-ghost:hover { background: rgba(15, 46, 36, .05); border-color: transparent; box-shadow: none; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }
.btn-sm .ico { width: 13px; height: 13px; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-group { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- 指标卡 ---------- */
.metric-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.metric {
    position: relative;
    padding: 15px 16px 14px;
    border-radius: var(--r);
    background: linear-gradient(180deg, #fffdf8, #fdfbf4);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.metric::after {
    content: "";
    position: absolute; right: -16px; bottom: -22px;
    width: 80px; height: 80px; border-radius: 50%;
    background: radial-gradient(circle, rgba(29, 122, 80, .08), transparent 68%);
}
.metric .m-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11.5px; }
.metric .m-ico {
    width: 26px; height: 26px; border-radius: 8px;
    display: grid; place-items: center;
    background: var(--leaf-soft); color: var(--leaf);
}
.metric .m-ico .ico { width: 14px; height: 14px; }
.metric .m-value {
    margin-top: 10px;
    font-size: 25px; font-weight: 750; letter-spacing: -.8px;
    color: var(--ink); font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.metric .m-value small { font-size: 11px; font-weight: 600; color: var(--muted-2); margin-left: 4px; letter-spacing: 0; }
.metric .m-foot { margin-top: 7px; font-size: 10.5px; color: var(--muted-2); display: flex; align-items: center; gap: 5px; }
.metric .m-foot .up { color: var(--leaf); }
.metric .m-foot .down { color: var(--danger); }
.metric.gold .m-ico { background: var(--gold-soft); color: #a8802c; }
.metric.gold::after { background: radial-gradient(circle, rgba(199, 160, 74, .12), transparent 68%); }
.metric.blue .m-ico { background: var(--info-soft); color: var(--info); }
.metric.red .m-ico { background: var(--danger-soft); color: var(--danger); }
.metric.red::after { background: radial-gradient(circle, rgba(184, 73, 58, .09), transparent 68%); }
.metric.violet .m-ico { background: var(--violet-soft); color: var(--violet); }

/* ---------- 面板 / 卡片 ---------- */
.panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.panel-head {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px 14px;
    border-bottom: 1px solid #eee9dc;
}
.panel-head .ph-title { font-size: 13.5px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.panel-head .ph-title .ico { width: 16px; height: 16px; color: var(--leaf); }
.panel-head .ph-sub { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
.panel-head .ph-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.panel-body { padding: 18px; }
.panel-body.tight { padding: 0; }

/* ---------- 工具栏 ---------- */
.page-tools {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: rgba(255, 253, 248, .78);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 1px 1px rgba(18, 45, 34, .03);
    flex-wrap: wrap;
}
.tool-search {
    display: flex; align-items: center; gap: 8px;
    height: 34px; padding: 0 11px;
    min-width: 230px;
    border: 1px solid var(--line); border-radius: 8px;
    background: #fff; transition: .18s;
}
.tool-search:focus-within { border-color: #a9c8b5; box-shadow: 0 0 0 3px rgba(29, 122, 80, .07); }
.tool-search .ico { width: 14px; height: 14px; color: var(--muted-2); }
.tool-search input { border: 0; outline: none; width: 100%; font-size: 12.5px; background: transparent; }
.tool-search input::placeholder { color: #ada796; }
.tool-divider { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }
.tool-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.filter-select {
    height: 34px; padding: 0 28px 0 10px;
    border: 1px solid var(--line); border-radius: 8px;
    background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2396a19a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center;
    -webkit-appearance: none; appearance: none;
    font-size: 12px; color: #4c5c54; min-width: 104px;
    transition: .18s;
}
.filter-select:hover { border-color: #c9c2b1; }
.filter-select:focus { outline: none; border-color: #a9c8b5; box-shadow: 0 0 0 3px rgba(29, 122, 80, .07); }
.date-range { display: flex; align-items: center; gap: 5px; }
.date-range input[type=date] {
    height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px;
    background: #fff; font-size: 11.5px; color: #4c5c54; outline: none;
}
.date-range input[type=date]:focus { border-color: #a9c8b5; }
.view-toggle {
    display: flex; padding: 3px; border-radius: 8px;
    background: var(--cream-2); border: 1px solid #e3ddce;
}
.view-toggle button {
    border: 0; background: none; width: 30px; height: 26px;
    display: grid; place-items: center; border-radius: 6px;
    color: #8b948d; transition: .15s;
}
.view-toggle button .ico { width: 14px; height: 14px; }
.view-toggle button.active { background: #fff; color: var(--leaf); box-shadow: 0 1px 3px rgba(20, 45, 34, .12); }

/* ---------- 状态胶囊 ---------- */
.pill {
    display: inline-flex; align-items: center; gap: 5px;
    height: 22px; padding: 0 8px;
    border-radius: 6px; font-size: 10.5px; font-weight: 600;
    white-space: nowrap; letter-spacing: .2px;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.green { background: #e8f4ec; color: #1a7248; }
.pill.amber { background: #fbf2df; color: #a06a14; }
.pill.red { background: #fbece9; color: #ac4031; }
.pill.blue { background: #eaf3f8; color: #2a6b8a; }
.pill.gray { background: #f0eee7; color: #7d857e; }
.pill.slate { background: #eef0ef; color: #5f6c65; }
.pill.violet { background: #f1eef9; color: #64539a; }
.pill.no-dot::before { display: none; }

/* ---------- 数据表 ---------- */
.table-wrap { overflow-x: auto; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table th {
    text-align: left; padding: 10px 14px;
    background: #f9f6ee;
    color: #7d877f;
    font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
    position: sticky; top: 0; z-index: 2;
}
.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0ebdf;
    font-size: 12.5px; color: #3b4a43;
    vertical-align: middle;
    white-space: nowrap;
}
.data-table tbody tr { transition: .13s; }
.data-table tbody tr:hover { background: #fbfaf3; }
.data-table tbody tr:hover .cell-main { color: var(--leaf); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .cell-main { font-weight: 650; color: var(--ink-2); cursor: pointer; transition: .14s; }
.data-table .cell-main:hover { color: var(--leaf); text-decoration: underline; text-underline-offset: 3px; }
.data-table .cell-sub { display: block; font-size: 10px; color: var(--muted-2); font-weight: 400; margin-top: 2px; }
.data-table .cell-code { font-family: var(--mono); font-size: 11px; color: #67746c; letter-spacing: -.2px; }
.data-table .num { font-variant-numeric: tabular-nums; font-weight: 600; color: #2d3f36; }
.data-table .money { font-variant-numeric: tabular-nums; font-weight: 700; color: #1f6045; }
.data-table .ops { display: flex; align-items: center; gap: 3px; }
.data-table th.col-ops, .data-table td.col-ops { text-align: right; position: sticky; right: 0; background: inherit; }
.data-table td.col-ops { background: #fffdf8; }
.data-table tbody tr:hover td.col-ops { background: #fbfaf3; }
.op-btn {
    width: 27px; height: 27px; border-radius: 7px; border: 1px solid transparent;
    background: transparent; display: inline-grid; place-items: center;
    color: #8d968f; transition: .15s;
}
.op-btn .ico { width: 14px; height: 14px; }
.op-btn:hover { background: var(--leaf-soft); color: var(--leaf); border-color: #d5e6da; }
.op-btn.danger:hover { background: var(--danger-soft); color: var(--danger); border-color: #f0d6d1; }
.op-btn.gold:hover { background: var(--gold-soft); color: #a8802c; border-color: #eeddb6; }

/* ---------- 卡片网格 ---------- */
.entity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(296px, 1fr)); gap: 13px; }
.entity-card {
    position: relative;
    padding: 16px 16px 13px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-sm);
    transition: .2s;
    overflow: hidden;
    display: flex; flex-direction: column;
}
.entity-card::before {
    content: "";
    position: absolute; inset: 0 auto 0 0; width: 3px;
    background: linear-gradient(180deg, rgba(29, 122, 80, .7), rgba(199, 160, 74, .55));
    opacity: 0; transition: .2s;
}
.entity-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #d9d2bf; }
.entity-card:hover::before { opacity: 1; }
.ec-top { display: flex; align-items: flex-start; gap: 10px; }
.ec-avatar {
    width: 36px; height: 36px; border-radius: 10px; flex: none;
    display: grid; place-items: center;
    background: linear-gradient(150deg, #eaf4ed, #dceade);
    color: #1d7a50; font-size: 12px; font-weight: 700;
    border: 1px solid #dfeadf;
}
.ec-avatar.gold { background: linear-gradient(150deg, #fbf1da, #f4e6c4); color: #9b7524; border-color: #efe0bb; }
.ec-title { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.35; cursor: pointer; }
.ec-title:hover { color: var(--leaf); }
.ec-sub { font-size: 10px; color: var(--muted-2); font-family: var(--mono); margin-top: 3px; }
.ec-tags { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ec-stats { display: flex; gap: 18px; margin: 13px 0 11px; padding: 10px 0; border-top: 1px dashed #ece6d8; border-bottom: 1px dashed #ece6d8; }
.ec-stat b { display: block; font-size: 17px; font-weight: 750; color: var(--ink); letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.ec-stat b small { font-size: 9px; color: var(--muted-2); font-weight: 500; margin-left: 2px; letter-spacing: 0; }
.ec-stat span { font-size: 9.5px; color: var(--muted-2); display: block; margin-top: 2px; letter-spacing: .4px; }
.ec-body { display: list-item; font-size: 11px; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }
.ec-body span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; padding-top: 9px; border-top: 1px solid #f4efe3; }
.ec-foot .btn { height: 27px; font-size: 10.5px; padding: 0 9px; border-radius: 6px; }
.ec-foot .dot-sep { color: #d5cebd; }

/* ---------- 分页 ---------- */
.list-foot {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 16px; border-top: 1px solid #f0ebdf;
    font-size: 11.5px; color: var(--muted);
    flex-wrap: wrap;
}
.list-foot .lf-info b { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pager { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.pager button {
    min-width: 30px; height: 30px; padding: 0 8px;
    border: 1px solid var(--line); background: #fff; border-radius: 7px;
    font-size: 11.5px; color: #56645c; transition: .15s;
}
.pager button:hover:not(:disabled) { border-color: #b7cdbf; color: var(--leaf); }
.pager button.active { background: var(--forest); border-color: var(--forest); color: #fff; font-weight: 600; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager .ellipsis { padding: 0 4px; color: var(--muted-2); }

/* ---------- 空态 / 加载 ---------- */
.empty-state { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty-ico {
    width: 58px; height: 58px; margin: 0 auto 14px;
    border-radius: 18px; display: grid; place-items: center;
    background: linear-gradient(150deg, #f2efe3, #eae5d6);
    color: #9aa59d;
    border: 1px solid #e4ddcd;
}
.empty-ico .ico { width: 25px; height: 25px; }
.empty-state h3 { font-size: 14px; color: var(--ink-2); margin-bottom: 5px; }
.empty-state p { font-size: 12px; color: var(--muted-2); }
.skeleton { background: linear-gradient(90deg, #f1ede2 25%, #f8f5ec 37%, #f1ede2 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 6px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.loading-line { height: 3px; background: linear-gradient(90deg, transparent, var(--leaf), transparent); background-size: 40% 100%; animation: sweep 1.1s infinite; }
@keyframes sweep { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px 16px; }
.form-field { grid-column: span 2; min-width: 0; }
.form-field.span-2 { grid-column: span 4; }
.form-field.span-3 { grid-column: span 6; }
.form-field.full { grid-column: span 6; }
.form-field label { display: flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: #4c5c54; margin-bottom: 6px; }
.form-field label em { color: var(--danger); font-style: normal; }
.form-field .hint { font-size: 10px; color: var(--muted-2); margin-top: 5px; line-height: 1.5; }
.input, .textarea, .select-input {
    width: 100%; height: 37px; padding: 0 11px;
    border: 1px solid var(--line); border-radius: 8px;
    background: #fff; font-size: 12.5px; color: var(--text);
    outline: none; transition: .16s;
}
.textarea { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; line-height: 1.6; }
.input:focus, .textarea:focus, .select-input:focus { border-color: #93bfa5; box-shadow: 0 0 0 3px rgba(29, 122, 80, .07); }
.input:disabled, .input[readonly] { background: #f7f4eb; color: #7d877f; }
.input::placeholder, .textarea::placeholder { color: #b8b2a3; }
.select-input {
    -webkit-appearance: none; appearance: none;
    background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2396a19a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
    padding-right: 30px;
}
.input-group { display: flex; }
.input-group .input { border-radius: 8px 0 0 8px; }
.input-group .unit {
    display: flex; align-items: center; padding: 0 11px;
    border: 1px solid var(--line); border-left: 0; border-radius: 0 8px 8px 0;
    background: #f8f5ec; font-size: 11px; color: var(--muted);
    white-space: nowrap;
}
.check-row { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #4c5c54; }
.check-row input { accent-color: var(--leaf); width: 14px; height: 14px; }

/* ---------- 弹窗 ---------- */
.overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(10, 28, 22, .38);
    backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    opacity: 0; pointer-events: none; transition: .22s;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.modal {
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    display: flex; flex-direction: column;
    background: var(--paper);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .5);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: translateY(14px) scale(.985);
    opacity: 0;
    transition: .26s cubic-bezier(.2, .8, .3, 1);
}
.overlay.show .modal { transform: none; opacity: 1; }
.modal.wide { width: min(980px, 100%); }
.modal.narrow { width: min(560px, 100%); }
.modal-head {
    position: relative;
    padding: 18px 22px 16px;
    border-bottom: 1px solid #ece6d8;
    background:
        radial-gradient(420px 120px at 100% 0, rgba(199, 160, 74, .13), transparent 70%),
        linear-gradient(180deg, #fffdf8, #fdfbf4);
    display: flex; align-items: flex-start; gap: 12px;
}
.modal-head::after {
    content: ""; position: absolute; left: 22px; bottom: -1px; width: 54px; height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 2px;
}
.modal-head .mh-ico {
    width: 36px; height: 36px; border-radius: 10px; flex: none;
    display: grid; place-items: center;
    background: linear-gradient(150deg, #e8f3ec, #d9ebdf);
    color: var(--leaf); border: 1px solid #d2e6d9;
}
.modal-head .mh-ico .ico { width: 17px; height: 17px; }
.modal-head h3 { font-size: 15.5px; font-weight: 700; color: var(--ink); letter-spacing: -.2px; }
.modal-head p { font-size: 11px; color: var(--muted-2); margin-top: 4px; line-height: 1.5; }
.modal-head .x-btn { margin-left: auto; }
.x-btn {
    width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent;
    background: transparent; display: grid; place-items: center; color: #9aa39c;
    transition: .15s; flex: none;
}
.x-btn:hover { background: #f4f0e5; color: var(--ink); border-color: #e9e3d5; }
.x-btn .ico { width: 15px; height: 15px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot {
    display: flex; align-items: center; justify-content: flex-end; gap: 9px;
    padding: 13px 22px; border-top: 1px solid #ece6d8;
    background: #fcfaf3;
}
.modal-foot .left { margin-right: auto; font-size: 10.5px; color: var(--muted-2); }

/* ---------- 抽屉 ---------- */
.drawer-overlay {
    position: fixed; inset: 0; z-index: 110;
    background: rgba(10, 28, 22, .32);
    backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: .24s;
}
.drawer-overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 111;
    width: min(720px, 94vw);
    background: var(--paper);
    box-shadow: -24px 0 60px rgba(8, 26, 20, .18);
    transform: translateX(102%);
    transition: transform .32s cubic-bezier(.22, .8, .3, 1);
    display: flex; flex-direction: column;
}
.drawer.show { transform: none; }
.drawer-head {
    padding: 22px 24px 16px;
    border-bottom: 1px solid #ece6d8;
    background:
        radial-gradient(460px 160px at 100% 0, rgba(199, 160, 74, .15), transparent 70%),
        linear-gradient(170deg, #fffdf8, #fbf8ef);
    position: relative;
}
.drawer-head .dh-top { display: flex; align-items: center; gap: 10px; }
.drawer-head .dh-icon {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    background: linear-gradient(150deg, #1e7c51, #135f40); color: #f0e6c9;
    box-shadow: 0 6px 14px rgba(19, 95, 64, .22);
}
.drawer-head .dh-icon .ico { width: 19px; height: 19px; }
.drawer-head h2 { font-size: 18px; font-weight: 750; color: var(--ink); letter-spacing: -.3px; }
.drawer-head .dh-sub { font-size: 11px; color: var(--muted); font-family: var(--mono); margin-top: 3px; }
.drawer-head .dh-tags { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.drawer-head .x-btn { margin-left: auto; align-self: flex-start; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 24px 26px; }
.drawer-foot {
    padding: 12px 24px; border-top: 1px solid #ece6d8; background: #fcfaf3;
    display: flex; align-items: center; gap: 8px;
}
.drawer-foot .right { margin-left: auto; display: flex; gap: 8px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid #ece6d8; margin-bottom: 16px; overflow-x: auto; }
.tabs button {
    border: 0; background: none; padding: 9px 13px 10px;
    font-size: 12px; font-weight: 600; color: var(--muted);
    position: relative; white-space: nowrap; transition: .15s;
}
.tabs button:hover { color: var(--leaf); }
.tabs button.active { color: var(--ink); }
.tabs button.active::after {
    content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--leaf));
    border-radius: 2px;
}
.tab-pane { display: none; animation: pageIn .22s ease; }
.tab-pane.active { display: block; }

/* ---------- 详情字段 ---------- */
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid #efe9db; border-radius: 10px; overflow: hidden; }
.detail-item { padding: 11px 13px; border-bottom: 1px solid #f2ede1; background: #fffdf8; min-width: 0; }
.detail-item:nth-child(odd) { background: #fdfbf4; }
.detail-item label { display: block; font-size: 9.5px; color: var(--muted-2); letter-spacing: .5px; margin-bottom: 4px; }
.detail-item .dv { font-size: 12.5px; color: #2f3f37; font-weight: 550; word-break: break-all; line-height: 1.5; }
.detail-item.full { grid-column: span 2; }
.detail-section-title {
    font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--muted);
    text-transform: uppercase; margin: 18px 0 8px; display: flex; align-items: center; gap: 8px;
}
.detail-section-title::after { content: ""; flex: 1; height: 1px; background: #ece6d8; }

/* ---------- 时间轴 ---------- */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 5px; bottom: 5px; width: 1px; background: linear-gradient(180deg, #d9d2c2, #efeade); }
.tl-item { position: relative; padding: 0 0 17px 14px; }
.tl-item::before {
    content: ""; position: absolute; left: -17px; top: 4px; width: 9px; height: 9px;
    border-radius: 50%; background: #fff; border: 2px solid #c9c2b1;
}
.tl-item.green::before { border-color: var(--leaf); background: var(--leaf-soft); }
.tl-item.red::before { border-color: var(--danger); background: var(--danger-soft); }
.tl-item.blue::before { border-color: var(--info); background: var(--info-soft); }
.tl-item.gold::before { border-color: var(--gold); background: var(--gold-soft); }
.tl-title { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.tl-desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.tl-time { font-size: 10px; color: var(--muted-2); margin-top: 4px; font-family: var(--mono); }

/* ---------- 提示 / Toast ---------- */
.toast-stack { position: fixed; top: 20px; right: 22px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
    display: flex; align-items: flex-start; gap: 9px;
    min-width: 240px; max-width: 360px;
    padding: 11px 14px;
    background: #fffdf8; border: 1px solid var(--line); border-radius: 10px;
    box-shadow: var(--shadow-md);
    font-size: 12.5px; color: var(--text);
    animation: toastIn .26s cubic-bezier(.2, .8, .3, 1);
}
.toast.out { animation: toastOut .2s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(12px); } }
.toast .t-ico { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.toast .t-ico .ico { width: 12px; height: 12px; }
.toast.success .t-ico { background: var(--leaf-soft); color: var(--leaf); }
.toast.error .t-ico { background: var(--danger-soft); color: var(--danger); }
.toast.info .t-ico { background: var(--info-soft); color: var(--info); }
.toast.warn .t-ico { background: var(--warn-soft); color: var(--warn); }
.toast .t-body { flex: 1; line-height: 1.5; }
.toast .t-body b { display: block; font-size: 12px; margin-bottom: 1px; }

/* ---------- 图表容器 ---------- */
.chart-box { width: 100%; position: relative; }
.chart-box svg { display: block; width: 100%; overflow: visible; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.axis-text { font-size: 9px; fill: #a3ada5; font-family: var(--font); }
.grid-line { stroke: #eee9dd; stroke-dasharray: 3 4; }

/* ---------- 分栏 ---------- */
.split { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; }
.split-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1200px) {
    .split { grid-template-columns: 1fr; }
    .split-3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-field, .form-field.span-2, .form-field.span-3, .form-field.full { grid-column: span 1; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-item.full { grid-column: span 1; }
    .metric-strip { grid-template-columns: repeat(2, 1fr); }
    .page-head { flex-wrap: wrap; }
    .page-head .ph-actions { width: 100%; margin-left: 0; }
}
