/* assets/style.css */

body {
    background-color: #0b0e11;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* 智能交易矩阵样式 */
.monitor-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: #161a1e;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #2b3139;
}
.monitor-table th {
    background-color: #1e2329;
    color: #eaecef;
    font-weight: 600;
    text-align: center;
    padding: 12px;
    border-bottom: 2px solid #2b3139;
    font-size: 14px;
}
.monitor-table td {
    border: 1px solid #2b3139;
    padding: 14px 10px;
    text-align: center;
    color: #f5f5f5;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
}
.monitor-table tr:hover td {
    background-color: #20262d !important;
}

/* 侧边呼应色 */
.call-header { border-bottom: 3px solid #0ecb81 !important; color: #0ecb81 !important; }
.put-header { border-bottom: 3px solid #f6465d !important; color: #f6465d !important; }

/* 能量数字 badge */
.anomaly-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: linear-gradient(135deg, #f6465d, #ff6b81);
    color: white;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(246, 70, 93, 0.6);
    animation: pulse 2s infinite;
}
.anomaly-badge:hover {
    transform: scale(1.1);
    background: #ff6b81;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(246, 70, 93, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(246, 70, 93, 0); }
    100% { box-shadow: 0 0 0 0 rgba(246, 70, 93, 0); }
}

/* 输入框微调使其契合暗黑主题 */
.input-dark {
    background-color: #1e2329 !important;
    color: #eaecef !important;
    border: 1px solid #2b3139 !important;
}
.input-dark:focus {
    background-color: #20262d !important;
    color: #ffffff !important;
    border-color: #0ecb81 !important;
    box-shadow: 0 0 0 0.25rem rgba(14, 203, 129, 0.25) !important;
}
.input-group-text-dark {
    background-color: #2b3139 !important;
    color: #eaecef !important;
    border: 1px solid #2b3139 !important;
    font-size: 12px;
    font-weight: bold;
}
.input-dark::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* 矩阵单元格的缓动和平滑阴影 */
.matrix-cell-class {
    transition: background-color 0.25s ease, border 0.25s ease, box-shadow 0.25s ease !important;
}

/* ==========================================
   适配标准 Dash dcc.Dropdown 的暗黑风格
   ========================================== */
/* 选择框本体 */
.dropdown-dark.dash-dropdown,
.dropdown-dark .dash-dropdown-wrapper {
    background-color: #1e2329 !important;
    border: 1px solid #2b3139 !important;
    color: #eaecef !important;
}

/* 选中的值 / 占位符文字 */
.dropdown-dark .dash-dropdown-value,
.dropdown-dark .dash-dropdown-placeholder,
.dropdown-dark input {
    color: #eaecef !important;
}

/* 下拉浮层（关键：覆盖 CSS 变量） */
.dropdown-dark .dash-dropdown-content,
.dash-dropdown-content {
    background-color: #1e2329 !important;
    border: 1px solid #2b3139 !important;
    z-index: 9999 !important;
    /* 直接改它用的变量，双保险 */
    --Dash-Fill-Inverse-Strong: #1e2329 !important;
}

/* 搜索框 */
.dash-dropdown-search-container,
.dash-dropdown-search-container input {
    background-color: #1e2329 !important;
    color: #eaecef !important;
    border-color: #2b3139 !important;
}

/* 选项列表 */
.dash-options-list,
.dash-dropdown-options {
    background-color: #1e2329 !important;
}

/* 单个选项 */
.dash-dropdown-option {
    background-color: #1e2329 !important;
    color: #eaecef !important;
}
.dash-dropdown-option:hover,
.dash-dropdown-option[data-highlighted="true"],
.dash-dropdown-option[data-state="active"] {
    background-color: #20262d !important;
    color: #ffffff !important;
}
.dash-dropdown-option[aria-selected="true"],
.dash-dropdown-option[data-state="checked"] {
    background-color: #161a1e !important;
    color: #ffffff !important;
}
.dropdown-dark .dash-dropdown-trigger-icon {
    color: #eaecef !important;
    stroke: #eaecef !important;
    fill: #eaecef !important;
}

/* assets/style.css 尾部追加 */

/* Night Shift 常态绿色微光样式 */
.glow-green-micro {
    border-color: #0ecb81 !important;
    color: #0ecb81 !important;
    background-color: rgba(14, 203, 129, 0.05) !important;
    box-shadow: 0 0 8px rgba(14, 203, 129, 0.25);
    transition: all 0.3s ease;
}
.glow-green-micro:hover {
    background-color: rgba(14, 203, 129, 0.15) !important;
    box-shadow: 0 0 12px rgba(14, 203, 129, 0.45);
}

/* Night Shift 报警红色双重呼吸闪烁动画 */
.flash-red {
    animation: flash-red-pulse 1s infinite alternate;
    background-color: #f6465d !important;
    border-color: #f6465d !important;
    color: #ffffff !important;
    font-weight: bold;
}
@keyframes flash-red-pulse {
    0% {
        box-shadow: 0 0 4px rgba(246, 70, 93, 0.5);
        opacity: 0.9;
    }
    100% {
        box-shadow: 0 0 20px rgba(246, 70, 93, 0.9);
        opacity: 1;
    }
}

/* 全局暗黑极细低调滚动条 (整页、所有卡片、浮层与下拉菜单全局生效) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0b0e11;
}
::-webkit-scrollbar-thumb {
    background: #2b3139;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #474f5d;
}
::-webkit-scrollbar-corner {
    background: #0b0e11;
}

/* Firefox 与现代标准滚动条支持 */
html, body {
    scrollbar-width: thin;
    scrollbar-color: #2b3139 #0b0e11;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #2b3139 transparent;
}

/* 模态框与深色卡片定制优雅细滚动条 (兼容保留) */
.dark-custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.dark-custom-scrollbar::-webkit-scrollbar-track {
    background: #14171a;
}
.dark-custom-scrollbar::-webkit-scrollbar-thumb {
    background: #2b3139;
    border-radius: 3px;
}
.dark-custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #474f5d;
}
.dark-custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #2b3139 #14171a;
}

/* 下拉菜单 (Dropdown) 选项列表专用滚动条美化 */
.dash-options-list::-webkit-scrollbar,
.dash-dropdown-options::-webkit-scrollbar,
.dash-dropdown-content::-webkit-scrollbar,
.Select-menu-outer::-webkit-scrollbar,
.Select-menu::-webkit-scrollbar,
.VirtualizedSelectFocusedOption::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}
.dash-options-list::-webkit-scrollbar-track,
.dash-dropdown-options::-webkit-scrollbar-track,
.dash-dropdown-content::-webkit-scrollbar-track,
.Select-menu-outer::-webkit-scrollbar-track,
.Select-menu::-webkit-scrollbar-track {
    background: #1e2329 !important;
}
.dash-options-list::-webkit-scrollbar-thumb,
.dash-dropdown-options::-webkit-scrollbar-thumb,
.dash-dropdown-content::-webkit-scrollbar-thumb,
.Select-menu-outer::-webkit-scrollbar-thumb,
.Select-menu::-webkit-scrollbar-thumb {
    background: #2b3139 !important;
    border-radius: 3px !important;
}
.dash-options-list::-webkit-scrollbar-thumb:hover,
.dash-dropdown-options::-webkit-scrollbar-thumb:hover,
.dash-dropdown-content::-webkit-scrollbar-thumb:hover,
.Select-menu-outer::-webkit-scrollbar-thumb:hover,
.Select-menu::-webkit-scrollbar-thumb:hover {
    background: #474f5d !important;
}

/* 模态框极简高质感白色关闭按钮 */
.btn-modal-close-custom {
    background: transparent;
    border: none;
    color: #ffffff !important;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
}

.btn-modal-close-custom:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    transform: scale(1.08);
}

.btn-modal-close-custom:active {
    transform: scale(0.92);
    background-color: rgba(246, 70, 93, 0.3) !important;
    color: #ff6b81 !important;
}

/* 查询按钮定制：现代暗黑金融终端质感 */
.btn-query-custom {
    background: linear-gradient(180deg, #2b313a 0%, #1e2329 100%) !important;
    border: 1px solid #474f5d !important;
    color: #eaecef !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}
.btn-query-custom:hover:not(:disabled) {
    background: linear-gradient(180deg, #363d48 0%, #252b33 100%) !important;
    border-color: #00d2ff !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.35);
}
.btn-query-custom:active:not(:disabled) {
    transform: scale(0.97);
    background: #191c20 !important;
}
.btn-query-custom:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    border-color: #2b3139 !important;
    background: #161a1e !important;
    color: #6b7280 !important;
    box-shadow: none !important;
}