/**
 * SCADA 告警样式 — 深色主题（与趋势图卡片同系，略偏冷灰区分）
 */

.alert-panel {
    background: rgba(22, 30, 46, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 10px;
    padding: 20px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    color: #f8fafc;
}

.alert-panel-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.alert-panel-header h4 {
    margin: 0;
    color: #ffffff;
}

.alert-count {
    background: #4CAF50;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.alert-count.has-alerts {
    background: #f44336;
}

.alert-list {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(226, 232, 240, 0.35) rgba(255, 255, 255, 0.06);
}

.alert-list::-webkit-scrollbar {
    width: 8px;
}

.alert-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}

.alert-list::-webkit-scrollbar-thumb {
    background: rgba(226, 232, 240, 0.35);
    border-radius: 4px;
}

.alert-list::-webkit-scrollbar-thumb:hover {
    background: rgba(248, 250, 252, 0.5);
}

.alert-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    border-left: 4px solid;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
}

.alert-item.alert-critical {
    border-left-color: #f44336;
    background: rgba(244, 67, 54, 0.16);
}

.alert-item.alert-warning {
    border-left-color: #ff9800;
    background: rgba(255, 152, 0, 0.16);
}

.alert-item.alert-info {
    border-left-color: #4CAF50;
    background: rgba(76, 175, 80, 0.14);
}

.alert-icon {
    font-size: 1.2em;
}

.alert-content {
    flex: 1;
}

.alert-time {
    font-size: 0.85em;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.alert-message {
    font-size: 0.9em;
    color: #ffffff;
    font-weight: 500;
}

.alert-action {
    font-size: 0.85em;
    color: #f1f5f9;
    margin-top: 4px;
    font-style: italic;
}

.view-all-alerts {
    flex-shrink: 0;
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(125, 211, 252, 0.45);
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
}

.view-all-alerts:hover {
    background: rgba(56, 189, 248, 0.24);
    color: #ffffff;
}
