/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f6fa;
    color: #2c3e50;
    line-height: 1.6;
}

/* 主容器 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边导航栏 */
.sidebar {
    width: 260px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 28px;
    color: #ffd700;
}

.logo h3 {
    font-size: 18px;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.menu-item {
    margin-bottom: 5px;
}

.menu-item a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.menu-item a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.menu-item.active a {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-right: 3px solid #ffd700;
}

.menu-item a i {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
}

.menu-toggle .arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.menu-item.open .arrow {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.1);
}

.menu-item.open .submenu {
    max-height: 200px;
}

.submenu li a {
    padding: 10px 20px 10px 52px;
    font-size: 14px;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    background: #f5f6fa;
}

/* 顶部导航栏 */
.topbar {
    background: white;
    padding: 0 30px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: #f0f0f0;
    color: #333;
}

.topbar h1 {
    font-size: 24px;
    color: #2c3e50;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 25px;
    color: #666;
}

.user-info i {
    font-size: 20px;
}

/* 仪表板 */
.dashboard {
    padding: 30px;
    max-width: 1400px;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.stat-card:nth-child(1) { border-left-color: #e74c3c; }
.stat-card:nth-child(2) { border-left-color: #3498db; }
.stat-card:nth-child(3) { border-left-color: #2ecc71; }
.stat-card:nth-child(4) { border-left-color: #f39c12; }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card:nth-child(1) .stat-icon { background: rgba(231, 76, 60, 0.1); color: #e74c3c; }
.stat-card:nth-child(2) .stat-icon { background: rgba(52, 152, 219, 0.1); color: #3498db; }
.stat-card:nth-child(3) .stat-icon { background: rgba(46, 204, 113, 0.1); color: #2ecc71; }
.stat-card:nth-child(4) .stat-icon { background: rgba(243, 156, 18, 0.1); color: #f39c12; }

.stat-content h3 {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-content p {
    color: #7f8c8d;
    font-size: 14px;
}

/* 主要功能网格 */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 18px;
    color: #2c3e50;
    font-weight: 600;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #f0f0f0;
    color: #333;
}

.btn-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-link:hover {
    background: rgba(102, 126, 234, 0.1);
}

.card-content {
    padding: 25px;
}

/* 风险事件列表 */
.risk-events {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.risk-event {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.risk-event:hover {
    transform: translateX(5px);
}

.risk-event.high { background: rgba(231, 76, 60, 0.05); border-left: 3px solid #e74c3c; }
.risk-event.medium { background: rgba(243, 156, 18, 0.05); border-left: 3px solid #f39c12; }
.risk-event.low { background: rgba(52, 152, 219, 0.05); border-left: 3px solid #3498db; }

.event-info h4 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.event-info p {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 5px;
}

.event-time {
    font-size: 12px;
    color: #95a5a6;
}

.level-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.level-badge.high { background: #e74c3c; }
.level-badge.medium { background: #f39c12; }
.level-badge.low { background: #3498db; }

/* 场景分析网格 */
.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.scenario-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
}

.scenario-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.scenario-card:nth-child(1) { border-top-color: #e74c3c; }
.scenario-card:nth-child(2) { border-top-color: #f39c12; }
.scenario-card:nth-child(3) { border-top-color: #3498db; }
.scenario-card:nth-child(4) { border-top-color: #9b59b6; }

.scenario-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 15px;
}

.scenario-card:nth-child(1) .scenario-icon { background: rgba(231, 76, 60, 0.1); color: #e74c3c; }
.scenario-card:nth-child(2) .scenario-icon { background: rgba(243, 156, 18, 0.1); color: #f39c12; }
.scenario-card:nth-child(3) .scenario-icon { background: rgba(52, 152, 219, 0.1); color: #3498db; }
.scenario-card:nth-child(4) .scenario-icon { background: rgba(155, 89, 182, 0.1); color: #9b59b6; }

.scenario-info h4 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.scenario-info p {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.scenario-stats {
    display: flex;
    gap: 15px;
}

.stat-item {
    font-size: 12px;
    color: #666;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.data-table th {
    background: #667eea;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

/* 过滤器区域 */
.filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

/* 大屏样式 */
.executive-dashboard {
    background: #0f1419;
    color: white;
    padding: 20px;
    min-height: 100vh;
}

.dashboard-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 30px;
    color: #00d4ff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.big-screen-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    height: calc(100vh - 150px);
}

.big-screen-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.big-screen-title {
    font-size: 20px;
    color: #00d4ff;
    margin-bottom: 15px;
    text-align: center;
}

/* 侧边栏折叠状态 */
.sidebar.collapsed {
    transform: translateX(-100%);
}

.main-content.expanded {
    margin-left: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1001;
    }
    
    .sidebar:not(.collapsed) {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    /* 添加遮罩层 */
    .sidebar:not(.collapsed)::before {
        content: '';
        position: fixed;
        top: 0;
        left: 260px;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .scenarios-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .topbar {
        padding: 0 15px;
    }
    
    .dashboard {
        padding: 15px;
    }
}

/* 桌面端隐藏汉堡菜单 */
@media (min-width: 769px) {
    .sidebar-toggle {
        display: none;
    }
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .stat-card, .scenario-card {
    animation: fadeIn 0.6s ease forwards;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 