/* 患者转运中心调度管理平台 - 全局样式表 (style.css)
   用于所有页面的共享样式
*/

/* === 基础重置与全局设置 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* === 布局 === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.section {
    margin-bottom: 30px;
}

.section h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* === 头部导航 === */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.header .subtitle {
    color: #7f8c8d;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.nav-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.nav-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* === 按钮 (Btn) === */
.btn {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 2px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.4);
}

.btn-primary {
    background: linear-gradient(45deg, #3498db, #2980b9);
}
.btn-primary:hover {
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.4);
}

.btn-warning {
    background: linear-gradient(45deg, #f39c12, #e67e22);
}
.btn-warning:hover {
    box-shadow: 0 3px 10px rgba(243, 156, 18, 0.4);
}

.btn-danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}
.btn-danger:hover {
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.4);
}

.btn-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* === 表格 (Table) === */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

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

/* === 表单 (Form) === */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* === 筛选区域 === */
.filter-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

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

/* === 卡片 (Card & KPI) === */
.card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.kpi-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-5px);
}

.kpi-title {
    font-size: 1.1em;
    margin-bottom: 10px;
    opacity: 0.9;
}

.kpi-value {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 5px;
}

.kpi-subtitle {
    font-size: 0.9em;
    opacity: 0.8;
}

/* === 图表占位符 === */
.chart-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.chart-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.chart {
    height: 250px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    font-size: 1em;
    text-align: center;
    padding: 10px;
}

/* === 徽章 (Badge) === */
.status-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-success, .status-completed, .status-resolved, .status-published {
    background: #d4edda;
    color: #155724;
}

.status-warning, .status-pending, .status-draft {
    background: #fff3cd;
    color: #856404;
}

.status-danger, .status-active, .status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.status-info, .status-processing {
    background: #d1ecf1;
    color: #0c5460;
}


/* === 标签页 (Tabs) === */
.tabs {
    display: flex;
    border-bottom: 2px solid #ecf0f1;
    margin-bottom: 20px;
}

.tab {
    padding: 12px 24px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 600;
}

.tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab:hover {
    color: #3498db;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* === 模态框 (Modal) === */
.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);
    overflow: auto; /* 允许模态框内容滚动 */
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 1.8em;
    color: #2c3e50;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}


/* === 响应式设计 === */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .nav-buttons {
        flex-direction: column;
        align-items: center;
    }

    .filter-grid,
    .grid,
    .stats {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 14px; /* 在小屏幕上缩小表格字体 */
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
    }
}