.cvia-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	max-width: 1100px;
	margin: 0 auto;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (max-width: 800px) {
	.cvia-wrapper { grid-template-columns: 1fr; }
}

/* Fuerza el ocultamiento real de [hidden], por si el tema define su propio
   "display" para botones/inputs y pisa el comportamiento nativo del atributo. */
.cvia-wrapper [hidden] {
	display: none !important;
}

.cvia-form-panel { background: #fff; border: 1px solid #e4e4e7; border-radius: 12px; padding: 24px; }

.cvia-steps-indicator { display: flex; gap: 10px; margin-bottom: 20px; }
.cvia-step-dot {
	width: 28px; height: 28px; border-radius: 50%; background: #e4e4e7; color: #71717a;
	display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
}
.cvia-step-dot.active { background: #4f46e5; color: #fff; }

.cvia-form-panel label { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600; color: #27272a; }
.cvia-form-panel input[type=text], .cvia-form-panel textarea {
	display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #d4d4d8;
	border-radius: 8px; font-size: 14px; font-weight: 400; font-family: inherit; box-sizing: border-box;
}
.cvia-form-panel input:focus, .cvia-form-panel textarea:focus { outline: 2px solid #4f46e5; border-color: transparent; }

.cvia-photo-picker { display: flex; gap: 14px; align-items: center; margin-top: 6px; }
.cvia-photo-preview {
	width: 64px; height: 64px; border-radius: 50%; background: #f4f4f5; border: 1px dashed #d4d4d8;
	display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
}
.cvia-photo-preview span { font-size: 10px; font-weight: 400; color: #a1a1aa; text-align: center; }
.cvia-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.cvia-photo-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.cvia-photo-hint { font-size: 11.5px; font-weight: 400; color: #a1a1aa; margin: 0; }
.cvia-photo-actions .cvia-btn { padding: 5px 12px; font-size: 12px; }

.cvia-template-options { display: flex; gap: 16px; }
.cvia-template-choice { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; }
.cvia-swatch { width: 60px; height: 40px; border-radius: 6px; display: block; border: 2px solid transparent; }
.cvia-swatch-europass { background: linear-gradient(135deg,#003b74,#1e5fa8); }
.cvia-swatch-moderno { background: linear-gradient(135deg,#4f46e5,#818cf8); }
.cvia-swatch-clasico { background: linear-gradient(135deg,#27272a,#71717a); }
.cvia-swatch-creativo { background: linear-gradient(135deg,#f97316,#ec4899); }
.cvia-template-choice input:checked + .cvia-swatch { border-color: #18181b; }

.cvia-color-picker-wrap { margin-top: 16px; }
.cvia-color-label { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.cvia-color-label input[type=color] { width: 44px; height: 32px; padding: 2px; border: 1px solid #d4d4d8; border-radius: 6px; cursor: pointer; background: none; }
.cvia-europass-note { font-size: 12.5px; font-weight: 400; color: #71717a; margin-top: 12px; }

.cvia-nav-buttons { display: flex; gap: 10px; margin-top: 10px; }
.cvia-btn {
	padding: 10px 20px; border-radius: 8px; border: none; font-size: 14px; font-weight: 600; cursor: pointer;
}
.cvia-btn-primary { background: #4f46e5; color: #fff; }
.cvia-btn-primary:hover { background: #4338ca; }
.cvia-btn-secondary { background: #f4f4f5; color: #27272a; }
.cvia-status { margin-top: 12px; font-size: 13px; color: #dc2626; min-height: 18px; }
.cvia-status.cvia-loading { color: #4f46e5; }

.cvia-preview-panel { display: flex; flex-direction: column; gap: 14px; }
.cvia-preview-placeholder { color: #a1a1aa; font-style: italic; padding: 40px; text-align: center; }

/* --- Tarjeta CV base: layout de barra lateral + contenido principal --- */
.cvia-cv {
	--cvia-accent: #4f46e5;
	background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15);
	font-family: 'Inter', -apple-system, sans-serif;
	font-size: 12.5px; line-height: 1.5; color: #27272a;
	display: flex; align-items: stretch;
	width: 100%; max-width: 210mm; min-height: 297mm; /* proporción A4 en pantalla; la exportación fuerza el ancho exacto en px */
	box-sizing: border-box; overflow: hidden;
}

.cvia-cv-sidebar {
	width: 34%; flex-shrink: 0; background: var(--cvia-accent); color: #fff;
	padding: 40px 24px; box-sizing: border-box;
}
.cvia-cv-photo {
	width: 150px; height: 150px; object-fit: cover; object-position: center;
	display: block; margin: 0 auto 22px; border-radius: 50%;
	border: 5px solid rgba(255,255,255,.85);
	box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.cvia-cv-sidebar h1 { font-size: 19px; font-weight: 700; margin: 0 0 4px; text-align: center; line-height: 1.25; }
.cvia-cv-sidebar .cvia-titulo { font-size: 12.5px; text-align: center; opacity: .92; margin: 0 0 26px; font-weight: 500; letter-spacing: .01em; }
.cvia-cv-sidebar h3 {
	font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; margin: 24px 0 12px;
	padding-bottom: 7px; border-bottom: 1px solid rgba(255,255,255,.3);
}
.cvia-cv-sidebar h3:first-of-type { margin-top: 0; }
.cvia-cv-sidebar ul { list-style: none; margin: 0; padding: 0; }
.cvia-cv-sidebar .cvia-contact-item { font-size: 11.5px; margin-bottom: 9px; word-break: break-word; opacity: .95; }
.cvia-cv-sidebar .cvia-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cvia-cv-sidebar .cvia-tag {
	background: rgba(255,255,255,.16); color: #fff; padding: 4px 11px; border-radius: 999px; font-size: 10.5px; font-weight: 500;
}
.cvia-cv-sidebar .cvia-skill-item { font-size: 11.5px; margin-bottom: 7px; opacity: .95; }

.cvia-cv-main { flex: 1; padding: 40px 34px; box-sizing: border-box; min-width: 0; }
.cvia-cv-main h2 {
	font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--cvia-accent);
	margin: 0 0 12px; padding-bottom: 6px; border-bottom: 2px solid #e4e4e7;
}
.cvia-cv-main .cvia-section { margin-bottom: 24px; }
.cvia-cv-main .cvia-section:last-child { margin-bottom: 0; }
.cvia-cv-main .cvia-resumen { margin: 0; }
.cvia-cv-main .cvia-exp-item, .cvia-cv-main .cvia-edu-item { margin-bottom: 16px; }
.cvia-cv-main .cvia-exp-item:last-child, .cvia-cv-main .cvia-edu-item:last-child { margin-bottom: 0; }
.cvia-cv-main .cvia-exp-puesto { font-weight: 700; font-size: 13px; }
.cvia-cv-main .cvia-exp-periodo { font-size: 11px; color: #71717a; margin-bottom: 5px; font-weight: 500; }
.cvia-cv-main ul.cvia-logros { list-style: none; margin: 6px 0 0; padding: 0; }
.cvia-cv-main ul.cvia-logros li { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.cvia-cv-main ul.cvia-logros li .cvia-bullet { color: var(--cvia-accent); flex-shrink: 0; font-size: 11px; }

/* --- Europass (formato oficial del currículum europeo): estructura fija, color azul institucional --- */
.cvia-template-europass { font-family: 'Inter', Arial, Helvetica, sans-serif; }
.cvia-template-europass .cvia-cv-sidebar { --cvia-accent: #003b74 !important; background: #003b74 !important; }
.cvia-template-europass .cvia-cv-main h2 { color: #003b74; border-bottom-color: #003b74; }
.cvia-template-europass #cvia-color-picker-wrap { display: none; }

/* --- Moderno: sans-serif limpio, color elegible --- */
.cvia-template-moderno { font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

/* --- Clásico: serif elegante, color elegible --- */
.cvia-template-clasico { font-family: 'Lora', Georgia, "Times New Roman", serif; }
.cvia-template-clasico .cvia-cv-sidebar h1 { text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.cvia-template-clasico .cvia-cv-main h2 { font-style: italic; font-weight: 600; }

/* --- Creativo: tipografía marcada, color elegible --- */
.cvia-template-creativo { font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.cvia-template-creativo .cvia-cv-sidebar h1, .cvia-template-creativo .cvia-cv-main h2 { font-family: 'Poppins', 'Inter', sans-serif; }
.cvia-template-creativo .cvia-cv-sidebar h1 { font-weight: 800; }
.cvia-template-creativo .cvia-cv-photo { border-radius: 28% 72% 65% 35% / 45% 35% 65% 55%; } /* forma orgánica sutil, distintiva de esta plantilla */
.cvia-template-creativo .cvia-cv-main h2::before { content: "◆ "; }

/* En pantalla mostramos la hoja con un poco de aire alrededor; al exportar a PDF
   (elemento clonado) se anulan estos márgenes desde JS para que ocupe toda la página. */
.cvia-preview-panel .cvia-cv { margin: 0 auto; }
@media (max-width: 900px) {
	.cvia-cv { width: 100%; min-height: 0; }
}
