/* ==================== 招聘系统样式 ==================== */

/* 基础变量 */
:root {
    --primary-color: #4a90e2;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --danger-color: #f5222d;
    --info-color: #1890ff;
    --text-color: #333;
    --text-secondary: #666;
    --border-color: #e8e8e8;
    --bg-light: #fafafa;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --border-radius: 8px;
}

/* 页面布局 */
.recruitment-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    background: var(--bg-light);
    min-height: 100vh;
}

/* 页面头部 */
.page-header {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

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

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 操作按钮组 */
.header-actions {
    display: flex;
    gap: 12px;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.btn-primary:hover {
    background: #357abd;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f0f0f0;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #d48806;
}

.btn-success:hover {
    background: #389e0d;
}

.btn-danger:hover {
    background: #cf1322;
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-sm svg {
    flex-shrink: 0;
}

/* 岗位卡片网格 */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* 岗位卡片 */
.job-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border: 2px solid transparent;
    overflow: hidden;
}

.job-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.job-card-content {
    padding: 20px;
    cursor: pointer;
}

.job-card-actions {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.job-card-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.job-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

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

.status-open {
    background: #f6ffed;
    color: var(--success-color);
}

.status-closed {
    background: #fff1f0;
    color: var(--danger-color);
}

.status-paused {
    background: #fffbe6;
    color: var(--warning-color);
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 12px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.job-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-light);
    border-radius: 4px;
    transition: all 0.2s;
}

.job-meta-item:hover {
    background: #e8e8e8;
}

.job-meta-item .meta-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--primary-color);
}

.job-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-stats {
    display: flex;
    gap: 20px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.job-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

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

/* 表格样式 */
.data-table {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: var(--bg-light);
}

.table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.table tbody tr:hover {
    background: var(--bg-light);
}

/* 评分显示 */
.score-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
}

.score-high {
    background: #f6ffed;
    color: var(--success-color);
}

.score-medium {
    background: #fffbe6;
    color: var(--warning-color);
}

.score-low {
    background: #fff1f0;
    color: var(--danger-color);
}

/* 标签组 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.tag {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.tag-success {
    background: #f6ffed;
    color: var(--success-color);
    border-color: #b7eb8f;
}

.tag-warning {
    background: #fffbe6;
    color: var(--warning-color);
    border-color: #ffe58f;
}

.tag-danger {
    background: #fff1f0;
    color: var(--danger-color);
    border-color: #ffccc7;
}

/* 详情页布局 */
.detail-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
}

.detail-main {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.info-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

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

.info-value {
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
}

/* 雷达图容器 */
.radar-chart-container {
    margin: 24px 0;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.chart-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Markdown内容样式 */
.markdown-content {
    line-height: 1.8;
    color: var(--text-color);
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
}

.markdown-content h1 {
    font-size: 24px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
}

.markdown-content h2 {
    font-size: 20px;
}

.markdown-content h3 {
    font-size: 18px;
}

.markdown-content p {
    margin: 12px 0;
}

.markdown-content ul,
.markdown-content ol {
    padding-left: 24px;
    margin: 12px 0;
}

.markdown-content li {
    margin: 8px 0;
}

.markdown-content code {
    background: var(--bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.markdown-content pre {
    background: var(--bg-light);
    padding: 16px;
    border-radius: var(--border-radius);
    overflow-x: auto;
}

/* 文件上传区域 */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary-color);
    background: #f0f8ff;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.upload-text {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 14px;
    color: var(--text-secondary);
}

.upload-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--border-radius);
    z-index: 2;
}

.upload-spinner {
    width: 28px;
    height: 28px;
    border-width: 3px;
}

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

/* 进度条 */
.progress {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
    margin: 16px 0;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* 加载状态 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 按钮内的加载动画 */
.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

.btn-secondary .btn-spinner {
    border-color: rgba(0, 0, 0, 0.15);
    border-top-color: var(--text-color);
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 小型加载动画 - 用于表格内 */
.mini-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #e0e0e0;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

/* 分析中状态的徽章 */
.analyzing-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(90deg, #e6f7ff, #f0f5ff);
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

.tag-analyzing {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(90deg, #e6f7ff, #f0f5ff) !important;
    color: var(--primary-color) !important;
    border: 1px solid #91d5ff;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .jobs-grid {
        grid-template-columns: 1fr;
    }

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

    .page-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .header-actions {
        width: 100%;
        justify-content: stretch;
    }

    .header-actions .btn {
        flex: 1;
    }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-white);
    border-radius: 12px;
    max-width: 560px;
    width: calc(100% - 40px);
    max-height: 90vh;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    margin: 20px;
}

.modal-header {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-light);
    border-radius: 12px 12px 0 0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: var(--bg-light);
}

.modal-body {
    padding: 24px 28px;
}

/* 弹窗内的表单布局优化 */
.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-body form {
    max-width: 100%;
}

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

/* ==================== Tab 切换样式 ==================== */
.tab-container {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 录音列表项样式 */
.recording-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.recording-item:last-child {
    border-bottom: none;
}

.recording-item:hover {
    background: #f9f9f9;
}

.recording-info {
    flex: 1;
    min-width: 0;
}

.recording-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.recording-meta {
    font-size: 12px;
    color: #999;
}

.recording-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.recording-actions audio {
    max-width: 200px;
    height: 30px;
}

.btn-danger {
    background: #f5222d;
    color: white;
}

.btn-danger:hover {
    background: #d41a24;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
    min-height: auto;
}
