/* 对比度改善样式 - 提高文字可读性 */

/* 改善灰色文字的对比度 */
.metric-title {
    color: #495057 !important; /* 从 #6c757d 改为更深的颜色 */
}

.metric-unit {
    color: #6c757d !important; /* 从 #95a5a6 改为更深的颜色 */
}

.loading {
    color: #495057 !important; /* 从 #6c757d 改为更深的颜色 */
}

/* 改善表格标题的对比度 */
.data-table th {
    color: #343a40 !important; /* 从 #555 改为更深的颜色 */
    font-weight: 600 !important; /* 增加字体粗细 */
}

.data-table th[onclick]:hover {
    color: #212529 !important; /* 从 #333 改为更深的颜色 */
}

/* 改善过滤器标签的对比度 */
.filter-item label {
    color: #343a40 !important; /* 从 #555 改为更深的颜色 */
    font-weight: 600 !important;
}

.field-mapping-item label {
    color: #343a40 !important; /* 从 #555 改为更深的颜色 */
    font-weight: 600 !important;
}

/* 改善拖拽手柄的对比度 */
.field-mapping-item .drag-handle {
    color: #6c757d !important; /* 从 #999 改为更深的颜色 */
}

/* 改善表单标签的对比度 */
.form-group label {
    color: #343a40 !important; /* 从 #555 改为更深的颜色 */
    font-weight: 600 !important;
}

/* 改善内联样式中的灰色文字 */
[style*="color: #666"] {
    color: #495057 !important;
}

[style*="color: #999"] {
    color: #6c757d !important;
}

[style*="color: #aaa"] {
    color: #6c757d !important;
}

/* 改善按钮的对比度 */
.btn {
    font-weight: 500 !important;
}

/* 改善警告文字的对比度 */
.device-status.checking {
    color: #664d03 !important; /* 从 #856404 改为更深的颜色 */
    background-color: #fff3cd !important;
    border-color: #ffecb5 !important;
}

/* 改善信息提示的对比度 */
[style*="color: #6c757d"] {
    color: #495057 !important;
}

/* 改善小字体文字的对比度 */
.small-text, 
[style*="font-size: 11px"],
[style*="font-size: 12px"] {
    color: #495057 !important;
    font-weight: 500 !important;
}

/* 改善链接的对比度 */
a, 
[style*="color: #007bff"] {
    color: #0056b3 !important; /* 使用更深的蓝色 */
    font-weight: 500 !important;
}

/* 改善成功状态的对比度 */
[style*="color: #28a745"] {
    color: #1e7e34 !important; /* 使用更深的绿色 */
    font-weight: 500 !important;
}

/* 改善危险状态的对比度 */
[style*="color: #dc3545"] {
    color: #c82333 !important; /* 使用更深的红色 */
    font-weight: 500 !important;
}

/* 改善警告状态的对比度 */
[style*="color: #ffc107"] {
    color: #e0a800 !important; /* 使用更深的黄色 */
    font-weight: 600 !important;
}

/* 改善信息状态的对比度 */
[style*="color: #17a2b8"] {
    color: #138496 !important; /* 使用更深的青色 */
    font-weight: 500 !important;
}

/* 改善深色主题的对比度 */
.dark-theme {
    background-color: #1a1a1a !important;
}

.dark-theme .data-table {
    background: #2d3748 !important;
    color: #f7fafc !important; /* 提高文字亮度 */
}

.dark-theme .data-table th {
    background-color: #4a5568 !important;
    color: #f7fafc !important; /* 提高标题文字亮度 */
}

.dark-theme .data-table td {
    border-color: #4a5568 !important;
    color: #f7fafc !important; /* 提高单元格文字亮度 */
}

/* 改善输入框的对比度 */
input, select, textarea {
    color: #212529 !important;
    border-color: #ced4da !important;
}

input:focus, select:focus, textarea:focus {
    border-color: #0056b3 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25) !important;
}

/* 改善占位符文字的对比度 */
::placeholder {
    color: #6c757d !important;
    opacity: 1 !important;
}

/* 改善禁用状态的对比度 */
:disabled {
    color: #6c757d !important;
    background-color: #e9ecef !important;
}

/* 改善选中状态的对比度 */
:checked {
    background-color: #0056b3 !important;
    border-color: #0056b3 !important;
}

/* 改善焦点状态的对比度 */
:focus {
    outline: 2px solid #0056b3 !important;
    outline-offset: 2px !important;
}

/* 改善悬停状态的对比度 */
.btn:hover {
    filter: brightness(0.9) !important;
}

/* 改善表格行悬停的对比度 */
.data-table tr:hover {
    background: #f8f9fa !important;
    color: #212529 !important;
}

/* 改善代码块的对比度 */
code, pre {
    color: #212529 !important;
    background-color: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
}

/* 改善引用块的对比度 */
blockquote {
    color: #495057 !important;
    border-left: 4px solid #0056b3 !important;
}

/* 改善标题的对比度 */
h1, h2, h3, h4, h5, h6 {
    color: #212529 !important;
    font-weight: 600 !important;
}

/* 改善段落文字的对比度 */
p {
    color: #212529 !important;
    line-height: 1.6 !important;
}

/* 改善列表的对比度 */
ul, ol, li {
    color: #212529 !important;
}

/* 改善分割线的对比度 */
hr {
    border-color: #dee2e6 !important;
}

/* 改善徽章的对比度 */
.badge {
    font-weight: 600 !important;
}

.badge-primary {
    background-color: #0056b3 !important;
    color: #ffffff !important;
}

.badge-success {
    background-color: #1e7e34 !important;
    color: #ffffff !important;
}

.badge-danger {
    background-color: #c82333 !important;
    color: #ffffff !important;
}

.badge-warning {
    background-color: #e0a800 !important;
    color: #212529 !important;
}

.badge-info {
    background-color: #138496 !important;
    color: #ffffff !important;
}

/* 改善工具提示的对比度 */
.tooltip {
    background-color: #212529 !important;
    color: #ffffff !important;
    font-weight: 500 !important;
}

/* 改善模态框的对比度 */
.modal-header {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    border-bottom: 1px solid #dee2e6 !important;
}

.modal-body {
    color: #212529 !important;
}

.modal-footer {
    background-color: #f8f9fa !important;
    border-top: 1px solid #dee2e6 !important;
}

.container, .container-lg, .container-xl, .container-xxl, .container-fluid {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
}

.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
