/* =====================================================================================
   FILE BARU (5 Des 2026): gaya TOOL "Pembuat CV" (alat/pembuat-cv.php)
   Bagian 1: formulir & pratinjau (ikut tema situs --sol-*). Bagian 2: lembar CV (selalu putih, ukuran A4
   794 x 1123 px = 210 x 297 mm). Bagian 3: cetak (hanya #cvPrint yang tampil).
===================================================================================== */

/* ---------- Bagian 1: formulir & pratinjau ---------- */
.tl-page:has(#cvApp) { max-width: 1280px; }
.cv-switch { display: none; }
.cv-layout { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) {
    .cv-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 2rem; }
    .cv-sticky { position: sticky; top: 84px; }
}
@media (max-width: 991.98px) {
    .cv-switch { display: flex; position: sticky; top: 64px; z-index: 5; background: var(--sol-bg-card); padding: .4rem 0; margin: -.4rem 0 1rem; }
    .cv-app.is-preview .cv-form, .cv-app:not(.is-preview) .cv-right { display: none; }
}
#cvPagesBadge:not(:empty) { font-size: .75rem; opacity: .75; }

.cv-tpls { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; margin-bottom: 1.25rem; }
@media (max-width: 575.98px) { .cv-tpls { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cv-tpl small { display: none; } }
.cv-tpl { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .5rem .35rem .6rem; border-radius: .9rem; border: 2px solid var(--sol-border-soft); background: var(--sol-bg-main); color: var(--sol-text-main); font: inherit; cursor: pointer; text-align: center; min-width: 0; }
.cv-tpl:hover { border-color: var(--sol-accent); }
.cv-tpl[aria-pressed="true"] { border-color: var(--sol-accent); box-shadow: 0 0 0 3px var(--sol-accent-soft); }
.cv-tpl strong { font-size: .8rem; color: var(--sol-text-bright); line-height: 1.2; margin-top: .3rem; }
.cv-tpl small { font-size: .66rem; color: var(--sol-text-muted); line-height: 1.25; }
.cv-tpl:focus-visible { outline: 2px solid var(--sol-accent); outline-offset: 2px; }

/* Gambar kecil template (digambar dengan CSS) */
.cv-thumb { --k: var(--cvk, #1e3a5f); position: relative; display: block; width: 100%; max-width: 64px; aspect-ratio: 1 / 1.414; background: #fff; border-radius: 4px; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.cv-thumb i { position: absolute; left: 14%; right: 14%; height: 4%; background: #c9ced6; border-radius: 2px; }
.cv-thumb i:nth-child(1) { top: 9%; height: 7%; right: 40%; background: #333; }
.cv-thumb i:nth-child(2) { top: 30%; } .cv-thumb i:nth-child(3) { top: 48%; } .cv-thumb i:nth-child(4) { top: 66%; right: 30%; }
.cv-thumb.t-minimalis i:nth-child(1) { background: var(--k); }
.cv-thumb.t-minimalis::after { content: ""; position: absolute; left: 14%; right: 14%; top: 21%; height: 1px; background: var(--k); }
.cv-thumb.t-sidebar { background: linear-gradient(to right, var(--k) 34%, #fff 34%); }
.cv-thumb.t-sidebar i { left: 42%; right: 10%; }
.cv-thumb.t-eksekutif { background: linear-gradient(#fff, #fff) 0 0 / 100% 100%; }
.cv-thumb.t-eksekutif::before { content: ""; position: absolute; inset: 0 0 74% 0; background: var(--k); }
.cv-thumb.t-eksekutif i:nth-child(1) { background: #fff; z-index: 1; }
.cv-thumb.t-eksekutif i { right: 40%; }
.cv-thumb.t-kreatif { border-left: 4px solid var(--k); }
.cv-thumb.t-kreatif i:nth-child(1) { background: var(--k); }
.cv-thumb.t-kreatif i:nth-child(n+2) { left: 22%; }
.cv-thumb.t-kreatif::after { content: ""; position: absolute; left: 13%; top: 30%; bottom: 28%; width: 2px; background: color-mix(in srgb, var(--k) 40%, #fff); }

.cv-colors { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.cv-sw { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--sol-bg-card); background: var(--c); box-shadow: 0 0 0 1px var(--sol-border-soft); cursor: pointer; padding: 0; }
.cv-sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--sol-accent); }
.cv-sw:focus-visible { outline: 2px solid var(--sol-accent); outline-offset: 2px; }
input[type="color"].cv-sw-custom { width: 40px; height: 40px; }
.cv-opts.is-mono #cvColorBox .cv-colors { opacity: .45; pointer-events: none; }

.cv-acc { border: 1px solid var(--sol-border-soft); border-radius: .9rem; background: var(--sol-bg-main); margin-bottom: .6rem; }
.cv-acc > summary { cursor: pointer; list-style: none; padding: .85rem 1rem; font-weight: 800; color: var(--sol-text-bright); display: flex; align-items: center; gap: .5rem; min-height: 48px; }
.cv-acc > summary::-webkit-details-marker { display: none; }
.cv-acc > summary::after { content: "+"; margin-left: auto; color: var(--sol-accent); font-weight: 800; }
.cv-acc[open] > summary::after { content: "\2212"; }
.cv-acc-body { padding: 0 1rem 1rem; }
.cv-n:not(:empty) { font-size: .72rem; font-weight: 800; padding: .1rem .5rem; border-radius: 99px; background: var(--sol-accent-soft); color: var(--sol-accent); }

.cv-f2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; }
@media (max-width: 575.98px) { .cv-f2 { grid-template-columns: minmax(0, 1fr); } }
.cv-fl { display: flex; flex-direction: column; gap: .3rem; min-width: 0; margin: 0 0 .1rem; }
.cv-fl.is-full { grid-column: 1 / -1; }
.cv-acc-body > .cv-fl + .cv-fl { margin-top: .75rem; }
.cv-fl > span { font-size: .82rem; font-weight: 700; color: var(--sol-text-bright); }
.cv-fl > span small { font-weight: 400; color: var(--sol-text-muted); }
.cv-fl .tl-input { min-height: 46px; padding: .55rem .8rem; }
.cv-fl .tl-check { min-height: 46px; align-self: flex-end; }

.cv-photo { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.cv-photo-img { flex: 0 0 72px; width: 72px; height: 96px; border-radius: .6rem; background: var(--sol-bg-card); border: 1px dashed var(--sol-border-soft); display: flex; align-items: center; justify-content: center; color: var(--sol-text-muted); overflow: hidden; }
.cv-photo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-photo .tl-check { min-height: 38px; margin-top: .25rem; font-size: .85rem; }

.cv-item { border: 1px solid var(--sol-border-soft); border-radius: .8rem; background: var(--sol-bg-card); padding: .75rem; margin-bottom: .6rem; }
.cv-item-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .65rem; }
.cv-item-head b { flex: 1 1 auto; min-width: 0; font-size: .88rem; color: var(--sol-text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-item-head .pf-btn { width: 34px; height: 34px; font-size: 1rem; line-height: 1; }
.cv-add { width: 100%; border-style: dashed; }

.cv-data-acts { margin-top: 1rem; }

.cv-top { justify-content: space-between; margin-bottom: .75rem; }
.cv-pages { font-size: .82rem; font-weight: 700; color: var(--sol-text-muted); }
.cv-pages.is-warn { color: var(--sol-warning); }
.cv-stage { position: relative; width: 100%; overflow: hidden; border-radius: .5rem; background: var(--sol-bg-main); box-shadow: 0 10px 30px var(--sol-shadow-color); }
.cv-scale { width: 794px; transform-origin: 0 0; }
.cv-break { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed #e05252; z-index: 3; pointer-events: none; }
.cv-break span { position: absolute; right: 8px; top: 4px; font: 700 18px/1 system-ui, sans-serif; color: #e05252; background: #fff; padding: 2px 6px; border-radius: 4px; }

.cv-check { margin-top: 1rem; padding: .85rem 1rem; border-radius: .9rem; background: var(--sol-bg-main); border: 1px solid var(--sol-border-soft); }
.cv-check h3 { font-size: .9rem; font-weight: 800; color: var(--sol-text-bright); margin: 0 0 .5rem; }
.cv-check ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.cv-check li { position: relative; padding-left: 1.5rem; font-size: .84rem; color: var(--sol-text-muted); line-height: 1.45; }
.cv-check li::before { content: ""; position: absolute; left: 0; top: .15rem; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--sol-border-soft); }
.cv-check li.is-ok { color: var(--sol-text-main); }
.cv-check li.is-ok::before { border-color: var(--sol-success); background: var(--sol-success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }

/* ---------- Bagian 2: lembar CV ---------- */
.cv-page {
    --cv-acc: #1e3a5f; --cv-tint: color-mix(in srgb, var(--cv-acc) 9%, #fff); --cv-fs: 13.5px;
    --cv-ff: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    position: relative; width: 794px; min-height: 1123px; background: #fff; color: #2b2b2b; font-family: var(--cv-ff); font-size: var(--cv-fs);
    line-height: 1.45; text-align: left; letter-spacing: 0; overflow-wrap: anywhere; box-sizing: border-box;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.cv-page.is-serif { --cv-ff: Georgia, Cambria, "Times New Roman", serif; }
.cv-page *, .cv-page *::before, .cv-page *::after { box-sizing: border-box; }
.cv-page p, .cv-page ul { margin: 0; }
.cv-page ul { padding-left: 1.15em; margin-top: .25em; }
.cv-page li { margin: .08em 0; }
.cv-page .cv-name { font-family: inherit; font-size: 2.35em; font-weight: 700; line-height: 1.1; margin: 0; color: #141414; letter-spacing: -.01em; }
.cv-page .cv-role { font-size: 1.15em; font-weight: 600; color: var(--cv-acc); margin-top: .2em; }
.cv-page .cv-h { font-family: inherit; font-size: .98em; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--cv-acc); margin: 0 0 .55em; line-height: 1.3; }
.cv-page .cv-sec { margin-top: 1.25em; }
.cv-page .cv-ent { margin-bottom: .8em; break-inside: avoid; }
.cv-page .cv-ent:last-child { margin-bottom: 0; }
.cv-page .cv-ent-h { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; }
.cv-page .cv-ent-h strong { color: #141414; font-weight: 700; }
.cv-page .cv-org { display: block; color: #4a4a4a; }
.cv-page .cv-date { flex: 0 0 auto; white-space: nowrap; color: #5c5c5c; font-size: .92em; }
.cv-page .cv-note { color: #4a4a4a; margin-top: .15em; }
.cv-page .cv-contact { display: flex; flex-wrap: wrap; gap: .3em 1.2em; margin-top: .6em; font-size: .93em; color: #3d3d3d; }
.cv-page .cv-contact span { display: inline-flex; align-items: center; gap: .4em; }
.cv-page .cv-contact svg { width: 1.05em; height: 1.05em; flex: 0 0 auto; color: var(--cv-acc); }
.cv-page .cv-photo { display: block; object-fit: cover; flex: 0 0 auto; }
.cv-page .cv-chips { display: flex; flex-wrap: wrap; gap: .35em; }
.cv-page .cv-chips span { padding: .18em .65em; border-radius: 99px; background: var(--cv-tint); color: #1f1f1f; font-size: .92em; }
.cv-page .cv-plain { line-height: 1.6; }
.cv-page .cv-dots { list-style: none; padding: 0; }
.cv-page .cv-dots li { position: relative; padding-left: .95em; }
.cv-page .cv-dots li::before { content: ""; position: absolute; left: 0; top: .6em; width: .38em; height: .38em; border-radius: 50%; background: currentColor; opacity: .7; }
/* Tulisan kecil sumber CV (bisa dimatikan pengguna); selalu di pojok kanan bawah halaman terakhir */
.cv-page .cv-credit { position: absolute; right: 24px; bottom: 14px; z-index: 1; font: 400 9px/1.2 "Segoe UI", Roboto, Arial, sans-serif; color: #a3a8ae; text-decoration: none; letter-spacing: .02em; }
.cv-page .cv-empty { color: #9aa0a6; font-style: italic; }

/* Template 1: Klasik ATS - hitam-putih, satu kolom */
.cv-t-klasik { --cv-acc: #141414; padding: 50px 58px; }
.cv-t-klasik .cv-head { display: flex; gap: 1.5em; align-items: center; padding-bottom: .9em; border-bottom: 2px solid #141414; }
.cv-t-klasik .cv-head > div { flex: 1 1 auto; min-width: 0; }
.cv-t-klasik .cv-name { font-size: 2.15em; text-transform: uppercase; letter-spacing: .04em; }
.cv-t-klasik .cv-role { color: #333; font-weight: 400; }
.cv-t-klasik .cv-contact svg { display: none; }
.cv-t-klasik .cv-contact span + span::before { content: "|"; margin-right: .7em; color: #888; }
.cv-t-klasik .cv-contact { gap: .3em .7em; }
.cv-t-klasik .cv-photo { width: 92px; height: 122px; }
.cv-t-klasik .cv-h { border-bottom: 1px solid #9a9a9a; padding-bottom: .2em; }

/* Template 2: Minimalis - satu kolom, aksen warna */
.cv-t-minimalis { padding: 52px 60px; }
.cv-t-minimalis .cv-head { display: flex; gap: 1.6em; align-items: center; padding-bottom: 1.1em; border-bottom: 1px solid color-mix(in srgb, var(--cv-acc) 45%, #fff); }
.cv-t-minimalis .cv-head > div { flex: 1 1 auto; min-width: 0; }
.cv-t-minimalis .cv-name { color: var(--cv-acc); }
.cv-t-minimalis .cv-role { color: #555; font-weight: 400; }
.cv-t-minimalis .cv-photo { width: 104px; height: 104px; border-radius: 50%; }
.cv-t-minimalis .cv-sec { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1.2em; }
.cv-t-minimalis .cv-h { margin: .1em 0 0; font-size: .9em; }

/* Template 3: Modern - kolom samping berwarna (warna di latar halaman agar ikut halaman ke-2 saat dicetak) */
.cv-t-sidebar { display: grid; grid-template-columns: 262px minmax(0, 1fr); background: linear-gradient(to right, var(--cv-acc) 262px, #fff 262px); }
.cv-t-sidebar .cv-side { padding: 44px 26px; color: #fff; }
.cv-t-sidebar .cv-main { padding: 44px 40px; }
.cv-t-sidebar .cv-photo { width: 150px; height: 150px; border-radius: 50%; margin: 0 auto 1.4em; border: 4px solid rgba(255, 255, 255, .35); }
.cv-t-sidebar .cv-side .cv-h { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .4); padding-bottom: .3em; }
.cv-t-sidebar .cv-side .cv-sec:first-of-type { margin-top: 0; }
.cv-t-sidebar .cv-side .cv-contact { flex-direction: column; gap: .55em; margin: 0; color: #fff; }
.cv-t-sidebar .cv-side .cv-contact svg { color: #fff; opacity: .85; }
.cv-t-sidebar .cv-side .cv-chips span { background: rgba(255, 255, 255, .16); color: #fff; }
.cv-t-sidebar .cv-side .cv-org, .cv-t-sidebar .cv-side .cv-note, .cv-t-sidebar .cv-side .cv-date { color: rgba(255, 255, 255, .82); }
.cv-t-sidebar .cv-side strong { color: #fff; }
.cv-t-sidebar .cv-main .cv-head { margin-bottom: .4em; }
.cv-t-sidebar .cv-main .cv-h { display: flex; align-items: center; gap: .6em; }
.cv-t-sidebar .cv-main .cv-h::after { content: ""; flex: 1 1 auto; height: 2px; background: var(--cv-tint); }

/* Template 4: Eksekutif - kepala berwarna penuh + dua kolom */
.cv-t-eksekutif .cv-band { display: flex; gap: 1.6em; align-items: center; padding: 38px 52px; background: var(--cv-acc); color: #fff; }
.cv-t-eksekutif .cv-band > div { flex: 1 1 auto; min-width: 0; }
.cv-t-eksekutif .cv-band .cv-name { color: #fff; }
.cv-t-eksekutif .cv-band .cv-role { color: rgba(255, 255, 255, .88); font-weight: 400; }
.cv-t-eksekutif .cv-band .cv-contact { color: #fff; }
.cv-t-eksekutif .cv-band .cv-contact svg { color: #fff; opacity: .85; }
.cv-t-eksekutif .cv-photo { width: 116px; height: 116px; border-radius: 12px; border: 3px solid rgba(255, 255, 255, .5); }
.cv-t-eksekutif .cv-cols { display: grid; grid-template-columns: minmax(0, 1fr) 228px; gap: 34px; padding: 10px 52px 44px; }
.cv-t-eksekutif .cv-aside .cv-sec { background: var(--cv-tint); padding: .9em 1em; border-radius: 8px; }
.cv-t-eksekutif .cv-main .cv-h { border-bottom: 2px solid var(--cv-acc); padding-bottom: .25em; }

/* Template 5: Elegan - garis tepi kiri, garis waktu, label keahlian */
.cv-t-kreatif { padding: 48px 56px 48px 70px; background: linear-gradient(to right, var(--cv-acc) 12px, #fff 12px); }
.cv-t-kreatif .cv-head { display: flex; gap: 1.5em; align-items: center; }
.cv-t-kreatif .cv-head > div { flex: 1 1 auto; min-width: 0; }
.cv-t-kreatif .cv-name { font-size: 2.6em; }
.cv-t-kreatif .cv-photo { width: 112px; height: 112px; border-radius: 50%; box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--cv-acc); }
.cv-t-kreatif .cv-h { display: flex; align-items: center; gap: .55em; letter-spacing: .06em; }
.cv-t-kreatif .cv-h::before { content: ""; width: .7em; height: .7em; border-radius: 3px; background: var(--cv-acc); transform: rotate(45deg); }
.cv-t-kreatif .cv-tl .cv-ent { position: relative; padding-left: 1.4em; border-left: 2px solid var(--cv-tint); margin-left: .3em; padding-bottom: .2em; }
.cv-t-kreatif .cv-tl .cv-ent::before { content: ""; position: absolute; left: -.42em; top: .38em; width: .72em; height: .72em; border-radius: 50%; background: #fff; border: 2px solid var(--cv-acc); }
.cv-t-kreatif .cv-date { color: var(--cv-acc); font-weight: 600; }
.cv-t-kreatif .cv-duo { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2em; }

/* ---------- Bagian 3: cetak ---------- */
#cvPrint { display: none; }
@media print {
    body > *:not(#cvPrint) { display: none !important; }
    html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
    #cvPrint { display: block; }
    #cvPrint .cv-page { box-shadow: none; }
}
