/* =========================================================
   组件库：按钮 / 表单 / 卡片 / 表格 / 弹层 / 时间线
   ========================================================= */

/* ---------------- 页面标题 ---------------- */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
    position: relative;
}

.page-head::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 68px;
    height: 1px;
    background: var(--amber);
}

.page-head-main { min-width: 0; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 9px;
    letter-spacing: .22em;
    color: var(--text-3);
    text-transform: uppercase;
    margin-bottom: 8px;
}
.eyebrow i {
    width: 16px;
    height: 1px;
    background: var(--amber);
    display: inline-block;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.25;
    color: #F1F5F8;
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.page-title .title-en {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: .2em;
    color: var(--text-4);
    font-weight: 400;
}

.page-desc {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-3);
}

.page-head-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: none;
}

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--line-2);
    border-radius: 3px;
    background: rgba(255, 255, 255, .025);
    color: var(--text-2);
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    transition: all .18s;
    position: relative;
}
.btn [data-lucide] { width: 14px; height: 14px; }
.btn:hover { color: var(--text); border-color: var(--line-3); background: rgba(255, 255, 255, .05); }
.btn:active { transform: translateY(1px); }

.btn.primary {
    background: linear-gradient(135deg, #E7B77C, #C08B4E);
    border-color: rgba(245, 214, 166, .4);
    color: #17110A;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(200, 140, 70, .22);
}
.btn.primary:hover { background: linear-gradient(135deg, #F0C88E, #CE9A5C); color: #100C07; }
.btn.primary [data-lucide] { stroke-width: 2; }

.btn.ghost {
    background: transparent;
    border-color: var(--line-2);
    color: var(--text-2);
}
.btn.ghost:hover { color: var(--amber); border-color: rgba(223, 169, 107, .38); background: var(--amber-soft); }

.btn.danger { color: var(--red); border-color: rgba(228, 121, 121, .28); background: var(--red-soft); }
.btn.danger:hover { background: rgba(228, 121, 121, .2); }

.btn.text { background: none; border: 0; color: var(--amber); padding: 0 4px; height: auto; }
.btn.text:hover { color: var(--amber-2); background: none; }

.btn.sm { height: 28px; padding: 0 10px; font-size: 11px; }
.btn.sm [data-lucide] { width: 12px; height: 12px; }

.btn.lg { height: 40px; padding: 0 20px; font-size: 13px; }

.btn[disabled] { opacity: .45; pointer-events: none; }

.btn-row { display: flex; align-items: center; gap: 7px; }

/* ---------------- 卡片 / 面板 ---------------- */
.panel {
    background:
        linear-gradient(140deg, rgba(255, 255, 255, .035), transparent 42%),
        linear-gradient(180deg, var(--surface), #0E151D);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 22px;
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, var(--amber), transparent);
    opacity: .65;
}

.panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px 11px;
    position: relative;
}

.panel-title {
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: .02em;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title i.dot {
    width: 5px;
    height: 5px;
    background: var(--amber);
    display: inline-block;
    transform: rotate(45deg);
}

.panel-sub { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }

.panel-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.panel-body { padding: 4px 18px 18px; }

.panel.framed { padding: 0; }
.panel.framed .panel-body { padding: 0; }

.panel-index {
    font-family: var(--font-display);
    font-size: 9px;
    letter-spacing: .18em;
    color: var(--text-4);
    border: 1px solid var(--line);
    padding: 1px 5px;
    border-radius: 2px;
}

/* KPI */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.kpi {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .05), transparent 34%),
        linear-gradient(160deg, #121A23, #0D141B);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 14px 16px 12px;
    position: relative;
    overflow: hidden;
    min-height: 108px;
    transition: border-color .2s, transform .2s;
}

.kpi:hover { border-color: rgba(223, 169, 107, .28); transform: translateY(-1px); }

.kpi::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -46px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(223, 169, 107, .1), transparent 68%);
    pointer-events: none;
}

.kpi.c-cyan::after { background: radial-gradient(circle, rgba(104, 195, 204, .11), transparent 68%); }
.kpi.c-green::after { background: radial-gradient(circle, rgba(107, 199, 154, .1), transparent 68%); }
.kpi.c-red::after { background: radial-gradient(circle, rgba(228, 121, 121, .1), transparent 68%); }

.kpi-top {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-3);
    font-size: 11px;
    letter-spacing: .04em;
}
.kpi-top [data-lucide] { width: 13px; height: 13px; margin-left: auto; opacity: .65; }

.kpi-value {
    font-family: var(--font-display);
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: .01em;
    color: #F3F6F8;
    margin: 6px 0 2px;
    display: flex;
    align-items: baseline;
    gap: 5px;
}
.kpi-value small { font-size: 11px; color: var(--text-3); font-weight: 400; font-family: var(--font); }
.kpi-value em { font-style: normal; color: var(--amber); }

.kpi-foot {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    color: var(--text-3);
}

.trend { font-family: var(--font-display); font-size: 10px; letter-spacing: .04em; }
.trend.up { color: var(--green); }
.trend.down { color: var(--red); }
.trend.flat { color: var(--text-3); }

/* ---------------- 表单 ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 11px; color: var(--text-2); letter-spacing: .02em; display: flex; align-items: center; gap: 5px; }
.field > span em { color: var(--red); font-style: normal; }
.field .hint { font-size: 10px; color: var(--text-4); }

.input, .select, .textarea {
    width: 100%;
    height: 34px;
    background: rgba(255, 255, 255, .025);
    border: 1px solid var(--line-2);
    border-radius: 3px;
    padding: 0 10px;
    color: var(--text);
    font-size: 12px;
    outline: none;
    transition: all .18s;
    -webkit-appearance: none;
    appearance: none;
}

.textarea { height: auto; min-height: 76px; padding: 8px 10px; resize: vertical; line-height: 1.6; }

.input::placeholder, .textarea::placeholder { color: var(--text-4); }

.input:focus, .select:focus, .textarea:focus {
    border-color: rgba(223, 169, 107, .55);
    background: rgba(223, 169, 107, .045);
    box-shadow: 0 0 0 3px rgba(223, 169, 107, .07);
}

.input:disabled, .select:disabled { opacity: .55; cursor: not-allowed; }

.select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2374858F' stroke-width='1.2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    cursor: pointer;
}
.select option { background: #121A23; color: var(--text); }

.input[type="date"], .input[type="datetime-local"] { color-scheme: dark; }
.input[type="color"] { padding: 3px; height: 34px; cursor: pointer; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-span-2 { grid-column: span 2; }
.form-span-all { grid-column: 1 / -1; }

.form-section {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10.5px;
    letter-spacing: .16em;
    color: var(--text-3);
    font-family: var(--font-display);
    margin-top: 4px;
}
.form-section::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; color: var(--text-2); }
.switch input { display: none; }
.switch i {
    width: 34px;
    height: 18px;
    border-radius: 10px;
    background: var(--surface-4);
    position: relative;
    transition: background .2s;
}
.switch i::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #8A99A5;
    transition: all .2s;
}
.switch input:checked + i { background: rgba(223, 169, 107, .35); }
.switch input:checked + i::after { left: 18px; background: var(--amber); }

/* ---------------- 工具栏 ---------------- */
.toolbar {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .018);
}

.toolbar .search-box {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line-2);
    border-radius: 3px;
    background: rgba(0, 0, 0, .16);
    min-width: 220px;
}
.toolbar .search-box [data-lucide] { width: 13px; height: 13px; color: var(--text-3); }
.toolbar .search-box input { background: none; border: 0; outline: none; font-size: 12px; width: 100%; }

.toolbar .select { width: auto; min-width: 126px; height: 32px; font-size: 11.5px; }
.toolbar .input { width: auto; height: 32px; font-size: 11.5px; }
.toolbar-spacer { flex: 1; }

.seg {
    display: inline-flex;
    border: 1px solid var(--line-2);
    border-radius: 3px;
    overflow: hidden;
    height: 32px;
}
.seg button {
    background: none;
    border: 0;
    padding: 0 11px;
    font-size: 11px;
    color: var(--text-3);
    border-right: 1px solid var(--line);
    transition: all .18s;
}
.seg button:last-child { border-right: 0; }
.seg button.is-active { background: var(--amber-soft); color: var(--amber-2); }
.seg button:hover { color: var(--text); }

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 9px;
    border: 1px solid rgba(223, 169, 107, .25);
    background: var(--amber-soft);
    color: var(--amber-2);
    border-radius: 2px;
    font-size: 10.5px;
}
.filter-chip button { background: none; border: 0; color: inherit; display: grid; place-items: center; padding: 0; }
.filter-chip [data-lucide] { width: 11px; height: 11px; }

/* ---------------- 表格 ---------------- */
.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255, 255, 255, .015), transparent 120px);
}

table.dt {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    min-width: 760px;
}

table.dt thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #101821;
    text-align: left;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .12em;
    color: var(--text-3);
    padding: 11px 14px;
    border-bottom: 1px solid var(--line-2);
    white-space: nowrap;
    text-transform: uppercase;
}

table.dt tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(154, 177, 193, .07);
    color: var(--text-2);
    vertical-align: middle;
}

table.dt tbody tr { transition: background .16s; position: relative; }
table.dt tbody tr:hover { background: rgba(223, 169, 107, .035); }
table.dt tbody tr.is-clickable { cursor: pointer; }
table.dt tbody tr:last-child td { border-bottom: 0; }

table.dt td.num, table.dt th.num { text-align: right; font-family: var(--font-display); font-variant-numeric: tabular-nums; }
table.dt td.mono { font-family: "Cascadia Mono", Consolas, monospace; font-size: 11px; letter-spacing: .02em; }

.cell-main { display: flex; flex-direction: column; gap: 2px; }
.cell-main strong { font-weight: 500; color: var(--text); font-size: 12px; }
.cell-main span { font-size: 10.5px; color: var(--text-3); }

.link-name {
    color: var(--amber-2);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: border-color .16s, color .16s;
}
.link-name:hover { color: #fff; border-bottom-color: rgba(223, 169, 107, .55); }

.row-actions { display: flex; align-items: center; gap: 3px; }
.row-actions .btn { height: 26px; padding: 0 8px; font-size: 10.5px; border-color: transparent; background: transparent; color: var(--text-3); }
.row-actions .btn:hover { color: var(--amber); background: var(--amber-soft); border-color: rgba(223, 169, 107, .2); }
.row-actions .btn.danger:hover { color: var(--red); background: var(--red-soft); }

.table-empty { padding: 46px 20px; }
.table-loading { padding: 30px; }

/* ---------------- 状态 / 标签 ---------------- */
.status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 20px;
    padding: 0 7px;
    border-radius: 2px;
    font-size: 10px;
    letter-spacing: .03em;
    border: 1px solid;
    white-space: nowrap;
}
.status::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.status.is-success { color: #8BD9B0; background: rgba(107, 199, 154, .09); border-color: rgba(107, 199, 154, .22); }
.status.is-info { color: #8FC0E8; background: rgba(125, 169, 218, .09); border-color: rgba(125, 169, 218, .22); }
.status.is-warn { color: #EFC98B; background: rgba(230, 184, 106, .1); border-color: rgba(230, 184, 106, .25); }
.status.is-danger { color: #F09A9A; background: rgba(228, 121, 121, .1); border-color: rgba(228, 121, 121, .25); }
.status.is-muted { color: #93A3AF; background: rgba(154, 177, 193, .07); border-color: rgba(154, 177, 193, .18); }
.status.is-purple { color: #BFAFEF; background: rgba(169, 154, 224, .1); border-color: rgba(169, 154, 224, .24); }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 20px;
    padding: 0 6px;
    border: 1px solid var(--line-2);
    border-radius: 2px;
    color: var(--text-3);
    font-size: 9.5px;
    letter-spacing: .04em;
    white-space: nowrap;
}
.tag.amber { color: var(--amber); border-color: rgba(223, 169, 107, .3); background: var(--amber-soft); }
.tag.cyan { color: var(--cyan); border-color: rgba(104, 195, 204, .3); background: var(--cyan-soft); }
.tag.red { color: var(--red); border-color: rgba(228, 121, 121, .3); background: var(--red-soft); }

.priority-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}
.p-emergency { background: var(--red); box-shadow: 0 0 8px rgba(228, 121, 121, .6); }
.p-high { background: var(--warning); }
.p-mid { background: var(--blue); }
.p-low { background: var(--text-3); }

/* ---------------- 进度条 ---------------- */
.bar {
    height: 5px;
    border-radius: 3px;
    background: rgba(154, 177, 193, .1);
    overflow: hidden;
    position: relative;
    min-width: 60px;
}
.bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #B98045, #E7B77C);
    position: relative;
    transition: width .5s ease;
}
.bar-fill.green { background: linear-gradient(90deg, #3E9A72, #6BC79A); }
.bar-fill.red { background: linear-gradient(90deg, #A44747, #E47979); }
.bar-fill.cyan { background: linear-gradient(90deg, #3E8890, #68C3CC); }

.bar-row { display: flex; align-items: center; gap: 9px; }
.bar-row .bar { flex: 1; }
.bar-row .num { font-size: 10px; color: var(--text-3); width: 34px; text-align: right; }

/* ---------------- 弹层 ---------------- */
.overlay-root { position: relative; z-index: 900; }

.modal-layer, .drawer-layer {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 900;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 7, 10, .72);
    backdrop-filter: blur(4px);
    animation: fadeIn .2s ease;
}

.modal {
    position: relative;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .045), transparent 30%),
        linear-gradient(180deg, #121A23, #0C1218);
    border: 1px solid var(--line-2);
    border-radius: 5px;
    box-shadow: var(--shadow-lg);
    width: 680px;
    max-width: 100%;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    animation: modalIn .24s cubic-bezier(.2, .8, .2, 1);
    overflow: hidden;
}

.modal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, var(--amber), transparent);
    z-index: 2;
}

.modal.sm { width: 440px; }
.modal.lg { width: 880px; }
.modal.xl { width: 1080px; }
.modal.full { width: 1180px; }

.modal-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--line);
    flex: none;
}

.modal-head-main { min-width: 0; }
.modal-eyebrow {
    font-family: var(--font-display);
    font-size: 8.5px;
    letter-spacing: .2em;
    color: var(--amber);
    margin-bottom: 3px;
}
.modal-title { font-size: 16px; font-weight: 600; letter-spacing: .02em; color: var(--text); }
.modal-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.modal-close {
    margin-left: auto;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--text-3);
    flex: none;
    transition: all .18s;
}
.modal-close:hover { color: var(--red); border-color: rgba(228, 121, 121, .35); background: var(--red-soft); }
.modal-close [data-lucide] { width: 14px; height: 14px; }

.modal-body {
    padding: 18px 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 13px 20px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, .18);
    flex: none;
}
.modal-foot .foot-left { margin-right: auto; display: flex; align-items: center; gap: 8px; }

/* 抽屉 */
.drawer-layer { align-items: stretch; justify-content: flex-end; padding: 0; }
.drawer {
    position: relative;
    width: 620px;
    max-width: 100%;
    height: 100vh;
    background: linear-gradient(180deg, #111923, #0B1117);
    border-left: 1px solid var(--line-2);
    box-shadow: -30px 0 80px rgba(0, 0, 0, .5);
    display: flex;
    flex-direction: column;
    animation: drawerIn .28s cubic-bezier(.2, .8, .2, 1);
}
.drawer.wide { width: 760px; }
.drawer::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 140px;
    background: linear-gradient(180deg, var(--amber), transparent);
}
.drawer-head {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.drawer-foot { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; background: rgba(0, 0, 0, .16); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes drawerIn { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* ---------------- Tabs ---------------- */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
    overflow-x: auto;
}
.tab {
    background: none;
    border: 0;
    border-bottom: 1px solid transparent;
    padding: 9px 14px 10px;
    color: var(--text-3);
    font-size: 12px;
    white-space: nowrap;
    position: relative;
    transition: color .18s;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--amber-2); }
.tab.is-active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -1px;
    height: 1px;
    background: var(--amber);
}
.tab .count {
    display: inline-block;
    margin-left: 5px;
    font-family: var(--font-display);
    font-size: 9px;
    color: var(--text-4);
}

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeIn .2s ease; }

/* ---------------- 详情 ---------------- */
.detail-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: linear-gradient(120deg, rgba(223, 169, 107, .08), rgba(255, 255, 255, .015) 45%, transparent);
    margin-bottom: 16px;
}
.detail-hero-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(223, 169, 107, .3);
    background: rgba(223, 169, 107, .08);
    color: var(--amber);
    border-radius: 3px;
}
.detail-hero-icon [data-lucide] { width: 22px; height: 22px; }
.detail-hero-main { min-width: 0; }
.detail-hero-main h3 { font-size: 17px; font-weight: 600; letter-spacing: .01em; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.detail-hero-main p { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.detail-hero-side { margin-left: auto; text-align: right; }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 3px;
    overflow: hidden;
}
.detail-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail-item {
    background: #10171F;
    padding: 10px 13px;
    min-width: 0;
}
.detail-item span { display: block; font-size: 10px; color: var(--text-4); margin-bottom: 3px; letter-spacing: .04em; }
.detail-item strong { font-size: 12px; font-weight: 500; color: var(--text); word-break: break-all; }
.detail-item strong.num { font-family: var(--font-display); }
.detail-item.span-2 { grid-column: span 2; }

.section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    letter-spacing: .12em;
    color: var(--text-3);
    font-family: var(--font-display);
    margin: 20px 0 10px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section-title:first-child { margin-top: 0; }

/* ---------------- 时间线 ---------------- */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: linear-gradient(180deg, rgba(223, 169, 107, .5), var(--line), transparent);
}
.timeline-item { position: relative; padding: 0 0 18px 6px; }
.timeline-item::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0F161E;
    border: 1px solid var(--amber);
    box-shadow: 0 0 0 3px rgba(223, 169, 107, .08);
}
.timeline-item.is-done::before { background: var(--amber); }
.timeline-item h4 { font-size: 12px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.timeline-item p { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.timeline-item time {
    font-family: var(--font-display);
    font-size: 9px;
    color: var(--text-4);
    letter-spacing: .06em;
}

/* ---------------- 审批流程 ---------------- */
.flow-rail { display: flex; gap: 0; overflow-x: auto; padding: 4px 0 8px; }
.flow-step { flex: 1; min-width: 130px; position: relative; padding: 0 8px; }
.flow-step::before {
    content: "";
    position: absolute;
    top: 11px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--line-2);
}
.flow-step:first-child::before { left: 50%; }
.flow-step:last-child::before { right: 50%; }
.flow-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    background: #0F161E;
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1;
    margin: 0 auto 8px;
    font-family: var(--font-display);
    font-size: 9px;
    color: var(--text-3);
}
.flow-step.is-done .flow-dot { background: rgba(107, 199, 154, .14); border-color: rgba(107, 199, 154, .5); color: var(--green); }
.flow-step.is-current .flow-dot { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); box-shadow: 0 0 0 4px rgba(223, 169, 107, .07); }
.flow-step.is-rejected .flow-dot { background: var(--red-soft); border-color: rgba(228, 121, 121, .5); color: var(--red); }
.flow-info { text-align: center; }
.flow-info strong { display: block; font-size: 10.5px; font-weight: 500; color: var(--text-2); }
.flow-info span { font-size: 9.5px; color: var(--text-4); }

/* ---------------- 提示 / 空状态 ---------------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: var(--text-3);
    text-align: center;
}
.empty-state [data-lucide] { width: 30px; height: 30px; color: var(--text-4); }
.empty-state h3 { font-size: 14px; color: var(--text-2); font-weight: 500; }
.empty-state p { font-size: 11.5px; max-width: 420px; }
.empty-state.large { min-height: 460px; }
.empty-state.large [data-lucide] { width: 42px; height: 42px; }

.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, .03) 25%, rgba(255, 255, 255, .07) 37%, rgba(255, 255, 255, .03) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 2px;
    height: 12px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------------- Toast ---------------- */
.toast-root {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 260px;
    max-width: 380px;
    padding: 12px 14px;
    background: #121A23;
    border: 1px solid var(--line-2);
    border-left: 2px solid var(--amber);
    border-radius: 3px;
    box-shadow: var(--shadow-md);
    font-size: 12px;
    color: var(--text-2);
    animation: toastIn .25s cubic-bezier(.2, .8, .2, 1);
    pointer-events: auto;
}
.toast [data-lucide] { width: 15px; height: 15px; color: var(--amber); margin-top: 1px; }
.toast.success { border-left-color: var(--green); }
.toast.success [data-lucide] { color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.error [data-lucide] { color: var(--red); }
.toast strong { display: block; color: var(--text); font-size: 12px; font-weight: 500; margin-bottom: 1px; }
.toast span { font-size: 11px; color: var(--text-3); }
.toast.hide { animation: toastOut .2s ease forwards; }

@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* ---------------- 分页 ---------------- */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 4px 2px;
    font-size: 11px;
    color: var(--text-3);
}
.pager-pages { display: flex; align-items: center; gap: 4px; }
.pager-btn {
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    border: 1px solid var(--line);
    background: transparent;
    border-radius: 2px;
    color: var(--text-3);
    font-size: 11px;
    display: grid;
    place-items: center;
    transition: all .16s;
}
.pager-btn:hover { color: var(--text); border-color: var(--line-3); }
.pager-btn.is-active { background: var(--amber-soft); border-color: rgba(223, 169, 107, .4); color: var(--amber-2); }
.pager-btn[disabled] { opacity: .3; pointer-events: none; }
.pager select { background: none; border: 1px solid var(--line); color: var(--text-3); height: 26px; border-radius: 2px; font-size: 10.5px; padding: 0 4px; }

/* ---------------- 杂项 ---------------- */
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.hr-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    letter-spacing: .16em;
    color: var(--text-4);
    font-family: var(--font-display);
    margin: 14px 0;
}
.hr-label::before, .hr-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.callout {
    display: flex;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid rgba(223, 169, 107, .22);
    background: rgba(223, 169, 107, .06);
    border-radius: 3px;
    font-size: 11.5px;
    color: #D9C3A4;
    margin-bottom: 14px;
}
.callout [data-lucide] { width: 15px; height: 15px; color: var(--amber); flex: none; margin-top: 1px; }
.callout.danger { border-color: rgba(228, 121, 121, .22); background: var(--red-soft); color: #E8B4B4; }
.callout.danger [data-lucide] { color: var(--red); }

.stat-inline { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.stat-inline > div { display: flex; align-items: baseline; gap: 6px; }
.stat-inline strong { font-family: var(--font-display); font-size: 20px; color: var(--text); }
.stat-inline span { font-size: 10px; color: var(--text-3); }

@media (max-width: 720px) {
    .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .page-head-actions { width: 100%; }
    .form-grid, .form-grid.three { grid-template-columns: 1fr; }
    .form-span-2 { grid-column: auto; }
    .detail-grid, .detail-grid.three { grid-template-columns: 1fr; }
    .detail-item.span-2 { grid-column: auto; }
    .modal-layer { padding: 12px; }
    .modal { max-height: calc(100vh - 24px); }
}
