/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #fafafa;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* 头部 */
header {
    position: relative;
    text-align: center;
    margin-bottom: 2rem;
}

.service-settings-button {
    position: absolute;
    top: -0.35rem;
    right: 0;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgb(255 255 255 / 0.86);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    transition: all 0.2s;
}

.service-settings-button:hover,
.service-settings-button:focus-visible {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    outline: none;
    transform: rotate(18deg);
}

body.modal-open {
    overflow: hidden;
}

header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.eyebrow,
.section-kicker {
    display: inline-block;
    margin-bottom: 0.55rem;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

/* 上传区域 */
.upload-section {
    margin-bottom: 1.5rem;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--card-bg);
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: scale(1.01);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.upload-area p {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

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

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
}

.file-info span {
    font-weight: 500;
    color: var(--primary);
}

.btn-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-remove:hover {
    background: #fee2e2;
}

/* AI 服务 */
.service-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgb(15 23 42 / 0.48);
    backdrop-filter: blur(4px);
}

.service-modal {
    width: min(680px, 100%);
    max-height: min(720px, calc(100vh - 2rem));
    overflow-y: auto;
    padding: 1.35rem;
    border: 1px solid rgb(255 255 255 / 0.7);
    border-radius: 16px;
    background: var(--card-bg);
    box-shadow: var(--shadow-lg);
}

.service-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.service-modal-header h2 {
    margin-bottom: 0;
    font-size: 1.25rem;
}

.account-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.9rem 0 0.25rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
}

.account-status-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.account-status-value {
    max-width: 70%;
    overflow: hidden;
    color: var(--primary);
    font-size: 0.85rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-status.guest .account-status-value,
.account-status.pending .account-status-value {
    color: var(--text-secondary);
}

.service-modal-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.35rem 0 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.service-modal-intro {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.modal-close {
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
}

.modal-close:hover,
.modal-close:focus-visible {
    background: var(--primary-light);
    color: var(--primary);
    outline: none;
}

.service-section {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.service-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.service-heading h2 {
    margin-bottom: 0.25rem;
    font-size: 1.15rem;
}

.service-heading p,
.service-option small,
.privacy-note {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.quota-badge {
    flex: 0 0 auto;
    padding: 0.35rem 0.65rem;
    border-radius: 9999px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.service-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.service-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.service-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.service-option input {
    margin-top: 0.2rem;
    accent-color: var(--primary);
}

.service-option span {
    display: grid;
    gap: 0.15rem;
}

.custom-api-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border);
}

.custom-select-field {
    position: relative;
    display: grid;
    gap: 0.35rem;
}

.field-label {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
}

.custom-select {
    position: relative;
    width: 100%;
    min-width: 0;
}

.select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.custom-select-trigger {
    display: flex;
    width: 100%;
    min-height: 2.85rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.custom-select-trigger:hover,
.custom-select-trigger[aria-expanded="true"],
.custom-select-trigger:focus-visible {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

.custom-select-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-chevron {
    flex: 0 0 auto;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.2s;
}

.custom-select-trigger[aria-expanded="true"] .custom-select-chevron {
    transform: rotate(180deg);
}

.custom-select-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    left: 0;
    z-index: 30;
    display: grid;
    max-height: 16rem;
    gap: 0.2rem;
    overflow-y: auto;
    padding: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: var(--shadow-lg);
}

.custom-select-option {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.7rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.custom-select-option span {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-option small {
    flex: 0 0 auto;
    color: var(--text-secondary);
    font-size: 0.72rem;
    white-space: nowrap;
}

.custom-select-option:hover,
.custom-select-option:focus-visible,
.custom-select-option.is-selected {
    background: var(--primary-light);
    color: var(--primary);
    outline: none;
}

.protocol-note {
    margin: -0.15rem 0 0;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.field-help {
    display: block;
    margin-top: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 400;
    line-height: 1.45;
}

.custom-api-fields label {
    display: grid;
    gap: 0.35rem;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
}

.custom-api-fields input {
    width: 100%;
    min-width: 0;
    padding: 0.65rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
}

.custom-api-fields input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.custom-api-actions {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    gap: 0.75rem;
}

.btn-secondary {
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
}

.btn-secondary:hover:not(:disabled),
.btn-secondary:focus-visible {
    background: var(--primary);
    color: white;
    outline: none;
}

.btn-secondary:disabled {
    cursor: wait;
    opacity: 0.6;
}

.connection-status {
    min-width: 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.connection-status.pending {
    color: var(--info);
}

.connection-status.success {
    color: var(--success);
    font-weight: 700;
}

.connection-status.error {
    color: var(--danger);
}

.privacy-note {
    grid-column: 1 / -1;
    margin-top: -0.15rem;
    line-height: 1.5;
}

/* 岗位描述 */
.job-section {
    margin-bottom: 1.5rem;
}

.job-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9375rem;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* 按钮 */
.action-section {
    margin-bottom: 1.5rem;
}

.btn-primary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

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

/* 进度条 */
.progress-bar {
    background: var(--border);
    border-radius: 9999px;
    height: 8px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    background: var(--primary);
    height: 100%;
    border-radius: 9999px;
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 结果区域 */
.result-section {
    animation: fadeIn 0.5s ease-out;
}

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

.agent-card,
.score-card,
.keywords-card,
.evidence-card,
.resume-info-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.agent-card h2,
.score-card h2,
.keywords-card h3,
.evidence-card h3,
.resume-info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.agent-disclosure > summary {
    cursor: pointer;
    list-style: none;
}

.agent-disclosure {
    display: none;
}

.agent-disclosure > summary::-webkit-details-marker {
    display: none;
}

.agent-disclosure:not([open]) > summary {
    margin-bottom: 0;
    border-bottom: 0;
}

.card-heading h2 {
    margin: 0;
    padding: 0 0 0.75rem;
    border: 0;
}

.quality-badge {
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    background: #f1f5f9;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
}

.quality-badge.passed {
    background: #d1fae5;
    color: #047857;
}

.quality-badge.warning {
    background: #fef3c7;
    color: #a16207;
}

.agent-meta {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.76rem;
    overflow-wrap: anywhere;
}

.agent-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
}

.agent-step {
    display: flex;
    gap: 0.55rem;
    min-height: 78px;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fbfdff;
}

.agent-step.warning { border-color: #fbbf24; }
.agent-step.repaired { border-color: #60a5fa; }

.step-number {
    color: var(--primary);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.72rem;
    font-weight: 800;
}

.agent-step strong,
.agent-step span {
    display: block;
}

.agent-step strong {
    margin-bottom: 0.25rem;
    font-size: 0.82rem;
}

.agent-step div > span {
    color: var(--text-secondary);
    font-size: 0.7rem;
    line-height: 1.4;
}

/* 评分概览 */
.score-overview {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.score-circle {
    position: relative;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

.score-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 8;
}

.score-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1s ease-out;
}

.score-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary);
}

.score-details {
    flex: 1;
    min-width: 200px;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}

.score-label {
    width: 80px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.score-bar {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 9999px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 9999px;
    width: 0%;
    transition: width 1s ease-out;
}

.score-value {
    width: 45px;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: right;
    flex-shrink: 0;
}

.analysis-text {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 8px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 可定位简历评测 */
.review-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: start;
}

.resume-reader,
.evaluation-panel {
    min-width: 0;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.review-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.review-heading h2 {
    margin: 0;
    font-size: 1.2rem;
}

.review-hint {
    max-width: 11rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.45;
    text-align: right;
}

.resume-paper {
    position: relative;
    max-height: 680px;
    overflow-y: auto;
    padding: 1.1rem;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fbfcfe;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.7);
    scroll-behavior: smooth;
}

.resume-segment {
    display: grid;
    width: 100%;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.65rem;
    padding: 0.5rem 0.6rem;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    line-height: 1.65;
    text-align: left;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.resume-segment:hover,
.resume-segment:focus-visible {
    background: var(--primary-light);
    outline: none;
}

.resume-segment.is-highlighted {
    border-left-color: #f59e0b;
    background: #fff7d6;
}

.resume-segment.is-primary {
    box-shadow: 0 0 0 2px rgb(245 158 11 / 0.28);
}

.resume-segment-number {
    padding-top: 0.15rem;
    color: #94a3b8;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.68rem;
}

.resume-segment-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.evaluation-dimensions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.evaluation-dimension {
    display: grid;
    min-width: 0;
    gap: 0.35rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fbfdff;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.evaluation-dimension:hover,
.evaluation-dimension:focus-visible,
.evaluation-dimension.is-active {
    border-color: var(--primary);
    background: var(--primary-light);
    outline: none;
}

.evaluation-dimension.is-active {
    box-shadow: 0 0 0 2px rgb(40 87 217 / 0.12);
}

.evaluation-dimension-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.evaluation-dimension-heading strong {
    font-size: 0.84rem;
}

.evaluation-score {
    flex: 0 0 auto;
    font-size: 0.76rem;
    font-weight: 800;
}

.evaluation-score.good { color: #047857; }
.evaluation-score.medium { color: #b45309; }
.evaluation-score.weak { color: #dc2626; }

.evaluation-summary {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.finding-list {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 0.8rem;
}

.finding-button {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.62rem 0.7rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    text-align: left;
}

.finding-button:hover,
.finding-button:focus-visible,
.finding-button.is-active {
    border-color: #b8c8f3;
    background: #eef3ff;
    outline: none;
}

.finding-button small {
    color: var(--text-secondary);
    font-size: 0.68rem;
    white-space: nowrap;
}

.severity-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #94a3b8;
}

.severity-dot.high { background: var(--danger); }
.severity-dot.medium { background: var(--warning); }
.severity-dot.low { background: var(--info); }

.finding-detail {
    min-height: 13rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
}

.finding-detail-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.finding-detail-heading h3 {
    margin: 0;
    font-size: 1rem;
}

.severity-badge {
    flex: 0 0 auto;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.68rem;
    font-weight: 800;
}

.severity-badge.high { background: #fee2e2; color: #b91c1c; }
.severity-badge.medium { background: #fef3c7; color: #a16207; }

.finding-detail-block + .finding-detail-block {
    margin-top: 0.75rem;
}

.finding-detail-block strong {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.finding-detail-block p {
    color: var(--text);
    font-size: 0.82rem;
    line-height: 1.65;
}

.finding-detail-block.rewrite,
.finding-detail-block.missing {
    padding: 0.75rem;
    border-radius: 7px;
}

.finding-detail-block.rewrite {
    border-left: 3px solid var(--primary);
    background: var(--primary-light);
}

.finding-detail-block.missing {
    border-left: 3px solid var(--warning);
    background: #fffbeb;
}

.finding-detail-block.location p {
    color: var(--text-secondary);
}

.job-summary {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.evidence-list {
    display: grid;
    gap: 0.75rem;
}

.evidence-item {
    padding: 1rem;
    border: 1px solid var(--border);
    border-left: 4px solid #94a3b8;
    border-radius: 8px;
}

.evidence-item.matched { border-left-color: var(--success); }
.evidence-item.partial { border-left-color: var(--warning); }
.evidence-item.missing { border-left-color: var(--danger); }

.evidence-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.45rem;
}

.evidence-header strong { font-size: 0.92rem; }
.evidence-item p { color: var(--text-secondary); font-size: 0.85rem; }

.evidence-status {
    flex-shrink: 0;
    font-size: 0.74rem;
    font-weight: 700;
}

.evidence-quote {
    margin-top: 0.6rem;
    padding: 0.65rem 0.8rem;
    border-radius: 6px;
    background: var(--bg);
    color: #475569;
    font-size: 0.8rem;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.insight-card {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.insight-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.insight-card ul {
    padding-left: 1.1rem;
    color: var(--text-secondary);
    font-size: 0.84rem;
}

.insight-card li + li { margin-top: 0.45rem; }
.strength-card { border-top: 3px solid var(--success); }
.risk-card { border-top: 3px solid var(--danger); }
.action-card { border-top: 3px solid var(--primary); }

/* 关键词 */
.keywords-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.keywords-matched h4,
.keywords-missing h4 {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword-tag {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.keyword-tag.matched {
    background: #d1fae5;
    color: #065f46;
}

.keyword-tag.missing {
    background: #fee2e2;
    color: #991b1b;
}

/* 简历信息 */
.info-group {
    margin-bottom: 1.25rem;
}

.info-group:last-child {
    margin-bottom: 0;
}

.info-group h4 {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

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

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

.info-value.empty {
    color: #94a3b8;
    font-style: italic;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-list-item {
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.info-list-item .item-title {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.info-list-item .item-subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.info-list-item .item-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Toast */
.toast {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: white;
    z-index: 1000;
    transition: transform 0.3s ease-out;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast.info {
    background: var(--info);
}

/* 页脚 */
footer {
    text-align: center;
    padding: 2rem 0 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* 响应式 */
@media (max-width: 900px) {
    .review-workspace {
        grid-template-columns: 1fr;
    }

    .resume-paper {
        max-height: 520px;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .service-heading {
        flex-direction: column;
    }

    .service-modal {
        padding: 1rem;
    }

    .service-modal-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.55rem;
    }

    .service-options,
    .custom-api-fields {
        grid-template-columns: 1fr;
    }

    .custom-select-option {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.1rem;
    }

    .custom-select-option span,
    .custom-select-option small {
        max-width: 100%;
        white-space: normal;
    }

    .score-overview {
        flex-direction: column;
        align-items: center;
    }

    .review-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }

    .review-hint {
        max-width: none;
        text-align: left;
    }

    .evaluation-dimensions {
        grid-template-columns: 1fr;
    }

    .finding-button {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .finding-button small {
        grid-column: 2;
    }

    .keywords-section {
        grid-template-columns: 1fr;
    }

    .agent-steps,
    .insight-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}
