/* CV builder (admin) */
.cv-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 12px; }
.cv-toolbar .sp, .cv-actions .sp { flex: 1; }
.cv-toolbar form.inline { margin: 0; }
.cv-badge { display: inline-block; font-size: 12px; font-weight: 800; background: var(--purple-50); color: var(--purple); border-radius: 999px; padding: .15em .7em; margin-inline-start: 6px; }
.cv-dirty { display: inline-block; font-size: 12.5px; font-weight: 700; color: #8a5a00; background: var(--gold-soft); border-radius: 999px; padding: .15em .7em; margin-inline-start: 6px; }
.cv-actions { position: sticky; top: 8px; z-index: 5; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; }
.cv-actions .hint { color: var(--muted); font-size: 13px; }

.cv-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1250px) { .cv-layout { grid-template-columns: 1fr; } }
.cv-preview-col { position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow: auto; border-radius: 8px; }
@media (max-width: 1250px) { .cv-preview-col { position: static; max-height: none; } }
.cv-preview-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.cv-preview-head .hint { color: var(--muted); font-size: 13px; }

/* blocks */
.cv-editor { display: flex; flex-direction: column; gap: 12px; }
.cv-block { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); transition: opacity .15s, box-shadow .15s; }
.cv-block.off { opacity: .6; }
.cv-block.dragging { opacity: .4; }
.cv-block.over { box-shadow: 0 0 0 3px var(--purple); }
.cv-block-head { display: flex; gap: 6px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cv-block.closed .cv-block-head { border-bottom: 0; }
.cv-head-tools { display: inline-flex; gap: 4px; align-items: center; flex: none; margin-inline-start: auto; }
.cv-block-head .icon-btn { width: 32px; height: 32px; }
.cv-block-title { display: inline-flex; gap: 8px; align-items: center; font-weight: 800; color: var(--purple-800); }
.cv-block-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.cv-head-block { border-color: #d9d0f0; }
.cv-title-input { flex: 1 0 220px; min-width: 0; font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .3px; border: 1px dashed transparent; background: transparent; padding: 6px 8px; border-radius: 8px; color: var(--purple-800); font-family: Arial, sans-serif; }
.cv-title-input:hover, .cv-title-input:focus { border-color: var(--line); background: var(--bg); outline: none; }
.cv-kind { font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 999px; padding: .2em .7em; white-space: nowrap; }
.cv-vis { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; margin-inline-end: 4px; }
.cv-vis input { accent-color: var(--purple); width: 17px; height: 17px; }
.grip { color: var(--muted); font-weight: 900; user-select: none; padding: 0 4px; }
.grip.drag { cursor: grab; font-size: 18px; letter-spacing: -3px; }
.cv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 700px) { .cv-grid { grid-template-columns: 1fr; } }
.cv-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.cv-field.full { grid-column: 1 / -1; }
.cv-field input, .cv-field textarea, .cv-field select, .cv-row input { font: 14px/1.5 Arial, 'Bahij', sans-serif; color: #111; border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; background: #fff; width: 100%; min-height: 0; }
.cv-field textarea { resize: vertical; }
.cv-field input:focus, .cv-field textarea:focus, .cv-row input:focus { outline: 2px solid var(--purple-50); border-color: var(--purple); }
.has-ar { border-color: var(--bad) !important; background: var(--bad-soft) !important; }
.cv-sub { font-size: 13px; font-weight: 700; color: var(--muted); }
.cv-rows { display: flex; flex-direction: column; gap: 6px; }
.cv-row { display: flex; gap: 6px; align-items: center; }
.cv-row .icon-btn { width: 32px; height: 32px; flex: none; }
.cv-items { display: flex; flex-direction: column; gap: 10px; }
.cv-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fcfbff; display: flex; flex-direction: column; gap: 8px; }
.cv-item.list { flex-direction: row; align-items: flex-start; gap: 6px; padding: 6px 8px; }
.cv-item.list .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cv-item.list .cv-field span:empty { display: none; }
.cv-item.empty { border-color: #ecd8b6; background: var(--gold-soft); }
.cv-item-top { display: flex; align-items: center; gap: 6px; }
.cv-item-top .num { width: 26px; height: 26px; border-radius: 50%; background: var(--purple-50); color: var(--purple); font-weight: 800; display: grid; place-items: center; font-size: 13px; }
.cv-item-tools { display: flex; gap: 4px; margin-inline-start: auto; }
.cv-item-tools .icon-btn { width: 30px; height: 30px; }
.cv-hint { font-size: 12.5px; color: #6b5a2e; background: var(--gold-soft); border-radius: 8px; padding: 4px 8px; }
.cv-add { border-style: dashed; box-shadow: none; background: transparent; }
.cv-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .25em .8em; font: 600 13px Arial, sans-serif; cursor: pointer; color: var(--purple-800); }
.chip:hover { border-color: var(--purple); color: var(--purple); }
.link-btn { background: none; border: 0; font: inherit; color: var(--purple); font-weight: 700; font-size: 14px; cursor: pointer; padding: 4px 6px; border-radius: 8px; display: inline-flex; gap: 6px; align-items: center; align-self: flex-start; }
.link-btn:hover { background: var(--purple-50); }

.ats-warn { background: var(--gold-soft); border-color: #ecd8b6; margin-bottom: 14px; }
.ats-warn h3, .ats-tips h3 { font-size: 16px; margin: 0 0 8px; }
.ats-warn ul, .ats-tips ul { margin: 0; padding-inline-start: 1.2em; font-size: 14.5px; }
.ats-tips { font-size: 14.5px; color: #3d3756; margin-top: 20px; }

/* The preview mimics the exported file: plain, single column, standard font */
.cv-paper { background: #fff; color: #111; font-family: Arial, sans-serif; font-size: 13px; line-height: 1.5; text-align: left;
  padding: 40px 44px; box-shadow: var(--shadow-lg); border-radius: 6px; margin: 0; }
.cv-paper h1 { font-size: 25px; margin: 0; color: #111; font-weight: 700; }
.cv-paper .cv-headline { font-size: 14.5px; color: #444; margin: 2px 0 0; }
.cv-paper .cv-contacts { font-size: 12px; color: #444; margin: 2px 0 6px; }
.cv-paper h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .3px; border-bottom: 1.2px solid #555; padding-bottom: 2px; margin: 16px 0 8px; color: #111; font-weight: 700; }
.cv-paper h3 { font-size: 13.5px; margin: 9px 0 0; color: #111; font-weight: 700; }
.cv-paper .cv-org { font-size: 13px; }
.cv-paper .cv-meta { font-size: 12px; color: #444; }
.cv-paper p { margin: 3px 0; }
.cv-paper ul { margin: 3px 0; padding-left: 1.3em; padding-right: 0; }
.cv-paper li { margin: 1px 0; }
