/* ═══════════════════════════════════════════════════════════════
   CV BUILDER — Dapi Expertos
   Archivo independiente: no modifica principal.css ni estilos existentes
   ═══════════════════════════════════════════════════════════════ */

/* ── BOTÓN HERO ─────────────────────────────────────────────── */
.btn-crear-cv {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    border: none;
    padding: 13px 28px;
    border-radius: 50px;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .02em;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 6px 20px rgba(15,52,96,.35);
    text-decoration: none;
}
.btn-crear-cv::before {
    content: '';
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
    transition: left .45s;
}
.btn-crear-cv:hover::before { left: 100%; }
.btn-crear-cv:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15,52,96,.45); }
.btn-crear-cv svg { flex-shrink: 0; }
.btn-crear-cv-sparkle {
    position: absolute;
    top: -2px; right: -2px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: .6rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 99px;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1.5;
}

/* ── MODAL OVERLAY CV BUILDER ───────────────────────────────── */
#cvBuilderOverlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 14, 29, .82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity .3s;
    overflow-y: auto;
}
#cvBuilderOverlay.cvb-open {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}
#cvBuilderOverlay.cvb-visible { opacity: 1; }

/* ── CONTENEDOR PRINCIPAL DEL BUILDER ──────────────────────── */
.cvb-container {
    width: 100%;
    max-width: 1100px;
    min-height: 100vh;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    transform: translateY(30px);
    transition: transform .35s cubic-bezier(.25,.8,.25,1);
}
[data-theme="dark"] .cvb-container { background: #0f172a; }
#cvBuilderOverlay.cvb-visible .cvb-container { transform: translateY(0); }

/* ── HEADER DEL BUILDER ─────────────────────────────────────── */
.cvb-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: #fff;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.cvb-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cvb-header-logo {
    /* Mostrar el logo a color sin filtros y con tamaño consistente */
    width: 32px;
    height: 32px;
    opacity: 1;
    object-fit: contain;
    filter: none;
}
.cvb-header-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -.02em;
}
.cvb-header-subtitle {
    font-size: .75rem;
    opacity: .65;
    margin-top: 1px;
}
.cvb-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.cvb-btn-close {
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
    transition: background .2s, transform .15s;
}
.cvb-btn-close:hover { background: rgba(255,255,255,.25); transform: scale(1.1); }

/* ── STEPS INDICATOR ────────────────────────────────────────── */
.cvb-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 20px 24px 0;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}
[data-theme="dark"] .cvb-steps { background: #1e293b; border-color: rgba(255,255,255,.08); }
.cvb-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    font-size: .82rem;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all .25s;
    white-space: nowrap;
    position: relative;
}
.cvb-step.active {
    color: #0f3460;
    border-bottom-color: #0f3460;
}
[data-theme="dark"] .cvb-step.active { color: #60a5fa; border-bottom-color: #60a5fa; }
.cvb-step.done { color: #16a34a; }
.cvb-step-num {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: .72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .25s;
}
.cvb-step.active .cvb-step-num { background: #0f3460; color: #fff; }
.cvb-step.done .cvb-step-num { background: #16a34a; color: #fff; }
[data-theme="dark"] .cvb-step.active .cvb-step-num { background: #3b82f6; }

/* ── PANELES DE PASO ─────────────────────────────────────────── */
.cvb-panel { display: none; padding: 28px; }
.cvb-panel.active { display: block; }

/* ── PASO 1: GALERÍA DE PLANTILLAS ──────────────────────────── */
.cvb-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 960px;
    margin: 0 auto;
}
.cvb-template-card {
    border: 3px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .25s, transform .25s cubic-bezier(.25,.8,.25,1), box-shadow .25s;
    background: #fff;
    position: relative;
}
[data-theme="dark"] .cvb-template-card { background: #1e293b; border-color: rgba(255,255,255,.1); }
.cvb-template-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,.12); }
.cvb-template-card.selected { border-color: #0f3460; box-shadow: 0 0 0 2px rgba(15,52,96,.25); }
[data-theme="dark"] .cvb-template-card.selected { border-color: #60a5fa; }
.cvb-template-card.selected::after {
    content: '✓';
    position: absolute; top: 10px; right: 10px;
    width: 26px; height: 26px;
    background: #0f3460;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 800;
    z-index: 5;
}

/* Miniaturas de plantillas (SVG decorativo) */
.cvb-tpl-thumb {
    height: 180px;
    overflow: hidden;
    position: relative;
}
.cvb-tpl-info {
    padding: 14px 16px;
}
.cvb-tpl-name {
    font-size: .9rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 3px;
}
[data-theme="dark"] .cvb-tpl-name { color: #f1f5f9; }
.cvb-tpl-desc {
    font-size: .75rem;
    color: #64748b;
    margin: 0;
}

/* ── PASO 2: FORMULARIO ─────────────────────────────────────── */
.cvb-form-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 860px;
    margin: 0 auto;
}
.cvb-form-full { grid-column: span 2; }
.cvb-section-title {
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    padding: 20px 0 10px;
    grid-column: span 2;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #e2e8f0;
    margin-top: 4px;
}
[data-theme="dark"] .cvb-section-title { color: #94a3b8; border-color: rgba(255,255,255,.08); }
.cvb-section-title:first-child { border-top: none; padding-top: 0; }
.cvb-section-title::before {
    content: '';
    width: 3px; height: 14px;
    background: linear-gradient(180deg, #0f3460, #60a5fa);
    border-radius: 3px;
    flex-shrink: 0;
}
.cvb-field { display: flex; flex-direction: column; gap: 5px; }
.cvb-field label {
    font-size: .82rem;
    font-weight: 700;
    color: #1e293b;
}
[data-theme="dark"] .cvb-field label { color: #e2e8f0; }
.cvb-field input,
.cvb-field textarea,
.cvb-field select {
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: .9rem;
    background: #fff;
    color: #1e293b;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
}
[data-theme="dark"] .cvb-field input,
[data-theme="dark"] .cvb-field textarea,
[data-theme="dark"] .cvb-field select {
    background: #1e293b;
    border-color: rgba(255,255,255,.12);
    color: #f1f5f9;
}
.cvb-field input:focus,
.cvb-field textarea:focus,
.cvb-field select:focus {
    border-color: #0f3460;
    outline: 3px solid rgba(15,52,96,.1);
    box-shadow: none;
}
[data-theme="dark"] .cvb-field input:focus,
[data-theme="dark"] .cvb-field textarea:focus,
[data-theme="dark"] .cvb-field select:focus {
    border-color: #60a5fa;
    outline-color: rgba(96,165,250,.15);
}
.cvb-field-hint { font-size: .73rem; color: #94a3b8; margin-top: 2px; }

/* Foto upload */
.cvb-photo-upload {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
[data-theme="dark"] .cvb-photo-upload { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.15); }
.cvb-photo-upload:hover { border-color: #0f3460; background: rgba(15,52,96,.04); }
.cvb-photo-preview {
    width: 64px; height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
    flex-shrink: 0;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    overflow: hidden;
}
.cvb-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.cvb-photo-text strong { display: block; font-size: .85rem; color: #1e293b; margin-bottom: 2px; }
[data-theme="dark"] .cvb-photo-text strong { color: #f1f5f9; }
.cvb-photo-text span { font-size: .75rem; color: #94a3b8; }
#cvPhotoInput { display: none; }

/* Entradas dinámicas (exp, educación...) */
.cvb-dynamic-list { display: flex; flex-direction: column; gap: 10px; }
.cvb-dynamic-item {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
[data-theme="dark"] .cvb-dynamic-item { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.cvb-dynamic-item .cvb-remove {
    position: absolute; top: 10px; right: 10px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 4px;
    border-radius: 6px;
    transition: color .2s, background .2s;
}
.cvb-dynamic-item .cvb-remove:hover { color: #ef4444; background: rgba(239,68,68,.08); }
.cvb-dynamic-item input, .cvb-dynamic-item textarea {
    padding: 9px 11px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: .85rem;
    background: #fff;
    color: #1e293b;
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
    transition: border-color .2s;
}
[data-theme="dark"] .cvb-dynamic-item input,
[data-theme="dark"] .cvb-dynamic-item textarea {
    background: #1e293b;
    border-color: rgba(255,255,255,.12);
    color: #f1f5f9;
}
.cvb-dynamic-item input:focus,
.cvb-dynamic-item textarea:focus { border-color: #0f3460; outline: none; }
.cvb-dynamic-full { grid-column: span 2; }
.cvb-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1.5px dashed #94a3b8;
    color: #64748b;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    margin-top: 6px;
    align-self: flex-start;
}
.cvb-btn-add:hover { border-color: #0f3460; color: #0f3460; background: rgba(15,52,96,.04); }
[data-theme="dark"] .cvb-btn-add:hover { border-color: #60a5fa; color: #60a5fa; }

/* Tags (habilidades, idiomas) */
.cvb-tags-input-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    min-height: 48px;
    cursor: text;
    transition: border-color .2s;
}
[data-theme="dark"] .cvb-tags-input-wrap { background: #1e293b; border-color: rgba(255,255,255,.12); }
.cvb-tags-input-wrap:focus-within { border-color: #0f3460; }
.cvb-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 10px 4px 10px;
    border-radius: 99px;
    font-size: .78rem;
    font-weight: 700;
    flex-shrink: 0;
}
[data-theme="dark"] .cvb-tag { background: rgba(59,130,246,.2); color: #93c5fd; }
.cvb-tag-del {
    background: none;
    border: none;
    color: #0369a1;
    cursor: pointer;
    font-size: .9rem;
    line-height: 1;
    padding: 0 0 0 2px;
    opacity: .6;
    transition: opacity .15s;
}
[data-theme="dark"] .cvb-tag-del { color: #93c5fd; }
.cvb-tag-del:hover { opacity: 1; }
.cvb-tag-input-field {
    border: none !important;
    outline: none !important;
    padding: 2px 4px !important;
    flex: 1;
    min-width: 100px;
    font-size: .85rem !important;
    background: transparent !important;
    color: #1e293b !important;
    border-radius: 0 !important;
}
[data-theme="dark"] .cvb-tag-input-field { color: #f1f5f9 !important; }

/* ── BARRA INFERIOR DEL FORM ─────────────────────────────────── */
.cvb-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 20px 28px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    position: sticky;
    bottom: 0;
    z-index: 5;
}
[data-theme="dark"] .cvb-form-footer { background: #1e293b; border-color: rgba(255,255,255,.08); }
.cvb-btn-prev, .cvb-btn-next, .cvb-btn-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all .2s;
}
.cvb-btn-prev {
    background: #f1f5f9;
    color: #64748b;
}
[data-theme="dark"] .cvb-btn-prev { background: rgba(255,255,255,.08); color: #94a3b8; }
.cvb-btn-prev:hover { background: #e2e8f0; color: #1e293b; }
.cvb-btn-next {
    background: #0f3460;
    color: #fff;
    box-shadow: 0 4px 12px rgba(15,52,96,.3);
}
.cvb-btn-next:hover { background: #16213e; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15,52,96,.4); }
.cvb-btn-preview {
    background: linear-gradient(135deg, #0f3460, #533483);
    color: #fff;
    box-shadow: 0 4px 12px rgba(83,52,131,.3);
    flex: 1;
    justify-content: center;
    max-width: 280px;
}
.cvb-btn-preview:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(83,52,131,.4); }

/* ── PASO 3: PREVIEW ─────────────────────────────────────────── */
.cvb-preview-wrapper {
    max-width: 820px;
    margin: 0 auto;
}
.cvb-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.cvb-preview-label {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #64748b;
}
.cvb-preview-tpl-switch {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cvb-tpl-switch-btn {
    padding: 7px 16px;
    border-radius: 99px;
    font-size: .78rem;
    font-weight: 700;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
[data-theme="dark"] .cvb-tpl-switch-btn { background: #1e293b; border-color: rgba(255,255,255,.12); color: #94a3b8; }
.cvb-tpl-switch-btn.active {
    border-color: #0f3460;
    background: #0f3460;
    color: #fff;
}

/* Frame del CV */
.cvb-cv-frame {
    background: #fff;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    min-height: 600px;
    width: 100%;
}

/* ── ACCIONES EXPORTAR ───────────────────────────────────────── */
.cvb-export-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}
.cvb-btn-export {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 14px;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all .2s;
    text-decoration: none;
}
.cvb-btn-export-primary {
    background: linear-gradient(135deg, #0f3460, #533483);
    color: #fff;
    box-shadow: 0 4px 16px rgba(15,52,96,.3);
}
.cvb-btn-export-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,52,96,.4); }
.cvb-btn-export-secondary {
    background: #f1f5f9;
    color: #1e293b;
    border: 1.5px solid #e2e8f0;
}
[data-theme="dark"] .cvb-btn-export-secondary { background: #1e293b; color: #f1f5f9; border-color: rgba(255,255,255,.12); }
.cvb-btn-export-secondary:hover { border-color: #0f3460; background: rgba(15,52,96,.06); }
.cvb-btn-share {
    background: #dcfce7;
    color: #16a34a;
    border: 1.5px solid #bbf7d0;
}
.cvb-btn-share:hover { background: #16a34a; color: #fff; }

/* ── PLANTILLAS CV ───────────────────────────────────────────── */

/* PLANTILLA 1: EJECUTIVA */
.cv-ejecutiva {
    font-family: 'Georgia', serif;
    display: grid;
    grid-template-columns: 280px 1fr;
    width: 100%;
    max-width: 794px;
    min-height: auto;
    margin: 0 auto;
    box-sizing: border-box;
}
.cv-ejecutiva .cv-sidebar {
    background: #1a1a2e;
    color: #e8e8f0;
    padding: 40px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cv-ejecutiva .cv-sidebar-photo {
    width: 110px; height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #c9a84c;
    display: block;
    margin: 0 auto 8px;
    background: #2a2a3e;
}
.cv-ejecutiva .cv-sidebar-photo-placeholder {
    width: 110px; height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a2a3e, #3a3a5e);
    border: 4px solid #c9a84c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    margin: 0 auto 8px;
    color: #c9a84c;
}
.cv-ejecutiva .cv-name {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .02em;
    line-height: 1.2;
}
.cv-ejecutiva .cv-role {
    text-align: center;
    font-size: .82rem;
    color: #c9a84c;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
    font-style: italic;
}
.cv-ejecutiva .cv-sidebar-block { display: flex; flex-direction: column; gap: 6px; }
.cv-ejecutiva .cv-sidebar-block-title {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: #c9a84c;
    font-family: 'Georgia', serif;
    border-bottom: 1px solid rgba(201,168,76,.3);
    padding-bottom: 4px;
    margin-bottom: 4px;
}
.cv-ejecutiva .cv-sidebar-item {
    font-size: .78rem;
    color: #b8b8cc;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    line-height: 1.4;
}
.cv-ejecutiva .cv-sidebar-item .ci {
    color: #c9a84c;
    flex-shrink: 0;
    margin-top: 1px;
    font-size: .7rem;
}
.cv-ejecutiva .cv-skill-bar { margin-bottom: 8px; }
.cv-ejecutiva .cv-skill-label { font-size: .75rem; color: #b8b8cc; margin-bottom: 4px; display: flex; justify-content: space-between; }
.cv-ejecutiva .cv-skill-track { background: rgba(255,255,255,.1); border-radius: 99px; height: 5px; }
.cv-ejecutiva .cv-skill-fill { background: linear-gradient(90deg, #c9a84c, #e8d5a0); height: 5px; border-radius: 99px; }
.cv-ejecutiva .cv-main {
    background: #fff;
    padding: 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cv-ejecutiva .cv-block-title {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #1a1a2e;
    border-bottom: 2px solid #c9a84c;
    padding-bottom: 4px;
    margin-bottom: 10px;
    font-family: sans-serif;
    font-weight: 800;
}
.cv-ejecutiva .cv-profile-text { font-size: .82rem; color: #374151; line-height: 1.6; }
.cv-ejecutiva .cv-exp-item { margin-bottom: 10px; }
.cv-ejecutiva .cv-exp-item:last-child { margin-bottom: 0; }
.cv-ejecutiva .cv-exp-title { font-size: .88rem; font-weight: 700; color: #1a1a2e; margin: 0 0 1px; }
.cv-ejecutiva .cv-exp-company { font-size: .78rem; color: #c9a84c; font-weight: 600; margin: 0 0 1px; }
.cv-ejecutiva .cv-exp-period { font-size: .72rem; color: #9ca3af; font-style: italic; }
.cv-ejecutiva .cv-exp-desc { font-size: .78rem; color: #4b5563; margin-top: 4px; line-height: 1.5; }
.cv-ejecutiva .cv-edu-item { margin-bottom: 10px; }
.cv-ejecutiva .cv-edu-degree { font-size: .9rem; font-weight: 700; color: #1a1a2e; margin: 0 0 1px; }
.cv-ejecutiva .cv-edu-inst { font-size: .8rem; color: #6b7280; }
.cv-ejecutiva .cv-edu-year { font-size: .72rem; color: #9ca3af; font-style: italic; }

/* Edu dentro del sidebar oscuro de ejecutiva */
.cv-ejecutiva .cv-sidebar .cv-edu-item { margin-bottom: 10px; }
.cv-ejecutiva .cv-sidebar .cv-edu-degree { color: #e8e8f0; font-size: .82rem; }
.cv-ejecutiva .cv-sidebar .cv-edu-inst { color: #b8b8cc; font-size: .76rem; }
.cv-ejecutiva .cv-sidebar .cv-edu-year { color: #c9a84c; font-size: .72rem; }
.cv-ejecutiva .cv-tags-row { display: flex; flex-wrap: wrap; gap: 7px; }
.cv-ejecutiva .cv-tag-item {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 600;
    border-left: 3px solid #c9a84c;
    font-family: sans-serif;
}
.cv-ejecutiva .cv-ref-item { margin-bottom: 12px; }
.cv-ejecutiva .cv-ref-name { font-size: .85rem; font-weight: 700; color: #1a1a2e; }
.cv-ejecutiva .cv-ref-role { font-size: .78rem; color: #6b7280; }
.cv-ejecutiva .cv-footer-brand {
    margin-top: auto;
    text-align: right;
    font-size: .65rem;
    color: #d1d5db;
    font-family: sans-serif;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    border-top: 1px solid #f3f4f6;
    padding-top: 10px;
}
.cv-footer-brand-logo { width: 16px; height: 16px; object-fit: contain; opacity: .5; }

/* PLANTILLA 2: CREATIVA */
.cv-creativa {
    font-family: 'Trebuchet MS', sans-serif;
    background: #fff;
    width: 100%;
    max-width: 794px;
    min-height: auto;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
.cv-creativa .cv-header-band {
    background: linear-gradient(135deg, #7c3aed 0%, #db2777 60%, #f97316 100%);
    padding: 36px 40px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: center;
}
.cv-creativa .cv-header-photo {
    width: 100px; height: 100px;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,.5);
    background: rgba(255,255,255,.2);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: rgba(255,255,255,.7);
}
.cv-creativa .cv-header-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 17px; }
.cv-creativa .cv-header-text .cv-name {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    margin: 0 0 4px;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.cv-creativa .cv-header-text .cv-role {
    font-size: .95rem;
    color: rgba(255,255,255,.85);
    letter-spacing: .5px;
    margin-bottom: 12px;
    font-weight: 600;
}
.cv-creativa .cv-contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.cv-creativa .cv-contact-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .77rem;
    color: rgba(255,255,255,.9);
    background: rgba(255,255,255,.15);
    padding: 4px 10px;
    border-radius: 99px;
    backdrop-filter: blur(4px);
}
.cv-creativa .cv-body {
    display: grid;
    grid-template-columns: 1fr 2fr;
    flex: 1;
}
.cv-creativa .cv-col-left {
    background: #faf5ff;
    padding: 28px 24px;
    border-right: 1px solid #f3e8ff;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.cv-creativa .cv-col-right {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.cv-creativa .cv-block-title {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #7c3aed;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cv-creativa .cv-block-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #e879f9, transparent);
    border-radius: 1px;
}
.cv-creativa .cv-profile-text { font-size: .84rem; color: #374151; line-height: 1.7; }
.cv-creativa .cv-tag-item {
    display: inline-block;
    background: linear-gradient(135deg, #ede9fe, #fce7f3);
    color: #6d28d9;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: .75rem;
    font-weight: 700;
    margin: 3px;
}
.cv-creativa .cv-exp-item { padding: 14px; background: #fff; border-radius: 12px; border: 1px solid #f3e8ff; margin-bottom: 10px; }
.cv-creativa .cv-exp-title { font-size: .92rem; font-weight: 800; color: #1f2937; }
.cv-creativa .cv-exp-company { font-size: .8rem; color: #7c3aed; font-weight: 700; }
.cv-creativa .cv-exp-period { font-size: .73rem; color: #9ca3af; }
.cv-creativa .cv-exp-desc { font-size: .8rem; color: #4b5563; margin-top: 6px; line-height: 1.6; }
.cv-creativa .cv-edu-item { margin-bottom: 12px; padding-left: 12px; border-left: 3px solid #e879f9; }
.cv-creativa .cv-edu-degree { font-size: .88rem; font-weight: 700; color: #1f2937; }
.cv-creativa .cv-edu-inst { font-size: .78rem; color: #6b7280; }
.cv-creativa .cv-sidebar-item { font-size: .8rem; color: #374151; display: flex; gap: 7px; margin-bottom: 7px; }
.cv-creativa .cv-sidebar-item .ci { color: #7c3aed; flex-shrink: 0; font-size: .7rem; margin-top: 1px; }
.cv-creativa .cv-footer-brand {
    margin-top: auto;
    text-align: right;
    font-size: .65rem;
    color: #d1d5db;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    padding: 10px 32px 16px;
    border-top: 1px solid #f3f4f6;
}

/* PLANTILLA 3: MINIMALISTA */
.cv-minimalista {
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    background: #fff;
    width: 100%;
    max-width: 794px;
    min-height: auto;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 56px 60px;
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 48px;
    align-items: start;
}
.cv-minimalista .cv-main-col { display: flex; flex-direction: column; gap: 32px; }
.cv-minimalista .cv-side-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-left: 28px;
    border-left: 1px solid #e5e7eb;
}
.cv-minimalista .cv-name {
    font-size: 2.4rem;
    font-weight: 900;
    color: #111827;
    letter-spacing: -.04em;
    line-height: 1;
    margin-bottom: 4px;
}
.cv-minimalista .cv-role {
    font-size: .9rem;
    font-weight: 400;
    color: #6b7280;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.cv-minimalista .cv-photo {
    width: 80px; height: 80px;
    border-radius: 4px;
    object-fit: cover;
    margin-bottom: 12px;
}
.cv-minimalista .cv-photo-placeholder {
    width: 80px; height: 80px;
    background: #f3f4f6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 12px;
    color: #9ca3af;
}
.cv-minimalista .cv-block-title {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: #9ca3af;
    font-weight: 700;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
}
.cv-minimalista .cv-profile-text { font-size: .87rem; color: #374151; line-height: 1.75; }
.cv-minimalista .cv-exp-item { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #f9fafb; }
.cv-minimalista .cv-exp-item:last-child { border-bottom: none; }
.cv-minimalista .cv-exp-title { font-size: .95rem; font-weight: 700; color: #111827; }
.cv-minimalista .cv-exp-meta { display: flex; gap: 10px; font-size: .78rem; color: #9ca3af; margin: 3px 0 8px; }
.cv-minimalista .cv-exp-dot { color: #d1d5db; }
.cv-minimalista .cv-exp-desc { font-size: .82rem; color: #4b5563; line-height: 1.65; }
.cv-minimalista .cv-tag-item {
    display: inline-block;
    font-size: .75rem;
    color: #374151;
    padding: 4px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    margin: 3px;
    font-weight: 500;
}
.cv-minimalista .cv-contact-item { font-size: .8rem; color: #4b5563; margin-bottom: 8px; display: flex; gap: 8px; }
.cv-minimalista .cv-contact-item .ci { color: #9ca3af; font-size: .7rem; margin-top: 1px; flex-shrink: 0; }
.cv-minimalista .cv-edu-item { margin-bottom: 10px; }
.cv-minimalista .cv-edu-degree { font-size: .85rem; font-weight: 700; color: #111827; }
.cv-minimalista .cv-edu-inst { font-size: .78rem; color: #6b7280; }
.cv-minimalista .cv-edu-year { font-size: .73rem; color: #9ca3af; }
.cv-minimalista .cv-footer-brand {
    grid-column: span 2;
    text-align: right;
    font-size: .65rem;
    color: #d1d5db;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    /* Empuja la marca al pie de página cuando hay espacio */
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

/* PLANTILLA 4: MODERNA */
.cv-moderna {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #fff;
    width: 100%;
    max-width: 794px;
    min-height: auto;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
.cv-moderna .cv-top-bar {
    height: 8px;
    background: linear-gradient(90deg, #059669, #0ea5e9, #6366f1);
}
.cv-moderna .cv-header {
    padding: 36px 40px 28px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    border-bottom: 1px solid #f0fdf4;
}
.cv-moderna .cv-photo {
    width: 90px; height: 90px;
    border-radius: 18px;
    object-fit: cover;
    background: #ecfdf5;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #059669;
}
.cv-moderna .cv-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.cv-moderna .cv-name-block .cv-name {
    font-size: 1.9rem;
    font-weight: 900;
    color: #064e3b;
    letter-spacing: -.03em;
    line-height: 1.1;
}
.cv-moderna .cv-name-block .cv-role {
    font-size: .88rem;
    color: #059669;
    font-weight: 700;
    margin-top: 4px;
    letter-spacing: .5px;
}
.cv-moderna .cv-contact-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}
.cv-moderna .cv-contact-item {
    font-size: .78rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 5px;
}
.cv-moderna .cv-contact-item .ci { color: #059669; font-size: .7rem; }
.cv-moderna .cv-body {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    flex: 1;
}
.cv-moderna .cv-col-left {
    background: #f0fdf4;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.cv-moderna .cv-col-right {
    padding: 28px 36px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.cv-moderna .cv-block-title {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #059669;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cv-moderna .cv-block-title::before {
    content: '';
    width: 18px; height: 3px;
    background: #059669;
    border-radius: 2px;
    flex-shrink: 0;
}
.cv-moderna .cv-profile-text { font-size: .84rem; color: #374151; line-height: 1.7; }
.cv-moderna .cv-tag-item {
    display: inline-block;
    background: #fff;
    border: 1.5px solid #6ee7b7;
    color: #065f46;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: .75rem;
    font-weight: 700;
    margin: 3px;
}
.cv-moderna .cv-exp-item {
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #059669;
    margin-bottom: 10px;
}
.cv-moderna .cv-exp-title { font-size: .9rem; font-weight: 800; color: #064e3b; }
.cv-moderna .cv-exp-company { font-size: .8rem; color: #059669; font-weight: 700; }
.cv-moderna .cv-exp-period { font-size: .72rem; color: #9ca3af; }
.cv-moderna .cv-exp-desc { font-size: .8rem; color: #4b5563; margin-top: 6px; line-height: 1.6; }
.cv-moderna .cv-edu-item {
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    margin-bottom: 8px;
}
.cv-moderna .cv-edu-degree { font-size: .85rem; font-weight: 700; color: #064e3b; }
.cv-moderna .cv-edu-inst { font-size: .78rem; color: #6b7280; }
.cv-moderna .cv-edu-year { font-size: .72rem; color: #9ca3af; }
.cv-moderna .cv-sidebar-item { font-size: .8rem; color: #374151; display: flex; gap: 7px; margin-bottom: 7px; }
.cv-moderna .cv-sidebar-item .ci { color: #059669; flex-shrink: 0; font-size: .7rem; margin-top: 1px; }
.cv-moderna .cv-footer-brand {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    font-size: .65rem;
    color: #d1d5db;
    /* Empuja la marca al pie de página cuando hay espacio */
    margin-top: auto;
    padding: 8px 36px 14px;
    border-top: 1px solid #f3f4f6;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    .cvb-steps { overflow-x: auto; justify-content: flex-start; }
    .cvb-step span:not(.cvb-step-num) { display: none; }
    .cvb-form-layout { grid-template-columns: 1fr; }
    .cvb-form-full { grid-column: span 1; }
    .cvb-section-title { grid-column: span 1; }
    .cvb-dynamic-item { grid-template-columns: 1fr; }
    .cvb-dynamic-full { grid-column: span 1; }
    .cvb-templates-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .cvb-tpl-thumb { height: 140px; }
    .cvb-form-footer { padding: 14px 20px; }
    .cvb-panel { padding: 20px 16px; }
    .cvb-header { padding: 14px 16px; }
    .cvb-header-subtitle { display: none; }
    .cv-ejecutiva { grid-template-columns: 1fr; }
    .cv-ejecutiva .cv-sidebar { padding: 28px 24px; }
    .cv-ejecutiva .cv-main { padding: 28px 24px; }
    .cv-creativa .cv-body { grid-template-columns: 1fr; }
    .cv-minimalista { grid-template-columns: 1fr; padding: 32px 24px; gap: 24px; }
    .cv-minimalista .cv-side-col { border-left: none; padding-left: 0; border-top: 1px solid #e5e7eb; padding-top: 24px; }
    .cv-minimalista .cv-footer-brand { grid-column: span 1; }
    .cv-moderna .cv-header { grid-template-columns: auto 1fr; }
    .cv-moderna .cv-contact-block { display: none; }
    .cv-moderna .cv-body { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .cvb-templates-grid { grid-template-columns: 1fr; }
    .cvb-header-title { font-size: .95rem; }
}

/* Ajustes de impresión para A4: cada plantilla ocupa exactamente una hoja */
@media print {
    .cv-ejecutiva,
    .cv-creativa,
    .cv-minimalista,
    .cv-moderna {
        width: 210mm;
        max-width: 210mm;
        height: 297mm;
        max-height: 297mm;
        margin: 0 auto;
        overflow: hidden;
        box-sizing: border-box;
        page-break-after: always;
    }
}
