/* ============================================================
   智星多源 · 通用组件
   ============================================================ */

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 15px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .01em;
    transition: all .2s var(--ease);
    white-space: nowrap;
    user-select: none;
}
.btn .icon { width: 16px; height: 16px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
    background: linear-gradient(118deg, #16b9c9 0%, #3f8df5 55%, #5c74ff 100%);
    color: #fff;
    box-shadow: 0 10px 24px -14px rgba(48, 138, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -14px rgba(48, 138, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primary:active { transform: translateY(0); }
.btn-dark { background: #101d31; color: #eaf3ff; box-shadow: 0 8px 20px -14px rgba(9, 20, 36, .9); }
.btn-dark:hover { background: #182a44; transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--text-2); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: #b9cde4; background: #fbfdff; color: var(--text); transform: translateY(-1px); }
.btn-soft { background: #eef4fd; color: #39608f; }
.btn-soft:hover { background: #e3edfa; }
.btn-danger { background: #fff1f4; color: #d9435f; }
.btn-danger:hover { background: #ffe4ea; }
.btn-link { height: auto; padding: 0; background: none; color: #2b7fe0; font-weight: 500; }
.btn-link:hover { color: #1466c6; text-decoration: underline; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 11.5px; border-radius: 8px; }
.btn-sm .icon { width: 14px; height: 14px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 14px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 30px; padding: 0; }

/* ---------------- 卡片 ---------------- */
.card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    animation: fadeUp .45s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 40ms);
}
.card::after {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(95, 214, 255, .45), rgba(124, 108, 255, .28), transparent);
    opacity: .7;
    pointer-events: none;
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 20px 0;
}
.card-title { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.card-title .icon { color: #5f7899; width: 17px; height: 17px; }
.card-title .sub { font-size: 10.5px; font-weight: 500; color: var(--faint); letter-spacing: .08em; margin-left: 2px; }
.card-desc { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.card-actions { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 16px 20px 20px; }
.card-body.flush { padding: 0; }

.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-14 { margin-bottom: 14px; }

/* ---------------- KPI ---------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi {
    position: relative;
    padding: 17px 18px 15px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    animation: fadeUp .5s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 55ms);
}
.kpi::before {
    content: '';
    position: absolute;
    left: 0; top: 16px; bottom: 16px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--cy, #5fd6ff), var(--cy2, #7c6cff));
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.kpi-label { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; font-weight: 500; }
.kpi-ico {
    width: 30px; height: 30px;
    border-radius: 9px;
    display: grid; place-items: center;
    background: rgba(95, 214, 255, .1);
    color: #2a9dbf;
}
.kpi-ico .icon { width: 16px; height: 16px; }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; gap: 8px; }
.kpi-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; }
.kpi-delta .icon { width: 13px; height: 13px; }
.kpi-delta.up { color: #16a97e; }
.kpi-delta.down { color: #e05270; }
.kpi-note { font-size: 10.5px; color: var(--faint); }
.kpi-spark { position: absolute; right: 0; bottom: 0; width: 116px; height: 46px; opacity: .55; pointer-events: none; }

/* ---------------- 状态 & 标签 ---------------- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 23px;
    padding: 0 8px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .01em;
    background: #eef3fa;
    color: #5c7088;
    white-space: nowrap;
}
.chip::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; }
.chip.no-dot::before { display: none; }
.chip.tone-mint { background: rgba(67, 214, 160, .12); color: #0f9370; }
.chip.tone-rose { background: rgba(255, 107, 138, .12); color: #d84664; }
.chip.tone-amber { background: rgba(255, 182, 92, .16); color: #b17418; }
.chip.tone-iris { background: rgba(124, 108, 255, .12); color: #5b4be0; }
.chip.tone-cyan { background: rgba(47, 217, 200, .12); color: #0e8f85; }
.chip.tone-slate { background: #eff3f9; color: #7b8ba1; }
.chip.outline { background: #fff; border: 1px solid var(--line-strong); color: var(--muted); }

.tag {
    display: inline-flex; align-items: center;
    height: 21px; padding: 0 7px;
    border-radius: 6px;
    background: #f1f5fb;
    color: #6a7c93;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}
.tag.cy { background: rgba(95, 214, 255, .1); color: #2585a3; }
.tag.ir { background: rgba(124, 108, 255, .1); color: #6155c9; }
.tag.am { background: rgba(255, 182, 92, .14); color: #a56912; }

/* ---------------- 表格 ---------------- */
.table-wrap {
    overflow: auto;
    border-radius: var(--r-md);
}
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table th {
    position: sticky; top: 0;
    z-index: 1;
    text-align: left;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8798ad;
    padding: 11px 14px;
    background: #f8fafd;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f8;
    font-size: 12.5px;
    color: var(--text-2);
    vertical-align: middle;
}
.data-table tbody tr { transition: background .16s; }
.data-table tbody tr:hover { background: #f9fcff; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .num { font-variant-numeric: tabular-nums; font-weight: 600; }
.data-table .muted { color: var(--muted); }
.data-table td.actions { text-align: right; white-space: nowrap; }
.row-actions { display: inline-flex; gap: 4px; justify-content: flex-end; }
.row-act {
    width: 27px; height: 27px;
    display: grid; place-items: center;
    border: 0; border-radius: 7px;
    background: transparent; color: #7c8ea6;
    transition: all .16s;
}
.row-act:hover { background: #eaf2fb; color: #2b6da8; }
.row-act.danger:hover { background: #ffedf1; color: #d9435f; }
.row-act .icon { width: 15px; height: 15px; }

.cell-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.name-tile {
    width: 32px; height: 32px;
    border-radius: 9px;
    display: grid; place-items: center;
    background: linear-gradient(145deg, #eef8fb, #e9effb);
    border: 1px solid #e3edf8;
    color: #3a89a8;
    flex: none;
}
.name-tile .icon { width: 16px; height: 16px; }
.name-tile.t-ir { background: linear-gradient(145deg, #f0edff, #eaefff); color: #6a5cd6; }
.name-tile.t-am { background: linear-gradient(145deg, #fff5e6, #fff0e4); color: #b47a23; }
.name-tile.t-ro { background: linear-gradient(145deg, #fff0f3, #ffeef7); color: #cf5474; }
.name-tile.t-mi { background: linear-gradient(145deg, #ebfbf5, #eafaf6); color: #1d9a71; }
.cell-name strong { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.3; }
.cell-name span { display: block; font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.cell-name a:hover strong { color: #1b76c2; }

/* ---------------- 工具栏 ---------------- */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}
.toolbar .spacer { flex: 1; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    height: 36px;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within { border-color: #7dd9e6; box-shadow: 0 0 0 3px rgba(95, 214, 255, .12); }
.search-box .icon { position: absolute; left: 10px; width: 15px; height: 15px; color: #93a4b9; }
.search-box input { width: 100%; height: 100%; border: 0; background: transparent; padding: 0 10px 0 32px; font-size: 12px; outline: none; }
.search-box input::placeholder { color: #a8b5c7; }

.select, .input {
    height: 36px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    padding: 0 11px;
    font-size: 12px;
    color: var(--text-2);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.select { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238393aa' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 9px center; }
.select:focus, .input:focus { border-color: #7dd9e6; box-shadow: 0 0 0 3px rgba(95, 214, 255, .12); }

.filter-sep { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }

/* 分段控件 */
.segmented { display: inline-flex; padding: 3px; background: #f1f5fb; border-radius: 10px; gap: 2px; }
.segmented button {
    height: 28px; padding: 0 11px;
    border: 0; border-radius: 8px;
    background: transparent; color: var(--muted);
    font-size: 11.5px; font-weight: 500;
    transition: all .18s;
}
.segmented button.active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }

/* ---------------- 分页 ---------------- */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 18px;
    border-top: 1px solid var(--line);
}
.pager-info { font-size: 11.5px; color: var(--muted); }
.pager-btns { display: flex; align-items: center; gap: 5px; }
.page-btn {
    min-width: 30px; height: 30px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text-2);
    font-size: 11.5px;
    display: grid; place-items: center;
    transition: all .16s;
}
.page-btn:hover:not(:disabled) { border-color: #9ed9e5; color: #1a8ba0; }
.page-btn.active { background: #10233c; border-color: #10233c; color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------------- 表单 ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-field.full { grid-column: 1 / -1; }
.form-field > label { font-size: 11.5px; font-weight: 600; color: #4d6079; letter-spacing: .02em; }
.form-field > label i { color: var(--rose); font-style: normal; }
.form-field .hint { font-size: 10.5px; color: var(--faint); }
.form-field .input, .form-field .select, .form-field textarea { width: 100%; height: 39px; }
.form-field textarea { height: auto; min-height: 78px; padding: 10px 11px; resize: vertical; line-height: 1.55; }
.form-field .input::placeholder, .form-field textarea::placeholder { color: #a8b6c8; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.check-line input { accent-color: #22b8c8; width: 15px; height: 15px; }

.switch { position: relative; display: inline-flex; width: 38px; height: 21px; cursor: pointer; }
.switch input { display: none; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: #d7e0ec; transition: .25s; }
.switch span::before { content: ''; position: absolute; width: 15px; height: 15px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: .25s; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.switch input:checked + span { background: linear-gradient(110deg, #2fd9c8, #4f9bff); }
.switch input:checked + span::before { transform: translateX(17px); }

/* ---------------- Tabs ---------------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 20px; overflow-x: auto; }
.tabs button {
    position: relative;
    height: 42px;
    padding: 0 13px;
    border: 0; background: none;
    font-size: 12px; font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
    transition: color .18s;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: #0f7f96; font-weight: 650; }
.tabs button.active::after {
    content: '';
    position: absolute; left: 10px; right: 10px; bottom: -1px;
    height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--sky));
    box-shadow: 0 0 10px rgba(95, 214, 255, .6);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeUp .3s var(--ease); }

/* ---------------- 弹层：模态 ---------------- */
.modal-root, .drawer-root { position: relative; z-index: 90; }

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 14, 27, .5);
    backdrop-filter: blur(4px) saturate(.9);
    opacity: 0;
    transition: opacity .25s;
}
.overlay.show { opacity: 1; }

.modal {
    position: fixed;
    top: 50%; left: 50%;
    width: min(620px, calc(100vw - 32px));
    max-height: calc(100vh - 80px);
    transform: translate(-50%, -46%) scale(.97);
    opacity: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-float), 0 0 0 1px rgba(255, 255, 255, .35) inset;
    transition: all .3s var(--ease);
    overflow: hidden;
}
.modal.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal.wide { width: min(860px, calc(100vw - 32px)); }
.modal.narrow { width: min(460px, calc(100vw - 32px)); }
.modal::before {
    content: '';
    position: absolute; inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #2fd9c8, #5fd6ff 45%, #7c6cff);
    z-index: 2;
}
.modal-head {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 22px 24px 16px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #fbfdff, #fff);
}
.modal-ico {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: linear-gradient(145deg, rgba(47, 217, 200, .15), rgba(95, 214, 255, .14));
    color: #168fa4;
    border: 1px solid rgba(95, 214, 255, .22);
    flex: none;
}
.modal-ico .icon { width: 20px; height: 20px; }
.modal-ico.ir { background: linear-gradient(145deg, rgba(124, 108, 255, .14), rgba(95, 143, 255, .12)); color: #5d54d6; border-color: rgba(124, 108, 255, .2); }
.modal-ico.ro { background: linear-gradient(145deg, rgba(255, 107, 138, .13), rgba(255, 160, 180, .1)); color: #d54563; border-color: rgba(255, 107, 138, .2); }
.modal-title { flex: 1; min-width: 0; }
.modal-title .eyebrow { margin-bottom: 4px; font-size: 9px; }
.modal-title h3 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.modal-title p { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.modal-close {
    width: 32px; height: 32px;
    border: 0; border-radius: 9px;
    background: #f3f6fb; color: #7a8ba0;
    display: grid; place-items: center;
    transition: all .18s;
}
.modal-close:hover { background: #ffedf1; color: #d94a66; }
.modal-body { padding: 20px 24px; overflow-y: auto; }
.modal-body.tight { padding: 16px 24px 6px; }
.modal-foot {
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    padding: 15px 24px 18px;
    border-top: 1px solid var(--line);
    background: #fbfcff;
}
.modal-foot .left { margin-right: auto; font-size: 11px; color: var(--faint); display: flex; align-items: center; gap: 6px; }

.danger-note {
    display: flex; gap: 11px;
    padding: 13px 14px;
    border-radius: 12px;
    background: #fff4f6;
    border: 1px solid #ffe0e7;
    color: #b93d57;
    font-size: 12px;
    line-height: 1.6;
}
.danger-note .icon { color: #e05270; margin-top: 1px; }

/* ---------------- 弹层：详情抽屉 ---------------- */
.drawer {
    position: fixed;
    top: 14px; right: 14px; bottom: 14px;
    width: min(780px, calc(100vw - 28px));
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-float);
    display: flex;
    flex-direction: column;
    transform: translateX(28px);
    opacity: 0;
    transition: all .34s var(--ease);
    overflow: hidden;
}
.drawer.show { transform: translateX(0); opacity: 1; }
.drawer-hero {
    position: relative;
    padding: 22px 24px 0;
    background:
        radial-gradient(420px 180px at 88% -30%, rgba(95, 214, 255, .18), transparent 70%),
        linear-gradient(180deg, #f7fbff, #fff);
    border-bottom: 1px solid var(--line);
    flex: none;
}
.drawer-hero::before {
    content: '';
    position: absolute; inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #2fd9c8, #5fd6ff 45%, #7c6cff);
}
.dh-top { display: flex; align-items: flex-start; gap: 14px; }
.dh-ico {
    width: 46px; height: 46px;
    border-radius: 13px;
    display: grid; place-items: center;
    background: linear-gradient(150deg, #e8fbfb, #e9f1ff);
    border: 1px solid #dcebf8;
    color: #1f8da8;
    flex: none;
}
.dh-ico .icon { width: 22px; height: 22px; }
.dh-title { flex: 1; min-width: 0; }
.dh-title .eyebrow { margin-bottom: 5px; }
.dh-title h2 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dh-title p { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.dh-close { width: 34px; height: 34px; border: 0; border-radius: 9px; background: #eef3fa; color: #6e8097; display: grid; place-items: center; }
.dh-close:hover { background: #ffe9ee; color: #d94a66; }
.drawer-hero .tabs { margin: 18px -24px 0; }
.drawer-body { padding: 20px 24px 28px; overflow-y: auto; flex: 1; background: #fbfcfe; }
.dh-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-top: 16px; }
.dh-metric { padding: 10px 12px; border-radius: 11px; background: rgba(255,255,255,.7); border: 1px solid #e7eef7; }
.dh-metric em { display: block; font-style: normal; font-size: 10px; color: var(--faint); letter-spacing: .05em; }
.dh-metric strong { display: block; font-size: 16px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.detail-section { margin-bottom: 18px; }
.detail-section h4 {
    display: flex; align-items: center; gap: 7px;
    font-size: 11px; font-weight: 700; letter-spacing: .1em; color: #8494a9;
    text-transform: uppercase; margin-bottom: 10px;
}
.detail-section h4::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.detail-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-item { padding: 11px 14px; border-bottom: 1px solid #f0f4f9; }
.detail-item:nth-child(odd) { border-right: 1px solid #f0f4f9; }
.detail-item em { display: block; font-style: normal; font-size: 10.5px; color: var(--faint); margin-bottom: 3px; }
.detail-item strong { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); word-break: break-all; }
.detail-item.full { grid-column: 1 / -1; border-right: 0; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(180deg, #bdebf2, #e3e9f3); }
.tl-item { position: relative; padding: 0 0 14px 4px; }
.tl-item::before { content: ''; position: absolute; left: -17px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 2px solid #5fd6ff; box-shadow: 0 0 0 3px rgba(95,214,255,.12); }
.tl-item.warn::before { border-color: #ffb65c; box-shadow: 0 0 0 3px rgba(255,182,92,.12); }
.tl-item strong { display: block; font-size: 12px; font-weight: 600; }
.tl-item p { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.55; }
.tl-item time { font-size: 10px; color: var(--faint); margin-top: 4px; display: block; font-variant-numeric: tabular-nums; }

/* ---------------- Toast ---------------- */
.toast-root { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column-reverse; gap: 9px; pointer-events: none; }
.toast {
    display: flex; align-items: flex-start; gap: 10px;
    min-width: 270px; max-width: 380px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(12, 24, 41, .94);
    color: #eaf4ff;
    box-shadow: 0 18px 40px -18px rgba(4, 12, 24, .7);
    border: 1px solid rgba(255, 255, 255, .09);
    font-size: 12px;
    line-height: 1.5;
    backdrop-filter: blur(10px);
    transform: translateX(20px); opacity: 0;
    transition: all .25s var(--ease);
    pointer-events: auto;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast .t-ico { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: rgba(47, 217, 200, .16); color: #5fe7d7; flex: none; margin-top: 1px; }
.toast .t-ico .icon { width: 13px; height: 13px; }
.toast.err .t-ico { background: rgba(255, 107, 138, .16); color: #ff8fa8; }
.toast.warn .t-ico { background: rgba(255, 182, 92, .16); color: #ffc672; }
.toast strong { display: block; font-size: 12px; font-weight: 600; }
.toast p { font-size: 11px; color: #9fb4cc; margin-top: 2px; }

/* ---------------- 命令面板 / 通知 ---------------- */
.palette { position: fixed; inset: 0; z-index: 120; background: rgba(6, 14, 27, .5); backdrop-filter: blur(5px); display: flex; justify-content: center; padding-top: 12vh; }
.palette-panel { width: min(600px, calc(100vw - 32px)); height: fit-content; max-height: 64vh; background: #fff; border-radius: 16px; box-shadow: var(--shadow-float); overflow: hidden; animation: fadeUp .25s var(--ease); }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.palette-input .icon { color: #8fa1b8; }
.palette-input input { flex: 1; border: 0; outline: none; font-size: 14px; background: transparent; }
.palette-results { max-height: 46vh; overflow-y: auto; padding: 7px; }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 9px; cursor: pointer; }
.palette-item:hover, .palette-item.active { background: #f0f7ff; }
.palette-item .pi-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #eef7fb; color: #2b8fa8; }
.palette-item .pi-ico .icon { width: 15px; height: 15px; }
.palette-item strong { display: block; font-size: 12.5px; }
.palette-item span { display: block; font-size: 10px; color: var(--faint); margin-top: 2px; }
.palette-foot { display: flex; align-items: center; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line); background: #fbfcff; font-size: 10px; color: var(--faint); }
.palette-foot kbd { margin-right: 3px; }
.pf-brand { margin-left: auto; letter-spacing: .1em; }

.notify-pop {
    position: fixed;
    top: 64px; right: 22px;
    width: 340px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    z-index: 80;
    overflow: hidden;
}
.np-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.np-head strong { font-size: 13px; }
.np-head a { font-size: 11px; color: #2b7fe0; }
.np-list { max-height: 380px; overflow-y: auto; }
.np-item { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #f2f5fa; }
.np-item:hover { background: #f9fcff; }
.np-item .np-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; background: #5fd6ff; flex: none; }
.np-item.warning .np-dot { background: #ffb65c; }
.np-item.err .np-dot { background: #ff6b8a; }
.np-item strong { display: block; font-size: 12px; font-weight: 600; line-height: 1.4; }
.np-item p { font-size: 10.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.np-item time { font-size: 9.5px; color: var(--faint); }

/* ---------------- 其它 ---------------- */
.empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 46px 20px; text-align: center; color: var(--muted);
    gap: 6px;
}
.empty-state .icon { width: 34px; height: 34px; color: #c3d2e2; margin-bottom: 4px; }
.empty-state strong { font-size: 13px; color: var(--text-2); }
.empty-state span { font-size: 11.5px; }

.skeleton { border-radius: 8px; background: linear-gradient(90deg, #eef3f9 25%, #f7fafd 37%, #eef3f9 63%); background-size: 800px 100%; animation: shimmer 1.4s infinite linear; }

.progress { height: 6px; border-radius: 20px; background: #edf2f9; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, #2fd9c8, #5fd6ff); }
.progress.warn > i { background: linear-gradient(90deg, #ffc46a, #ff9a5c); }
.progress.bad > i { background: linear-gradient(90deg, #ff8fa8, #ff5f7e); }

.code-box {
    position: relative;
    background: #0b1526;
    border-radius: 12px;
    padding: 14px 15px;
    font-family: var(--mono);
    font-size: 11px;
    line-height: 1.7;
    color: #a8c6e4;
    overflow: auto;
}
.code-box .k { color: #6fe2d2; }
.code-box .s { color: #ffc98f; }

.notice-line {
    display: flex; align-items: flex-start; gap: 9px;
    padding: 11px 13px;
    border-radius: 10px;
    background: #f4f9ff;
    border: 1px solid #e2eefb;
    font-size: 11.5px;
    color: #4a6785;
    line-height: 1.55;
}
.notice-line .icon { color: #2f9fc9; margin-top: 1px; }

.divider { height: 1px; background: var(--line); margin: 16px 0; }

.loading-row { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 40px; color: var(--muted); font-size: 12px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #dbe6f2; border-top-color: #2fd9c8; animation: spin .8s linear infinite; }

@media (max-width: 900px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g-main, .g-side, .g-3, .g-4, .g-6, .g-2 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .search-box { min-width: 160px; }
    .modal-body { padding: 16px; }
    .drawer { top: 0; right: 0; bottom: 0; width: 100%; border-radius: 0; }
    .dh-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-item:nth-child(odd) { border-right: 0; }
}
