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

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

/* ========== 登录页样式 ========== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 48px;
    margin-bottom: 10px;
}

.login-header h1 {
    color: #333;
    font-size: 24px;
    margin-bottom: 8px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
    display: none;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.login-footer p {
    color: #999;
    font-size: 12px;
}

/* ========== 导航页样式 ========== */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5f7fa;
}

/* 顶部导航栏 */
.top-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-brand .logo {
    font-size: 28px;
}

.nav-brand h1 {
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-name {
    color: white;
    font-size: 14px;
}

.logout-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 主内容区 */
.main-content {
    padding: 24px;
    flex: 1;
}

.welcome-section {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-section h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 8px;
}

.welcome-section p {
    color: #666;
    font-size: 14px;
}

/* 指标区块 */
.indicator-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.indicator-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.indicator-icon {
    font-size: 32px;
}

.indicator-header h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.indicator-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

/* 区域网格 */
.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.region-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #f8f9fc;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    border: 2px solid transparent;
}

.region-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.region-card:hover .region-icon,
.region-card:hover .region-name,
.region-card:hover .region-desc {
    color: white;
}

.region-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.region-name {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.region-desc {
    color: #999;
    font-size: 12px;
}

/* 市级汇总卡片特殊样式 */
.region-card.city-level {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
}

.region-card.city-level .region-icon,
.region-card.city-level .region-name,
.region-card.city-level .region-desc {
    color: white;
}

.region-card.city-level:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(17, 153, 142, 0.3);
}

/* 底部 */
.dashboard-footer {
    text-align: center;
    padding: 20px;
    background: #333;
    color: #999;
}

.dashboard-footer p {
    margin: 4px 0;
    font-size: 12px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .login-box {
        padding: 30px 20px;
    }

    .login-header h1 {
        font-size: 20px;
    }

    .top-nav {
        padding: 12px 16px;
    }

    .nav-brand h1 {
        font-size: 16px;
    }

    .main-content {
        padding: 16px;
    }

    .indicator-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .region-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .region-card {
        padding: 16px;
    }

    .region-icon {
        font-size: 24px;
    }

    .region-name {
        font-size: 14px;
    }
}