/* ── 全局 ─────────────────────────────── */
:root {
    --sidebar-width: 160px;
    --primary-color: #1a5276;
    --sidebar-bg: #1a252f;
    --sidebar-hover: #2c3e50;
    --sidebar-active: #2980b9;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    font-size: 0.8rem;
}

/* ── 侧边栏 ──────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    color: #ecf0f1;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    overflow-y: auto;
}

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

.sidebar-header h5 {
    margin: 0;
    color: #fff;
    font-size: 0.85rem;
}

.sidebar .nav-link {
    color: #bdc3c7;
    padding: 10px 20px;
    font-size: 0.8rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

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

.sidebar .nav-link.active {
    color: #fff;
    background: var(--sidebar-hover);
    border-left-color: var(--sidebar-active);
    font-weight: 600;
}

.sidebar .nav-link i {
    margin-right: 8px;
    width: 18px;
    text-align: center;
}

.sidebar .nav-section {
    padding: 15px 20px 5px;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #7f8c8d;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ── 主内容区 ─────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

.top-bar {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    min-height: 56px;
}

.content-area {
    padding-top: 20px;
}

/* ── 认证页 ───────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a5276, #2980b9);
    padding: 20px;
}

.auth-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-card h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
}

/* ── 卡片 ─────────────────────────────── */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-card .stat-label {
    font-size: 0.7rem;
    color: #7f8c8d;
    margin-top: 5px;
}

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

.page-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1rem;
}

.form-label {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.form-control, .form-select {
    font-size: 0.8rem;
}

.btn {
    font-size: 0.8rem;
}

.btn-sm {
    font-size: 0.75rem;
}

.modal-title {
    font-size: 0.95rem;
}

.badge {
    font-size: 0.7rem;
}

.pagination .page-link {
    font-size: 0.8rem;
}

/* ── 表格 ─────────────────────────────── */
.table-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.table-card .table {
    margin-bottom: 0;
}

.table-card .table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.75rem;
    color: #555;
    border-bottom: 2px solid #e9ecef;
}

.table-card .table td {
    vertical-align: middle;
    font-size: 0.8rem;
}

/* ── 状态标签 ─────────────────────────── */
.badge-pending { background: #f39c12; color: #fff; }
.badge-approved { background: #27ae60; color: #fff; }
.badge-rejected { background: #e74c3c; color: #fff; }
.badge-upcoming { background: #3498db; color: #fff; }
.badge-ongoing { background: #2ecc71; color: #fff; }
.badge-completed { background: #95a5a6; color: #fff; }
.badge-cancelled { background: #e74c3c; color: #fff; }

/* ── 响应式 ───────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}
