/* 告警管理系统 - 自定义样式 */

/* ===== 全局基础样式 ===== */
body {
    background: #f4f6f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    font-size: 14px;
}

/* ===== 导航栏 ===== */
.navbar-dark.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%) !important;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}
.navbar-brand {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* ===== 设备卡片 ===== */
.device-card {
    transition: all 0.25s ease;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
}
.device-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12) !important;
}
.device-card .device-icon {
    transition: all 0.3s ease;
}
.device-card:hover .device-icon {
    transform: scale(1.05);
}

/* 卡片边框颜色 */
.device-card.border-success { border-left: 4px solid #28a745 !important; }
.device-card.border-warning { border-left: 4px solid #ffc107 !important; }
.device-card.border-danger  { border-left: 4px solid #dc3545 !important; }

/* 状态颜色工具类 */
.status-green  { color: #28a745; }
.status-yellow { color: #ffc107; }
.status-red   { color: #dc3545; }

/* ===== 控制台分组标签 ===== */
.btn-outline-primary.active,
.btn-outline-primary:hover {
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.25);
}

/* ===== 表格优化 ===== */
.table th {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #6c757d;
    border-bottom-width: 1px;
}
.table td {
    vertical-align: middle;
    font-size: 13.5px;
}
.table-warning {
    background-color: rgba(255, 193, 7, 0.08) !important;
}

/* ===== 卡片优化 ===== */
.card {
    border-radius: 10px;
    border: none;
}
.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: transparent;
    font-weight: 600;
}

/* ===== 按钮优化 ===== */
.btn {
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}
.btn-sm {
    padding: 0.25rem 0.75rem;
}
.btn-primary {
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.25);
}
.btn-primary:hover {
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.35);
    transform: translateY(-1px);
}

/* ===== 表单优化 ===== */
.form-control-sm,
.form-select-sm {
    border-radius: 6px;
    font-size: 13.5px;
}
.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ===== 警告提示优化 ===== */
.alert {
    border-radius: 8px;
    border: none;
}
.alert-success { background: #d1e7dd; color: #0a3622; }
.alert-danger  { background: #f8d7da; color: #58151c; }
.alert-warning { background: #fff3cd; color: #664d03; }

/* ===== 徽章优化 ===== */
.badge {
    font-weight: 500;
    font-size: 11.5px;
    padding: 0.3em 0.6em;
    border-radius: 5px;
}

/* ===== 分页（如有需要） ===== */
.pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
    font-size: 13px;
}

/* ===== 响应式优化 ===== */
@media (max-width: 768px) {
    .device-card .card-body {
        padding: 12px !important;
    }
    .device-icon svg {
        width: 50px !important;
        height: 80px !important;
    }
    h5 { font-size: 1.1rem; }
}

/* ===== 登录页背景动画 ===== */
body.bg-light {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important;
    min-height: 100vh;
}

/* ===== 风力发电机叶片旋转动画（可选） ===== */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.device-icon svg:hover ellipse:nth-child(3),
.device-icon svg:hover ellipse:nth-child(4),
.device-icon svg:hover ellipse:nth-child(5) {
    /* 悬停时叶片微转动效果（通过JS实现更佳） */
}

/* ===== 页脚 ===== */
footer {
    font-size: 12px;
    color: #adb5bd;
}
