:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --border-color: #e0e0e0;
    --bg-light: #f8f9fa;
    --bg-white: #fff;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --accent-500: #6366f1;
    --accent-600: #4f46e5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: #f8fafc;
    color: var(--text-primary);
    line-height: 1.6;
    padding-left: 250px;
    padding-bottom: 40px;
}

/* ==================== 左侧目录 ==================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    background: #ffffff;
    border-right: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.06);
    z-index: 999;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

/* Logo 区域 */
.sidebar-logo {
    padding: 16px 10px 16px 10px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo .logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-bottom: 12px;
}

.sidebar-logo .logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

/* 搜索框 */
.search-box {
    position: relative;
    margin-top: 12px;
    margin-bottom: 4px;
}

.search-box input {
    width: 100%;
    padding: 10px 36px 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    background: #f8fafc;
    color: #334155;
    outline: none;
    transition: all 0.25s ease;
}

.search-box input:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box input::placeholder {
    color: #94a3b8;
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
}

/* 筛选区 */
.filter-section {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-color);
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.filter-select {
    width: 100%;
    padding: 7px 26px 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    background: #f8fafc;
    color: #334155;
    outline: none;
    margin-bottom: 8px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
}

.filter-select:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-btn-group {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.filter-btn {
    flex: 1;
    padding: 8px 6px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.filter-btn-primary {
    background: #3b82f6;
    color: #fff;
}

.filter-btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.filter-btn-secondary {
    background: #f1f5f9;
    color: #64748b;
}

.filter-btn-secondary:hover {
    background: #e2e8f0;
}

/* 侧栏统计信息 */
.sidebar-stats {
    padding: 12px 10px 0px 10px;
}

.stat-row {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.8;
}

.stat-row span {
    color: #3b82f6;
    font-weight: 600;
    font-size: 15px;
}

/* 行业列表（导航） */
.filter-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    background: #f8fafc;
    color: #334155;
    outline: none;
    margin-bottom: 4px;
    transition: all 0.25s ease;
}

.filter-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-input-wrap .filter-input {
    padding-right: 24px;
}

.filter-clear-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    font-size: 14px;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.15s;
    user-select: none;
}

.filter-clear-btn:hover {
    color: #475569;
    background: #e2e8f0;
}

.filter-input:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-input::placeholder {
    color: #94a3b8;
}

.filter-field {
    margin-bottom: 6px;
}

.filter-field-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 3px;
    letter-spacing: 0.3px;
}

.filter-input-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* ==================== 折叠面板复选框筛选（仿 traditional-screening） ==================== */
.attr-collapse {
    margin-bottom: 4px;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}
.attr-collapse-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    background: #f8fafc;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.attr-collapse-header:hover {
    background: #f1f5f9;
}
.attr-arrow {
    font-size: 10px;
    color: #94a3b8;
    transition: transform 0.2s ease;
    width: 12px;
    text-align: center;
    flex-shrink: 0;
}
.attr-arrow.collapsed {
    transform: rotate(-90deg);
}
.attr-title {
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    flex: 1;
}
.attr-all {
    flex-shrink: 0;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: #64748b;
}
.attr-all input[type="checkbox"] {
    width: 12px;
    height: 12px;
    accent-color: #3b82f6;
}
.attr-list {
    max-height: 150px;
    overflow-y: auto;
    padding: 2px 8px 4px 8px;
}
.attr-list.collapsed {
    display: none;
}
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0;
    font-size: 11px;
    color: #64748b;
    cursor: pointer;
}
.checkbox-item:hover {
    color: #3b82f6;
}
.checkbox-item input[type="checkbox"] {
    accent-color: #3b82f6;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}
.loading-sm {
    font-size: 11px;
    color: #94a3b8;
    padding: 6px 2px;
    text-align: center;
}

.sidebar-nav {
    padding: 8px 0;
}

.sidebar-nav-title {
    padding: 10px 20px 6px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item {
    display: block;
    width: 100%;
    padding: 9px 20px;
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    font-family: inherit;
    line-height: 1.5;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item:hover {
    color: #3b82f6;
    background: #eff6ff;
    border-left-color: #3b82f6;
}

.nav-item.active {
    color: #3b82f6;
    font-weight: 500;
    background: rgba(59, 130, 246, 0.08);
    border-left-color: #3b82f6;
}

/* ==================== 主内容区 ==================== */
.main-content {
    padding: 24px 28px;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.page-subtitle span {
    color: var(--primary-color);
    font-weight: 600;
}

/* 校招卡片列表 - 紧凑三行布局 */
.recruitment-list {
    display: grid;
    gap: 10px;
}

.cr-card {
    background: var(--bg-white);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cr-card:hover {
    border-color: var(--accent-500);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.cr-card-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* 第一行：公司 · 岗位 [标签] | 薪资 人数 地点 */
.cr-line-main {
    font-size: 0.85rem;
    color: #64748b;
}

.cr-company {
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    flex-shrink: 0;
    margin-left: auto;
    order: 99;
}

.cr-job-title {
    font-weight: 600;
    color: #334155;
}

.cr-meta-sep {
    color: #cbd5e1;
}

.cr-salary {
    color: #059669;
    font-weight: 700;
}

.cr-meta-item {
    color: #64748b;
}

.cr-badges {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.cr-type-tag {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    background: #dbeafe;
    color: #1d4ed8;
}

.cr-nature-tag {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    background: #fef3c7;
    color: #d97706;
}

.cr-industry-tag {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 0.7rem;
    background: #f0fdf4;
    color: #16a34a;
    font-weight: 500;
}

/* 第二行：目标专业 + 院校 */
.cr-line-sub {
    font-size: 0.82rem;
    color: #94a3b8;
    border-top: 1px dashed #f1f5f9;
    padding-top: 6px;
}

.cr-majors {
    color: #64748b;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cr-college {
    color: var(--accent-500);
    font-weight: 500;
    flex-shrink: 0;
}

/* 分页 */
.pagination-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.page-btn {
    padding: 7px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--accent-500);
    color: var(--accent-500);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-btn.active {
    background: var(--accent-500);
    color: #fff;
    border-color: var(--accent-500);
}

.page-info {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* 详情弹窗 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 14px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-close-btn:hover { color: #475569; }

.modal-body { padding: 18px; }

.modal-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.modal-detail-item {
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 6px;
}

.modal-detail-item .label {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-bottom: 2px;
}

.modal-detail-item .value {
    font-size: 0.82rem;
    color: #1e293b;
    font-weight: 500;
}

.modal-desc-section { margin-bottom: 10px; }

.modal-desc-section h4 {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-desc-section .text {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
    opacity: 0.4;
}

.empty-state p { font-size: 0.95rem; }

/* 加载状态 */
.loading {
    text-align: center;
    padding: 80px;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color);
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    body {
        padding-left: 0;
        padding-top: 0;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    }

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

    .sidebar-logo .logo-link {
        margin-bottom: 0;
    }

    .main-content {
        padding: 16px;
    }

    .page-title {
        font-size: 20px;
    }

    .cr-card {
        padding: 16px;
    }

    .modal-detail-grid {
        grid-template-columns: 1fr;
    }
}
