/* 库存预警页面样式 - TDesign风格 */

/* 页面容器 */
.inventory-alert-page-container {
    width: 100%;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 24px;
    box-sizing: border-box;
}

/* 统计卡片区域 */
.alert-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.alert-stat-card {
    background: #ffffff;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.alert-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.alert-stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.alert-stat-card-title {
    font-size: 14px;
    color: #86909c;
    font-weight: 500;
}

.alert-stat-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-stat-card-icon svg {
    width: 18px;
    height: 18px;
    fill: #ffffff;
}

.alert-stat-card-icon i {
    font-size: 18px;
    color: #ffffff;
}

/* 统一图标颜色 - 蓝色主题 */
.alert-stat-card-icon.low-stock,
.alert-stat-card-icon.overstock,
.alert-stat-card-icon.out-stock,
.alert-stat-card-icon.expiry,
.alert-stat-card-icon.aging,
.alert-stat-card-icon.stagnant {
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
}

.alert-stat-card-value {
    font-size: 28px;
    font-weight: 600;
    color: #1d2129;
    margin-bottom: 8px;
}

.alert-stat-card-value .unit {
    font-size: 14px;
    color: #86909c;
    font-weight: 400;
    margin-left: 4px;
}

.alert-stat-card-change {
    font-size: 13px;
    color: #86909c;
}

/* 图表区域 */
.alert-charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.alert-chart-card {
    background: #ffffff;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.alert-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.alert-chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
}

.alert-chart-subtitle {
    font-size: 13px;
    color: #86909c;
    margin-top: 4px;
}

.alert-chart-filter {
    display: flex;
    gap: 8px;
}

.alert-chart-filter-btn {
    padding: 6px 12px;
    border: 1px solid #e5e6eb;
    border-radius: 4px;
    background: #ffffff;
    color: #4d5156;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alert-chart-filter-btn:hover {
    border-color: #1976d2;
    color: #1976d2;
}

.alert-chart-filter-btn.active {
    border-color: #1976d2;
    background: #1976d2;
    color: #ffffff;
}

.alert-chart-content {
    height: 280px;
    position: relative;
}

/* Tab 标签页 */
.alert-tabs-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e5e6eb;
    margin-bottom: 16px;
}

.alert-tabs {
    display: flex;
    gap: 16px;
}

.alert-tab {
    padding: 12px 16px;
    background: none;
    border: none;
    color: #4d5156;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.alert-tab:hover {
    color: #1976d2;
}

.alert-tab.active {
    color: #1976d2;
}

.alert-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #1976d2;
}

/* Tab区域按钮 */
.alert-tab-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 2px;
}

.alert-refresh-btn,
.alert-batch-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    color: #4d5156;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alert-refresh-btn:hover,
.alert-batch-read-btn:hover {
    background-color: #f5f5f5;
    border-color: #1976d2;
    color: #1976d2;
}

.alert-batch-read-btn {
    background-color: #1976d2;
    color: #ffffff;
    border-color: #1976d2;
}

.alert-batch-read-btn:hover {
    background-color: #1565c0;
    border-color: #1565c0;
}

.alert-batch-read-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tab 内容 */
.alert-tab-content {
    display: none;
}

.alert-tab-content.active {
    display: block;
}

/* 搜索区域 */
.alert-search-area {
    background: #ffffff;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
}

.alert-search-form {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.alert-search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.alert-search-label {
    font-size: 13px;
    font-weight: 500;
    color: #1d2129;
    white-space: nowrap;
}

.alert-search-input,
.alert-search-select {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e5e6eb;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.alert-search-input:focus,
.alert-search-select:focus {
    border-color: #1976d2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

/* 预警类型多选下拉框 */
.alert-type-filter-dropdown {
    position: relative;
    flex: 1;
}

.alert-type-filter-trigger {
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e5e6eb;
    border-radius: 4px;
    font-size: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.alert-type-filter-trigger:hover {
    border-color: #1976d2;
}

.alert-type-filter-trigger .filter-text {
    flex: 1;
    color: #1d2129;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alert-type-filter-trigger .filter-arrow {
    width: 16px;
    height: 16px;
    margin-left: 8px;
    fill: #86909c;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.alert-type-filter-panel.active ~ .alert-type-filter-trigger .filter-arrow {
    transform: rotate(180deg);
}

.alert-type-filter-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e6eb;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 100;
    display: none;
    flex-direction: column;
    max-height: 280px;
}

.alert-type-filter-panel.active {
    display: flex;
}

.filter-checkbox-item {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.filter-checkbox-item:hover {
    background: #f7f8fa;
}

.filter-checkbox-item input[type="checkbox"] {
    margin: 0;
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-checkbox-item span {
    font-size: 14px;
    color: #1d2129;
}

.filter-panel-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid #e5e6eb;
    background: #f7f8fa;
}

.filter-btn {
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #d9d9d9;
}

.filter-btn-clear {
    background: #ffffff;
    color: #4d5156;
}

.filter-btn-clear:hover {
    background: #f7f8fa;
    border-color: #bbbfc4;
}

.filter-btn-confirm {
    background: #0052d9;
    color: #ffffff;
    border-color: #0052d9;
}

.filter-btn-confirm:hover {
    background: #0042b3;
    border-color: #0042b3;
}

.alert-search-combined {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e5e6eb;
    width: 100%;
}

.alert-search-combined .alert-search-type {
    width: 110px;
    height: 36px;
    padding: 0 8px;
    font-size: 14px;
    background-color: #f7f8fa;
    border: none;
    border-right: 1px solid #e5e6eb;
    border-radius: 0;
    cursor: pointer;
}

.alert-search-combined .alert-search-value {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    border: none;
    border-radius: 0;
}

/* 表格区域 */
.alert-table-container {
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e6eb;
    display: flex;
    flex-direction: column;
    height: 500px;
    position: relative;
    z-index: 1;
}

.alert-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.alert-table-container table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    flex: 1;
}

.alert-table-container thead {
    display: table;
    width: 100%;
    table-layout: fixed;
    flex: none;
}

.alert-table-container thead tr {
    display: table-row;
}

.alert-table-container tbody {
    display: block;
    width: 100%;
    height: 380px;
    overflow-y: auto;
    flex: 1;
}

/* 隐形滚动条样式 - Webkit浏览器 */
.alert-table-container tbody::-webkit-scrollbar {
    width: 6px;
}

.alert-table-container tbody::-webkit-scrollbar-track {
    background: transparent;
}

.alert-table-container tbody::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 3px;
}

.alert-table-container tbody:hover::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

.alert-table-container tbody::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* Firefox隐形滚动条 */
.alert-table-container tbody {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.alert-table-container tbody:hover {
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.alert-table-container tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.alert-data-table th {
    background-color: #f7f8fa;
    color: #1d2129;
    font-weight: 600;
    text-align: left;
    padding: 12px 8px;
    border-bottom: 1px solid #e5e6eb;
    white-space: nowrap;
    box-sizing: border-box;
    width: auto;
}

.alert-data-table td {
    color: #4d5156;
    padding: 12px 8px;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    box-sizing: border-box;
    width: auto;
}

.alert-data-table tbody tr:hover {
    background-color: #f7f8fa;
}

.alert-data-table tbody tr.unread {
    background-color: #fff7e6;
}

.alert-data-table tbody tr:last-child td {
    border-bottom: none;
}

/* 预警类型标签 */
.alert-type-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 400;
    background-color: #f2f3f5;
    color: #4d5156;
    border: 1px solid #e5e6eb;
}

/* 移除所有预警类型的特殊颜色样式 */

/* 状态标签 */
.alert-status-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.alert-status-tag.unread {
    background-color: #fff7e6;
    color: #ff9500;
}

.alert-status-tag.read {
    background-color: #f0f0f0;
    color: #86909c;
}

/* 操作按钮 */
.alert-action-btn {
    margin-right: 8px;
    color: #1976d2;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 14px;
}

.alert-action-btn:hover {
    text-decoration: underline;
}

.alert-action-btn:disabled {
    color: #d9d9d9;
    cursor: not-allowed;
}

/* 分页区域 */
.alert-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-top: 1px solid #e5e6eb;
    background: #ffffff;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.alert-pagination-info {
    font-size: 14px;
    color: #4d5156;
}

.alert-pagination-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.alert-pagination-btn {
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    background-color: #ffffff;
    color: #4d5156;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alert-pagination-btn:hover:not(:disabled) {
    border-color: #1976d2;
    color: #1976d2;
}

.alert-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.alert-page-size {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4d5156;
}

.alert-page-size-select {
    padding: 4px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
}

/* 规则弹窗样式 */
.alert-rule-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.alert-rule-modal.active {
    display: flex;
}

.alert-rule-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.alert-rule-container {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-rule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
}

.alert-rule-title {
    font-size: 18px;
    font-weight: 600;
    color: #262626;
}

.alert-rule-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #8c8c8c;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.alert-rule-close:hover {
    background-color: #f5f5f5;
    color: #262626;
}

.alert-rule-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.alert-rule-form {
    display: flex;
    flex-direction: column;
}

/* 表单区域分组 */
.alert-form-section {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e8eaec;
}

.alert-form-section:last-child {
    margin-bottom: 0;
}

.alert-form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-form-section-desc {
    font-size: 13px;
    color: #86909c;
    margin-bottom: 16px;
    line-height: 1.6;
}

/* 表单行布局 */
.alert-rule-form-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}

.alert-rule-form-row:last-child {
    margin-bottom: 0;
}

.alert-rule-form-control {
    flex: 1;
}

.alert-form-hint {
    font-size: 12px;
    color: #86909c;
    margin-top: 6px;
    line-height: 1.5;
}

/* 货主选择标签容器样式 */
.owner-tags-container {
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid #e5e6eb;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    background: #ffffff;
}

.owner-tags-container:hover {
    border-color: #1976d2;
}

.owner-tags-container.empty {
    color: #86909c;
    font-size: 14px;
    padding: 8px 12px;
}

/* 货主标签样式 */
.owner-tag {
    display: inline-flex;
    align-items: center;
    background-color: #ecf2fe;
    color: #0052d9;
    border-radius: 4px;
    font-size: 12px;
    padding: 4px 8px;
    gap: 4px;
    transition: all 0.2s ease;
}

.owner-tag:hover {
    background-color: #d4e4fd;
}

.owner-tag-text {
    line-height: 1;
}

.owner-tag-remove {
    cursor: pointer;
    color: #0052d9;
    font-size: 14px;
    line-height: 1;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.owner-tag-remove:hover {
    color: #0043b6;
}

.owner-tags-placeholder {
    color: #86909c;
    font-size: 14px;
    line-height: 1;
}

/* 空提示 */
.alert-empty-hint {
    padding: 40px 20px;
    text-align: center;
    color: #86909c;
    font-size: 14px;
    background: #ffffff;
    border-radius: 6px;
}

/* 信息提示框 */
.alert-info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #f3f7ff;
    border: 1px solid #b3d4ff;
    border-radius: 6px;
}

.alert-info-box .info-icon {
    width: 20px;
    height: 20px;
    fill: #0052d9;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-info-box .info-text {
    flex: 1;
    font-size: 13px;
    color: #4d5156;
    line-height: 1.6;
}

.alert-info-box .info-text div {
    margin-bottom: 6px;
}

.alert-info-box .info-text div:last-child {
    margin-bottom: 0;
}

.alert-rule-form-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alert-rule-form-label {
    min-width: 120px;
    padding-top: 8px;
    font-size: 14px;
    color: #1d2129;
    font-weight: 500;
    flex-shrink: 0;
}

.alert-rule-form-label .required {
    color: #d54941;
    margin-left: 4px;
}

.alert-rule-form-input,
.alert-rule-form-select,
.alert-rule-form-textarea {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e5e6eb;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.alert-rule-form-textarea {
    height: auto;
    min-height: 80px;
    padding: 8px 12px;
    resize: vertical;
}

.alert-rule-form-input:focus,
.alert-rule-form-select:focus,
.alert-rule-form-textarea:focus {
    border-color: #1976d2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

/* 开关按钮 */
.alert-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.alert-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.alert-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d9d9d9;
    transition: 0.3s;
    border-radius: 24px;
}

.alert-switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.alert-switch input:checked + .alert-switch-slider {
    background-color: #1976d2;
}

.alert-switch input:checked + .alert-switch-slider:before {
    transform: translateX(20px);
}

.alert-rule-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 20px 24px;
    border-top: 1px solid #e5e5e5;
    gap: 12px;
}

.alert-rule-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid;
}

.alert-rule-btn-cancel {
    background-color: white;
    color: #4d5156;
    border-color: #d9d9d9;
}

.alert-rule-btn-cancel:hover {
    background-color: #f5f5f5;
}

.alert-rule-btn-confirm {
    background-color: #1976d2;
    color: white;
    border-color: #1976d2;
}

.alert-rule-btn-confirm:hover {
    background-color: #1565c0;
}

/* 范围选择（货主/货品） */
.alert-scope-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.alert-scope-btn {
    padding: 12px 16px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    background: #ffffff;
    color: #4d5156;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.alert-scope-btn:hover {
    border-color: #0052d9;
    background: #f3f7ff;
}

.alert-scope-btn.active {
    border-color: #0052d9;
    background: #0052d9;
    color: #ffffff;
}

.alert-scope-btn .scope-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.alert-scope-btn span {
    font-weight: 500;
}

/* 响应式 */
@media (max-width: 1200px) {
    .alert-charts-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .alert-stats-cards {
        grid-template-columns: 1fr;
    }

    .alert-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .alert-search-field {
        width: 100%;
        max-width: 100%;
    }
}

/* 预警类型复选框样式 */
.alert-type-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.alert-type-checkbox-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    background: #ffffff;
}

.alert-type-checkbox-item:hover {
    border-color: #0052d9;
    background: #f3f7ff;
    box-shadow: 0 2px 4px rgba(0, 82, 217, 0.1);
}

.alert-type-checkbox-item input[type="checkbox"] {
    margin: 0;
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0052d9;
}

.alert-type-checkbox-item .type-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    fill: #86909c;
    transition: fill 0.2s;
}

.alert-type-checkbox-item input[type="checkbox"]:checked ~ .type-icon {
    fill: #0052d9;
}

.alert-type-checkbox-item span {
    font-size: 14px;
    color: #4d5156;
    font-weight: 500;
}

.alert-type-checkbox-item input[type="checkbox"]:checked ~ span {
    color: #0052d9;
    font-weight: 600;
}

/* 预警条件区块 */
.alert-condition-section {
    margin-bottom: 16px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e8eaec;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.alert-condition-section:last-child {
    margin-bottom: 0;
}

.alert-condition-title {
    font-size: 15px;
    font-weight: 600;
    color: #0052d9;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8eaec;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-condition-title .condition-icon {
    width: 20px;
    height: 20px;
    fill: #0052d9;
}

/* 规则列表中的多个预警类型标签容器 */
.alert-types-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.alert-types-container .alert-type-tag {
    display: inline-block;
    white-space: nowrap;
}

/* 规则列表表格列宽设置 */
/* 规则名称 */
#rulesTab .alert-data-table thead th:nth-child(1),
#rulesTab .alert-data-table tbody td:nth-child(1) {
    width: 15%;
    min-width: 120px;
}

/* 预警类型 - 加宽以容纳6个标签 */
#rulesTab .alert-data-table thead th:nth-child(2),
#rulesTab .alert-data-table tbody td:nth-child(2) {
    width: 20%;
    min-width: 240px;
}

/* 适用范围 */
#rulesTab .alert-data-table thead th:nth-child(3),
#rulesTab .alert-data-table tbody td:nth-child(3) {
    width: 10%;
    min-width: 80px;
}

/* 预警条件 */
#rulesTab .alert-data-table thead th:nth-child(4),
#rulesTab .alert-data-table tbody td:nth-child(4) {
    width: 20%;
    min-width: 150px;
}

/* 预警频率 */
#rulesTab .alert-data-table thead th:nth-child(5),
#rulesTab .alert-data-table tbody td:nth-child(5) {
    width: 8%;
    min-width: 70px;
}

/* 状态 */
#rulesTab .alert-data-table thead th:nth-child(6),
#rulesTab .alert-data-table tbody td:nth-child(6) {
    width: 6%;
    min-width: 50px;
}

/* 创建时间 */
#rulesTab .alert-data-table thead th:nth-child(7),
#rulesTab .alert-data-table tbody td:nth-child(7) {
    width: 11%;
    min-width: 90px;
}

/* 操作 */
#rulesTab .alert-data-table thead th:nth-child(8),
#rulesTab .alert-data-table tbody td:nth-child(8) {
    width: 10%;
    min-width: 110px;
}
