/* ===== 全局样式 ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-600: #6b7280;
    --sidebar-width: 250px;
}

body {
    background-color: var(--gray-100);
    font-family: -apple-system, "Microsoft YaHei", "Segoe UI", sans-serif;
}

/* ===== 公共首页 ===== */
.home-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #fff;
}

.home-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.home-btn {
    display: inline-block;
    padding: 16px 48px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s;
    margin: 0 10px;
}

.btn-contact {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
}
.btn-contact:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
    transform: translateY(-2px);
}

.btn-login {
    background: #fff;
    color: var(--primary);
}
.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    color: var(--primary-dark);
}

/* ===== 侧边栏 ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: #1e293b;
    color: #cbd5e1;
    padding-top: 0;
    z-index: 1000;
    transition: all 0.3s;
    overflow-y: auto;
}

.sidebar .brand {
    padding: 20px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar .nav-link {
    color: #94a3b8;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.sidebar .nav-link:hover {
    background: #334155;
    color: #fff;
}

.sidebar .nav-link.active {
    background: var(--primary);
    color: #fff;
}

.sidebar .nav-icon {
    width: 20px;
    text-align: center;
}

/* ===== 主内容区 ===== */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 24px;
    min-height: 100vh;
}

/* ===== 登录页 ===== */
.login-card {
    max-width: 400px;
    margin: 80px auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* ===== 统计卡片 ===== */
.stat-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s;
    overflow: hidden;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.3;
}
.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}
.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* ===== 表格 ===== */
.table-actions .btn {
    padding: 2px 8px;
    font-size: 0.8rem;
}

/* ===== 查询页 ===== */
.query-card {
    max-width: 900px;
    margin: 40px auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.range-btn {
    border: 1px solid #dee2e6;
    background: #fff;
}

.range-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    .sidebar.show {
        margin-left: 0;
    }
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    .home-hero h1 {
        font-size: 1.8rem;
    }
    .home-btn {
        display: block;
        margin: 10px auto;
        max-width: 280px;
    }
}

/* ===== 顶部栏 ===== */
.topbar {
    background: #fff;
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.topbar h4 {
    margin: 0;
    font-weight: 600;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
}

/* ===== 公告样式 ===== */
.announcement-item .announcement-content {
    line-height: 1.7;
    color: #374151;
}

.announcement-item:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.card-header.bg-warning {
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}
