/* 智聘通 - 后台管理样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1677ff;
    --primary-light: #e6f4ff;
    --primary-dark: #0958d9;
    --success: #52c41a;
    --success-light: #f6ffed;
    --warning: #faad14;
    --error: #ff4d4f;
    --text-primary: #262626;
    --text-secondary: #595959;
    --text-tertiary: #8c8c8c;
    --border: #d9d9d9;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 12px;
    --radius-sm: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
}

/* 布局 */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 220px;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.logo span {
    font-size: 32px;
}

.logo h1 {
    font-size: 20px;
    font-weight: 600;
}

.nav-menu {
    padding: 0 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.nav-item:hover {
    background: var(--bg);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-item span {
    font-size: 18px;
}

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

/* 顶部栏 */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.top-bar h2 {
    font-size: 20px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
}

.btn-logout {
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    border-color: var(--error);
    color: var(--error);
}

/* 内容区域 */
.content-section {
    display: none;
}

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

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 图表区域 */
.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.chart-card h3 {
    font-size: 15px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.chart-content {
    min-height: 200px;
}

.chart-bar {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.chart-label {
    width: 100px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.chart-track {
    flex: 1;
    height: 20px;
    background: var(--bg);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 12px;
}

.chart-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.chart-value {
    width: 40px;
    text-align: right;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* 最近候选人 */
.recent-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.recent-section h3 {
    font-size: 15px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg);
}

.data-table tr:hover {
    background: var(--primary-light);
}

.data-table .mbti-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.btn-action {
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--primary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover {
    background: var(--primary);
    color: white;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.filter-bar input,
.filter-bar select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.filter-bar input {
    width: 160px;
}

.filter-bar select {
    width: 140px;
}

.btn-export {
    margin-left: auto;
    padding: 8px 16px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-export:hover {
    opacity: 0.9;
}

/* 数据分析 */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.analytics-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.analytics-card.full-width {
    grid-column: 1 / -1;
}

.analytics-card h3 {
    font-size: 15px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.analytics-chart {
    min-height: 250px;
}

/* 设置 */
.settings-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    max-width: 600px;
}

.settings-card h3 {
    font-size: 15px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    resize: vertical;
}

.btn-primary {
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-danger {
    padding: 10px 24px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    opacity: 0.9;
}

.hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--error);
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 16px;
}

.btn-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-tertiary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.btn-secondary {
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

/* 详情弹窗内容 */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item.full {
    grid-column: 1 / -1;
}

.detail-item.label {
    font-size: 12px;
    color: var(--text-tertiary);
}

.detail-item.value {
    font-size: 14px;
    color: var(--text-primary);
}

.detail-mbti {
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 16px;
}

/* 申请类型标签 */
.type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.type-badge.type-job {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid #b7eb8f;
}

.type-badge.type-interview {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid #91caff;
}

/* 响应式 */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .admin-layout {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-wrap: wrap;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
    }
}

/* ==================== 员工关怀体系样式 ==================== */

.care-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
    padding: 30px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.care-header h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.care-subtitle {
    opacity: 0.9;
    font-size: 14px;
}

/* 生命周期时间轴 */
.care-timeline {
    display: flex;
    justify-content: space-between;
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.timeline-item {
    flex: 1;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
    position: relative;
}

.timeline-item:hover {
    background: var(--primary-light);
}

.timeline-item.active {
    background: var(--primary);
    color: white;
}

.timeline-item.active::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--primary);
}

.timeline-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 14px;
    font-weight: 500;
}

/* 关怀内容区域 */
.care-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.stage-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.stage-header h4 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stage-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 关怀卡片 */
.care-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.care-card {
    background: #f8f9fa;
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
}

.care-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.care-card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
}

.care-card h5 {
    font-size: 16px;
    margin-bottom: 12px;
}

.care-list {
    list-style: none;
    text-align: left;
    margin-bottom: 16px;
}

.care-list li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 14px;
    color: var(--text-secondary);
}

.care-list li:last-child {
    border-bottom: none;
}

.btn-care-edit {
    background: white;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-care-edit:hover {
    background: var(--primary);
    color: white;
}

/* 岗位差异化关怀 */
.position-care-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border);
}

.position-care-section h5 {
    font-size: 16px;
    margin-bottom: 16px;
}

.position-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.position-tab {
    padding: 10px 20px;
    background: #f0f0f0;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.position-tab:hover {
    background: var(--primary-light);
}

.position-tab.active {
    background: var(--primary);
    color: white;
}

.care-detail-card {
    background: linear-gradient(135deg, #fff5f5 0%, #fff0f0 100%);
    border-radius: var(--radius);
    padding: 24px;
    border-left: 4px solid #ff6b6b;
}

.care-detail-card h6 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #c41d7f;
}

.care-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.care-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 16px;
    border-radius: var(--radius-sm);
}

.care-item-icon {
    width: 40px;
    height: 40px;
    background: #fff0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.care-item-info strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.care-item-info p {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 关怀统计 */
.care-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.care-stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
}

.care-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 8px;
}

.care-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 关怀记录 */
.care-records {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.care-records h4 {
    font-size: 16px;
    margin-bottom: 16px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.done {
    background: var(--success-light);
    color: var(--success);
}

.status-badge.pending {
    background: #fff7e6;
    color: #fa8c16;
}

/* 响应式 */
@media (max-width: 1200px) {
    .care-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .care-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .care-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .care-timeline {
        flex-wrap: wrap;
    }
    .timeline-item {
        flex: 0 0 33.33%;
    }
    .care-cards {
        grid-template-columns: 1fr;
    }
    .care-stats {
        grid-template-columns: 1fr;
    }
    .position-tabs {
        flex-wrap: wrap;
    }
}

/* ==================== 生日关怀样式 ==================== */

.birthday-care-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border);
}

.birthday-care-section h5 {
    font-size: 16px;
    margin-bottom: 20px;
}

.birthday-mode-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 24px;
}

.birthday-tab {
    flex: 1;
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.birthday-tab:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.birthday-tab.active {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #fff5f5 0%, #fff0f0 100%);
}

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

.tab-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.tab-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.birthday-content {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
}

.birthday-plan-card {
    background: linear-gradient(135deg, #fff8f0 0%, #fff5f5 100%);
    border-radius: var(--radius);
    padding: 24px;
    border-left: 4px solid #ff6b6b;
}

.birthday-plan-card h6 {
    font-size: 18px;
    color: #c41d7f;
    margin-bottom: 20px;
}

.plan-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.plan-stat {
    flex: 1;
    background: white;
    padding: 16px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.birthday-activities {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.birthday-activities .activity-item {
    background: white;
    padding: 16px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

.birthday-activities .activity-icon {
    width: 44px;
    height: 44px;
    background: #fff0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.birthday-activities .activity-info strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.birthday-activities .activity-info p {
    font-size: 12px;
    color: var(--text-tertiary);
}

.next-birthday {
    background: white;
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-top: 20px;
}

.next-birthday h6 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.next-birthday p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.btn-birthday-arrange {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-top: 12px;
    transition: all 0.3s;
}

.btn-birthday-arrange:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

/* 响应式 */
@media (max-width: 768px) {
    .birthday-mode-tabs {
        flex-direction: column;
    }
    .plan-stats {
        flex-direction: column;
    }
    .birthday-activities {
        grid-template-columns: 1fr;
    }
}
