/**
 * MATRIX 式交易终端：黑底 · 霓虹青 · 洋红点缀 · 等宽信息密度
 * 仅当 body 含 .exec-theme-matrix 时由 dashboard / login 引入
 */
body.exec-theme-matrix.exec-shell {
    font-family: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
    background: #000;
    color: rgba(126, 232, 234, 0.92);
    letter-spacing: 0.02em;
}

body.exec-theme-matrix .exec-ambient {
    background:
        radial-gradient(ellipse 90% 55% at 50% -10%, rgba(0, 255, 234, 0.12), transparent 52%),
        radial-gradient(ellipse 45% 35% at 100% 80%, rgba(255, 46, 166, 0.06), transparent 50%),
        linear-gradient(180deg, #030308 0%, #000 45%, #020204 100%);
}

body.exec-theme-matrix .exec-noise {
    opacity: 0.045;
}

body.exec-theme-matrix .exec-grid-faint {
    background-size: 28px 28px;
    background-image:
        linear-gradient(rgba(0, 255, 234, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 234, 0.07) 1px, transparent 1px);
    mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, black 15%, transparent 75%);
    opacity: 0.4;
}

/* —— 顶栏：状态条 + 主标题行 —— */
body.exec-theme-matrix .exec-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: auto;
    padding: 0;
    border-bottom: 1px solid rgba(0, 255, 234, 0.45);
    background: linear-gradient(180deg, rgba(0, 8, 10, 0.97) 0%, rgba(0, 0, 0, 0.92) 100%);
    box-shadow:
        0 0 32px rgba(0, 255, 234, 0.12),
        0 1px 0 rgba(255, 46, 166, 0.15) inset;
    backdrop-filter: blur(12px);
}

body.exec-theme-matrix .exec-terminal-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 8px clamp(14px, 3vw, 28px);
    border-bottom: 1px solid rgba(0, 255, 234, 0.2);
    background: rgba(0, 0, 0, 0.55);
}

body.exec-theme-matrix .exec-tx-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(126, 232, 234, 0.75);
    border: 1px solid rgba(0, 255, 234, 0.35);
    border-radius: 2px;
    background: rgba(0, 20, 22, 0.9);
    box-shadow: 0 0 12px rgba(0, 255, 234, 0.08);
}

body.exec-theme-matrix .exec-tx-chip strong,
body.exec-theme-matrix .exec-tx-chip .exec-tx-mono {
    color: #bfffff;
    font-weight: 600;
    letter-spacing: 0.06em;
}

body.exec-theme-matrix .exec-tx-chip--live {
    border-color: rgba(0, 255, 234, 0.55);
    color: #7ee8ea;
    text-shadow: 0 0 12px rgba(0, 255, 234, 0.45);
}

body.exec-theme-matrix .exec-tx-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00ffe0;
    box-shadow: 0 0 10px #00ffe0;
    animation: mtx-pulse 1.8s ease-in-out infinite;
}

@keyframes mtx-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

body.exec-theme-matrix .exec-tx-chip--time .exec-tx-mono {
    font-variant-numeric: tabular-nums;
}

body.exec-theme-matrix .exec-terminal-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
    padding: 14px clamp(14px, 3vw, 28px) 16px;
}

body.exec-theme-matrix .exec-terminal-logo {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #000;
    background: linear-gradient(145deg, #00ffe0 0%, #00b8a8 100%);
    border: 1px solid rgba(0, 255, 234, 0.8);
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(0, 255, 234, 0.35);
}

body.exec-theme-matrix .exec-terminal-center {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

body.exec-theme-matrix .exec-title-terminal {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
    font-family: "Share Tech Mono", "JetBrains Mono", ui-monospace, monospace;
    font-size: clamp(1.35rem, 4.2vw, 2.15rem);
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1.1;
    color: #9ff;
    text-shadow:
        0 0 20px rgba(0, 255, 234, 0.55),
        0 0 40px rgba(0, 255, 234, 0.2);
}

body.exec-theme-matrix .exec-tt-part {
    white-space: nowrap;
}

body.exec-theme-matrix .exec-title-slash {
    margin: 0 0.02em;
    opacity: 0.55;
    font-weight: 400;
    letter-spacing: 0.2em;
}

/* 雷达装饰 */
body.exec-theme-matrix .exec-radar {
    position: relative;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

body.exec-theme-matrix .exec-radar__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 234, 0.5);
    box-shadow:
        0 0 14px rgba(0, 255, 234, 0.25),
        inset 0 0 18px rgba(0, 255, 234, 0.06);
}

body.exec-theme-matrix .exec-radar__sweep {
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: conic-gradient(from -36deg, transparent 0deg, rgba(0, 255, 234, 0.22) 52deg, transparent 52deg);
    animation: mtx-radar 2.8s linear infinite;
}

@keyframes mtx-radar {
    to {
        transform: rotate(360deg);
    }
}

body.exec-theme-matrix .exec-radar__blip {
    position: absolute;
    width: 7px;
    height: 7px;
    top: 32%;
    right: 18%;
    border-radius: 50%;
    background: #ff2ea6;
    box-shadow: 0 0 12px #ff2ea6;
}

body.exec-theme-matrix .exec-tagline-terminal {
    margin: 0;
    display: inline-block;
    max-width: min(100%, 720px);
    padding: 6px 14px;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 180, 220, 0.95);
    border: 1px solid rgba(255, 46, 166, 0.55);
    border-radius: 2px;
    background: rgba(40, 0, 28, 0.45);
    box-shadow: 0 0 18px rgba(255, 46, 166, 0.12);
}

body.exec-theme-matrix .exec-terminal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* —— Tab —— */
body.exec-theme-matrix .exec-tabs {
    gap: 4px;
    padding: 5px 6px;
    margin-bottom: 18px;
    border-radius: 2px;
    border: 1px solid rgba(0, 255, 234, 0.28);
    background: rgba(0, 12, 14, 0.75);
    box-shadow: inset 0 0 24px rgba(0, 255, 234, 0.04);
}

body.exec-theme-matrix .exec-tab {
    border-radius: 2px;
    padding: 9px 14px;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(126, 232, 234, 0.55);
}

body.exec-theme-matrix .exec-tab:hover {
    color: #bfffff;
    background: rgba(0, 255, 234, 0.08);
}

body.exec-theme-matrix .exec-tab--active {
    color: #000;
    background: linear-gradient(180deg, #00ffe0 0%, #00c9b0 100%);
    border-color: rgba(0, 255, 234, 0.7);
    box-shadow: 0 0 22px rgba(0, 255, 234, 0.35);
}

body.exec-theme-matrix .exec-tab:focus-visible {
    outline: 2px solid #ff2ea6;
    outline-offset: 2px;
}

/* —— 分区标签 —— */
body.exec-theme-matrix .exec-section-label {
    letter-spacing: 0.22em;
    color: rgba(0, 255, 234, 0.45);
    text-shadow: 0 0 8px rgba(0, 255, 234, 0.25);
}

/* —— 卡片 —— */
body.exec-theme-matrix .exec-module {
    border-radius: 2px;
    border: 1px solid rgba(0, 255, 234, 0.38);
    background: linear-gradient(165deg, rgba(0, 18, 20, 0.92) 0%, rgba(0, 0, 0, 0.94) 100%);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.5),
        0 0 28px rgba(0, 255, 234, 0.06);
}

body.exec-theme-matrix .exec-module:hover {
    border-color: rgba(0, 255, 234, 0.55);
    box-shadow:
        0 0 0 1px rgba(255, 46, 166, 0.12),
        0 0 36px rgba(0, 255, 234, 0.12);
    transform: none;
}

body.exec-theme-matrix .exec-module-head {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 255, 234, 0.22);
    background: linear-gradient(90deg, rgba(0, 255, 234, 0.08) 0%, transparent 55%);
}

body.exec-theme-matrix .exec-module-title {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #bfffff;
}

body.exec-theme-matrix .exec-module-meta {
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    color: rgba(126, 232, 234, 0.45);
}

body.exec-theme-matrix .exec-module-body {
    padding: 14px 16px 16px;
}

/* —— 指标格 —— */
body.exec-theme-matrix .exec-metric {
    border-radius: 2px;
    border: 1px solid rgba(0, 255, 234, 0.22);
    background: rgba(0, 0, 0, 0.45);
    box-shadow: inset 0 0 20px rgba(0, 255, 234, 0.03);
}

body.exec-theme-matrix .exec-metric-label {
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    color: rgba(126, 232, 234, 0.5);
}

body.exec-theme-matrix .exec-metric-value {
    font-size: 0.84rem;
    color: #dff;
}

body.exec-theme-matrix .exec-metric-value--mono {
    font-size: 0.78rem;
    color: rgba(191, 255, 255, 0.88);
}

/* —— 芯片 / 方向 / 盈亏色（保持语义，套霓虹） —— */
body.exec-theme-matrix .exec-chip--neutral {
    border-color: rgba(0, 255, 234, 0.25);
    color: rgba(126, 232, 234, 0.75);
    background: rgba(0, 0, 0, 0.5);
}

body.exec-theme-matrix .exec-chip--ok {
    color: #5fffd0;
    border-color: rgba(0, 255, 200, 0.45);
    background: rgba(0, 40, 32, 0.5);
    text-shadow: 0 0 10px rgba(0, 255, 200, 0.35);
}

body.exec-theme-matrix .exec-chip--warn {
    color: #ffe066;
    border-color: rgba(255, 200, 80, 0.45);
    background: rgba(40, 28, 0, 0.45);
}

body.exec-theme-matrix .exec-chip--live {
    color: #ff7ab8;
    border-color: rgba(255, 46, 166, 0.5);
    background: rgba(36, 0, 24, 0.45);
    text-shadow: 0 0 10px rgba(255, 46, 166, 0.35);
}

body.exec-theme-matrix .exec-dir--long {
    color: #5fffd0;
    border-color: rgba(0, 255, 200, 0.45);
    background: rgba(0, 32, 28, 0.55);
    text-shadow: 0 0 8px rgba(0, 255, 200, 0.3);
}

body.exec-theme-matrix .exec-dir--short {
    color: #ff7ab8;
    border-color: rgba(255, 46, 166, 0.45);
    background: rgba(36, 0, 22, 0.55);
    text-shadow: 0 0 8px rgba(255, 46, 166, 0.3);
}

body.exec-theme-matrix .exec-pnl--profit {
    color: #5fffd0;
    text-shadow: 0 0 12px rgba(0, 255, 200, 0.35);
}

body.exec-theme-matrix .exec-pnl--loss {
    color: #ff6eb0;
    text-shadow: 0 0 12px rgba(255, 46, 166, 0.35);
}

body.exec-theme-matrix .exec-pnl--flat {
    color: rgba(126, 232, 234, 0.55);
}

/* —— 表格 —— */
body.exec-theme-matrix .exec-table-scroll {
    border-radius: 2px;
    border: 1px solid rgba(0, 255, 234, 0.28);
    background: rgba(0, 0, 0, 0.55);
    box-shadow: inset 0 0 32px rgba(0, 255, 234, 0.04);
}

body.exec-theme-matrix .exec-table th {
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    color: rgba(0, 255, 234, 0.55);
    border-bottom: 1px solid rgba(0, 255, 234, 0.25);
    background: rgba(0, 20, 22, 0.85);
}

body.exec-theme-matrix .exec-table td {
    color: rgba(191, 255, 255, 0.78);
    border-bottom: 1px solid rgba(0, 255, 234, 0.08);
}

body.exec-theme-matrix .exec-table tbody tr:hover {
    background: rgba(0, 255, 234, 0.06);
}

body.exec-theme-matrix .exec-table .exec-mono {
    color: #dff;
}

body.exec-theme-matrix .exec-muted {
    color: rgba(126, 232, 234, 0.35);
}

body.exec-theme-matrix .exec-cell-status--ok {
    color: #5fffd0;
    text-shadow: 0 0 8px rgba(0, 255, 200, 0.3);
}

body.exec-theme-matrix .exec-cell-status--skip {
    color: rgba(126, 232, 234, 0.45);
}

body.exec-theme-matrix .exec-cell-status--err {
    color: #ff6eb0;
    text-shadow: 0 0 8px rgba(255, 46, 166, 0.35);
}

/* —— 按钮 —— */
body.exec-theme-matrix .exec-btn {
    border-radius: 2px;
    border: 1px solid rgba(0, 255, 234, 0.45);
    background: rgba(0, 24, 26, 0.85);
    color: #bfffff;
    box-shadow: 0 0 14px rgba(0, 255, 234, 0.12);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.68rem;
}

body.exec-theme-matrix .exec-btn:hover {
    border-color: rgba(255, 46, 166, 0.55);
    color: #ffd0ec;
    background: rgba(32, 0, 22, 0.75);
    box-shadow: 0 0 20px rgba(255, 46, 166, 0.2);
    transform: none;
}

body.exec-theme-matrix .exec-btn--primary {
    border-color: rgba(255, 46, 166, 0.55);
    background: linear-gradient(180deg, #ff5ec8 0%, #c21e6e 100%);
    color: #fff;
    text-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 24px rgba(255, 46, 166, 0.25);
}

body.exec-theme-matrix .exec-btn--primary:hover {
    background: linear-gradient(180deg, #ff7ad4 0%, #d02878 100%);
    border-color: rgba(255, 46, 166, 0.75);
}

body.exec-theme-matrix .exec-btn--sm {
    border-radius: 2px;
    font-size: 0.62rem;
    padding: 4px 9px;
}

/* —— 说明文字 —— */
body.exec-theme-matrix .exec-prose {
    color: rgba(126, 232, 234, 0.5);
}

body.exec-theme-matrix .exec-prose code {
    border-color: rgba(0, 255, 234, 0.25);
    background: rgba(0, 0, 0, 0.5);
    color: rgba(191, 255, 255, 0.85);
}

body.exec-theme-matrix .exec-table-hint {
    color: rgba(126, 232, 234, 0.45);
    line-height: 1.55;
}

body.exec-theme-matrix .exec-table-hint code {
    font-family: inherit;
    color: #7ee8ea;
    border: 1px solid rgba(0, 255, 234, 0.3);
    padding: 1px 5px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.4);
}

body.exec-theme-matrix .exec-sig-export-label {
    color: rgba(126, 232, 234, 0.65);
}

body.exec-theme-matrix .exec-sig-export-label input {
    accent-color: #ff2ea6;
}

/* —— 弹窗 —— */
body.exec-theme-matrix .exec-modal__backdrop {
    background: rgba(0, 0, 0, 0.82);
}

body.exec-theme-matrix .exec-modal__card {
    border-radius: 2px;
    border: 1px solid rgba(0, 255, 234, 0.4);
    background: linear-gradient(180deg, rgba(0, 22, 24, 0.98) 0%, rgba(0, 0, 0, 0.98) 100%);
    box-shadow: 0 0 48px rgba(0, 255, 234, 0.15);
}

body.exec-theme-matrix .exec-modal__title {
    color: #bfffff;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

/* —— 滚动条 —— */
body.exec-theme-matrix .exec-tab-panel {
    scrollbar-color: rgba(0, 255, 234, 0.25) transparent;
}

body.exec-theme-matrix .exec-tab-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 234, 0.2);
}

body.exec-theme-matrix .exec-shell ::selection {
    background: rgba(255, 46, 166, 0.35);
    color: #fff;
}

/* —— 登录页 —— */
body.exec-theme-matrix.exec-login-body .exec-mark {
    display: grid !important;
    width: 44px;
    height: 44px;
    place-items: center;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #000;
    background: linear-gradient(145deg, #00ffe0 0%, #00b8a8 100%);
    border: 1px solid rgba(0, 255, 234, 0.8);
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(0, 255, 234, 0.35);
}

body.exec-theme-matrix.exec-login-body .exec-login-card {
    border-radius: 2px;
    border: 1px solid rgba(0, 255, 234, 0.4);
    background: linear-gradient(165deg, rgba(0, 18, 20, 0.95) 0%, rgba(0, 0, 0, 0.97) 100%);
    box-shadow: 0 0 40px rgba(0, 255, 234, 0.12);
}

body.exec-theme-matrix .exec-login-card::before {
    height: 3px;
    background: linear-gradient(90deg, transparent, #00ffe0, #ff2ea6, #00ffe0, transparent);
}

body.exec-theme-matrix .exec-login-kicker {
    color: rgba(0, 255, 234, 0.55);
    letter-spacing: 0.24em;
}

body.exec-theme-matrix .exec-login-title {
    font-family: "Share Tech Mono", "JetBrains Mono", monospace;
    color: #9ff;
    text-shadow: 0 0 20px rgba(0, 255, 234, 0.45);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.exec-theme-matrix .exec-login-desc {
    color: rgba(126, 232, 234, 0.55);
}

body.exec-theme-matrix .exec-label {
    color: rgba(0, 255, 234, 0.45);
}

body.exec-theme-matrix .exec-input {
    border-radius: 2px;
    border: 1px solid rgba(0, 255, 234, 0.35);
    background: #000;
    color: #dff;
    font-family: inherit;
}

body.exec-theme-matrix .exec-input:focus {
    border-color: rgba(255, 46, 166, 0.55);
    box-shadow: 0 0 0 2px rgba(255, 46, 166, 0.15);
}

body.exec-theme-matrix .exec-error {
    color: #ff8ec4;
    text-shadow: 0 0 10px rgba(255, 46, 166, 0.3);
}

body.exec-theme-matrix .exec-sig-persist {
    border-radius: 2px;
    border-color: rgba(0, 255, 234, 0.25);
    background: rgba(0, 0, 0, 0.45);
    color: rgba(191, 255, 255, 0.75);
}

body.exec-theme-matrix .exec-sig-persist--ok {
    border-color: rgba(0, 255, 200, 0.45);
    background: rgba(0, 32, 28, 0.55);
    color: #5fffd0;
    text-shadow: 0 0 10px rgba(0, 255, 200, 0.2);
}

body.exec-theme-matrix .exec-sig-persist--warn {
    border-color: rgba(255, 46, 166, 0.5);
    background: rgba(40, 0, 28, 0.5);
    color: #ffb8e0;
}

@media (prefers-reduced-motion: reduce) {
    body.exec-theme-matrix .exec-radar__sweep,
    body.exec-theme-matrix .exec-tx-dot {
        animation: none !important;
    }
}

@media (max-width: 720px) {
    body.exec-theme-matrix .exec-terminal-head {
        flex-direction: column;
        align-items: stretch;
    }

    body.exec-theme-matrix .exec-terminal-actions {
        justify-content: flex-end;
    }

    body.exec-theme-matrix .exec-title-terminal {
        font-size: clamp(1.05rem, 6vw, 1.65rem);
    }
}
