/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    --border-radius: 12px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
}

/* 毛玻璃效果 */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
}

/* 悬浮特效 */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25);
}

/* 卡片样式 */
.card {
    padding: 20px;
    margin: 10px;
    border-radius: var(--border-radius);
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

/* 表单样式 */
.form-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #45a049 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #45a049 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1976D2 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #1976D2 0%, var(--secondary-color) 100%);
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.status-normal { background: #4CAF50; color: white; }
.status-maintenance { background: #FF9800; color: white; }
.status-disabled { background: #F44336; color: white; }
.status-pending { background: #9E9E9E; color: white; }

/* 导航栏 */
.navbar {
    padding: 15px 30px;
    margin-bottom: 20px;
}

.navbar-brand {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-container {
        margin: 20px;
        padding: 20px;
    }
    
    .card {
        margin: 8px 5px;
        padding: 15px;
    }
    
    .navbar {
        padding: 10px 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 网格布局 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 15px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 30px;
    max-width: 500px;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 输入验证 */
.invalid-feedback {
    color: #F44336;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.is-invalid {
    border-color: #F44336 !important;
}

.is-invalid ~ .invalid-feedback {
    display: block;
}

/* 工具类 */
.text-muted { color: #666; }
.text-small { font-size: 12px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.text-center { text-align: center; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }