:root {
  --bg: #f6f3ee;
  --ink: #1f2430;
  --muted: #70747e;
  --accent: #b9643a;
  --blue: #2f5476;
  --line: #e4dfd8;
  --card: #ffffff;
  --mint: #dceee7;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px Outfit, Arial, sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
.topbar { min-height: 72px; background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 32px; gap: 34px; }
.brand { font-size: 21px; font-weight: 700; letter-spacing: -.6px; white-space: nowrap; }
.brand span { color: var(--accent); }
nav { display: flex; gap: 4px; align-self: stretch; }
.nav-button, .filter-button { background: transparent; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav-button.active, .filter-button.active { color: var(--ink); border-color: var(--accent); }
.top-actions { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.status { color: #438267; font-size: 12px; }
.status i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #57a17c; }
.ghost, .secondary { background: transparent; color: var(--muted); padding: 9px 5px; }
.secondary { border: 1px solid var(--line); border-radius: 7px; padding: 9px 12px; }
.primary { background: var(--accent); color: #fff; border-radius: 8px; padding: 11px 16px; font-weight: 600; }
.primary:disabled { opacity: .5; cursor: not-allowed; }
.wide { width: 100%; margin-top: 8px; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.5; }
.page-heading, .preview-toolbar { display: flex; justify-content: space-between; align-items: flex-start; }
.page-heading, .preview-toolbar, .detail-heading, .filters { flex-wrap: wrap; gap: 12px; }
.page-heading { margin-bottom: 28px; }
h1 { margin: 0; font-size: 32px; }
h2 { margin: 0 0 15px; font-size: 19px; }
h3 { margin: 0 0 7px; }
label { display: block; margin: 14px 0; color: var(--muted); font-size: 12px; }
input, textarea { display: block; width: 100%; margin-top: 7px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); outline: none; }
input:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; }
.jobs-view, .profile-view, .history-view, .editor-view { padding: 42px 5vw; }
.filters { display: flex; gap: 12px; }
.filters select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted); }
.jobs-layout { display: grid; grid-template-columns: minmax(300px, 430px) minmax(0, 1fr); gap: 22px; }
.jobs-list { display: grid; gap: 10px; align-content: start; max-height: calc(100vh - 180px); overflow: auto; }
.job-card { width: 100%; padding: 17px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.job-card:hover, .job-card.active { border-color: var(--accent); box-shadow: 0 0 0 2px #b9643a22; }
.job-card-top, .suggestion-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.score { color: var(--accent); font-size: 20px; font-weight: 700; }
.source { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.job-card p { margin: 5px 0 12px; color: var(--muted); font-size: 12px; }
.status-badge { display: inline-block; padding: 4px 8px; border-radius: 14px; background: #eee; color: #666; font-size: 11px; }
.status-cv_hazir, .status-onay_bekliyor, .status-onaylandi, .status-basvuruldu { background: var(--mint); color: #38715e; }
.status-elendi, .status-reddedildi { background: #f5dfda; color: #9b4935; }
.job-detail { min-height: 500px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.detail-heading { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.detail-heading h2 { margin: 4px 0; font-size: 25px; }
.detail-heading p { margin: 0; color: var(--muted); }
.detail-columns { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; margin-top: 22px; }
.detail-section { margin-bottom: 22px; }
.detail-section h3 { color: var(--blue); border-bottom: 1px solid #b8c5ce; padding-bottom: 6px; }
.job-text { max-height: 350px; overflow: auto; white-space: pre-wrap; line-height: 1.6; }
.suggestion { margin-top: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.suggestion.onaylandi { background: #f1faf6; }
.suggestion.atlandi { opacity: .6; }
.suggestion-top span { color: var(--muted); font-size: 11px; }
.suggestion p { margin: 6px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.suggestion-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 9px; }
.suggestion-actions button { background: none; color: var(--accent); font-size: 12px; }
.editor-layout, .profile-layout { display: grid; grid-template-columns: 360px minmax(0, 794px); gap: 28px; align-items: start; }
.editor-sidebar, .profile-sidebar { display: grid; gap: 20px; }
.editor-sidebar section, .profile-sidebar section { padding: 20px; background: #faf8f4; border: 1px solid var(--line); border-radius: 10px; }
.approval-section { border-left: 3px solid var(--accent) !important; }
.switch-row { display: flex; align-items: center; justify-content: space-between; color: var(--ink); font-size: 14px; }
.switch-row input { display: none; }
.switch-row i { position: relative; width: 42px; height: 24px; margin: 0; border-radius: 20px; background: #c9c4bd; cursor: pointer; }
.switch-row i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.switch-row input:checked + i { background: var(--accent); }
.switch-row input:checked + i::after { left: 21px; }
.cv-page { min-height: 1123px; max-width: 794px; padding: 52px 60px; background: #fff; box-shadow: 0 8px 30px #33311b12; font: var(--cv-font-size, 13.6px) var(--cv-font-family, "Open Sans"), Arial, sans-serif; }
.cv-header { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 3px solid var(--blue); }
.cv-header h1 { margin: 0 0 7px; color: var(--blue); font-size: 31px; }
.contact { display: flex; flex-wrap: wrap; gap: 15px; color: #555; font-size: 11px; }
.cv-section { margin: 20px 0; break-inside: avoid; page-break-inside: avoid; }
.cv-section h3 { margin: 0 0 12px; padding-bottom: 5px; border-bottom: 1px solid #b8c5ce; color: var(--blue); font-size: 13px; letter-spacing: .7px; text-transform: uppercase; }
.cv-section h4 { margin: 0; font-size: 14px; }
.cv-item { margin-bottom: 14px; overflow: auto; }
.cv-item p { margin: 5px 0; line-height: 1.5; }
.cv-item ul { margin: 5px 0; padding-left: 18px; }
.cv-meta { float: right; color: #777; font-size: 11px; }
.editable { border-radius: 3px; }
.editable:hover, .editable:focus { background: #fff3dc; outline: 2px solid #f1c987; }
.highlight { background: #ffe5a9; outline: 2px solid #e8ad51; }
.level { color: var(--blue); letter-spacing: 3px; }
.upload-panel { background: var(--mint) !important; }
.upload-panel input { background: #fff; }
.form-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.array-editor { margin: 22px 0; }
.array-editor h3 { margin-bottom: 8px; color: var(--blue); font-size: 13px; }
.array-item { margin-bottom: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.array-item input, .array-item textarea { margin-top: 6px; }
.remove-item { margin-top: 7px; color: #a34a35; background: transparent; font-size: 12px; }
.cv-empty { margin-top: 80px; padding: 24px; border: 1px dashed var(--line); color: var(--muted); text-align: center; }
.suggestion-edit { margin: 8px 0; color: var(--muted); }
.history-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 15px; }
.history-card { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.history-card h3 { margin: 12px 0 7px; }
.history-card p { color: var(--muted); font-size: 12px; }
.empty-state { padding: 38px; color: var(--muted); text-align: center; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; background: var(--bg); }
.auth-card { width: min(390px, calc(100% - 32px)); padding: 38px; background: #fff; border-radius: 14px; box-shadow: 0 12px 40px #33311b12; }
.auth-card h1 { margin: 10px 0 24px; }
.error { min-height: 18px; color: #a33; font-size: 12px; }
@media (max-width: 1050px) {
  .topbar { padding: 0 16px; gap: 15px; }
  nav { overflow-x: auto; }
  .top-actions .status { display: none; }
  .jobs-layout, .detail-columns, .editor-layout, .profile-layout { grid-template-columns: 1fr; }
  .jobs-list { max-height: none; }
  .cv-page { margin: auto; }
}
@media (max-width: 640px) {
  .jobs-view, .profile-view, .history-view, .editor-view { padding: 24px 14px; }
  .topbar { align-items: flex-start; flex-wrap: wrap; padding: 12px 14px; }
  nav { width: 100%; order: 3; }
  .top-actions { margin-left: auto; }
  .cv-page { min-height: auto; padding: 24px 18px; }
  .cv-meta { float: none; display: block; margin-bottom: 2px; }
  .cv-header h1 { font-size: 25px; }
  .filters { width: 100%; }
  .filters select { flex: 1 1 140px; min-width: 0; }
}
@media print {
  body { background: #fff; }
  .topbar, .editor-sidebar, .preview-toolbar, .profile-sidebar { display: none !important; }
  .editor-view, .profile-view { padding: 0; }
  .editor-layout, .profile-layout { display: block; }
  @page { size: A4; margin: 12mm; }
  .cv-page { width: 210mm; max-width: none; min-height: 297mm; padding: 0; box-shadow: none; }
  .suggestion, .highlight, .editable { background: transparent !important; outline: 0 !important; }
}
