/* CLST Account & CV — interfaccia pubblica
   Palette: navy #1A365D (azioni), verde #2D7D46 (verificato/successo), cyan #00CFEF (focus e selezione). */

.clst-reg,
.clst-account,
.clst-box,
.clst-login,
.clst-cvb {
	--clst-navy: #1A365D;
	--clst-navy-2: #244876;
	--clst-green: #2D7D46;
	--clst-cyan: #00CFEF;
	--clst-bg: #F5F8FA;
	--clst-ink: #1C2733;
	--clst-muted: #5B6B7C;
	--clst-line: #D6DEE6;
	--clst-error: #B42318;
	--clst-warn: #9A6212;
	--clst-radius: 6px;
	color: var(--clst-ink);
	font-size: 1rem;
	line-height: 1.5;
	box-sizing: border-box;
}

.clst-reg *,
.clst-account *,
.clst-cvb * {
	box-sizing: border-box;
}

.clst-reg,
.clst-account {
	max-width: 860px;
	margin: 0 auto;
}

.clst-muted { color: var(--clst-muted); font-size: 0.9rem; }
.clst-opt { font-weight: 400; color: var(--clst-muted); font-size: 0.8rem; }

/* ---------- Box messaggi ---------- */
.clst-box {
	border: 1px solid var(--clst-line);
	border-left-width: 4px;
	border-radius: var(--clst-radius);
	background: #fff;
	padding: 1rem 1.25rem;
	margin: 0 0 1.25rem;
}
.clst-box p:last-child { margin-bottom: 0; }
.clst-box h2, .clst-box h3 { margin: 0 0 0.5rem; font-size: 1.2rem; color: var(--clst-navy); }
.clst-box--info { border-left-color: var(--clst-navy); }
.clst-box--success { border-left-color: var(--clst-green); background: #F1F8F3; }
.clst-box--error { border-left-color: var(--clst-error); background: #FEF3F2; }
.clst-box--error:focus { outline: 3px solid var(--clst-cyan); outline-offset: 2px; }
.clst-done h2 { font-size: 1.5rem; }

/* ---------- Pulsanti ---------- */
.clst-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.6rem 1.15rem;
	border: 1px solid var(--clst-navy);
	border-radius: var(--clst-radius);
	background: #fff;
	color: var(--clst-navy);
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	line-height: 1.2;
}
.clst-btn:hover { background: var(--clst-bg); color: var(--clst-navy); }
.clst-btn--primary { background: var(--clst-navy); color: #fff; }
.clst-btn--primary:hover { background: var(--clst-navy-2); color: #fff; }
.clst-btn--ghost { border-color: var(--clst-line); color: var(--clst-muted); font-weight: 500; }
.clst-btn[disabled], .clst-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.clst-btn:focus-visible,
.clst-form input:focus-visible,
.clst-form select:focus-visible,
.clst-form textarea:focus-visible,
.clst-type__opt:focus-within,
.clst-cvb button:focus-visible,
.clst-cvb a:focus-visible {
	outline: 3px solid var(--clst-cyan);
	outline-offset: 2px;
}
.clst-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Form ---------- */
.clst-reg .clst-form,
.clst-account .clst-form,
.clst-cvb .clst-form,
.clst-form.clst-form--narrow { display: block; background: transparent; border: 0; padding: 0; }
.clst-form--narrow { max-width: 440px; margin: 0 auto; }
.clst-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem 1.25rem;
	margin-bottom: 1rem;
}
.clst-grid .span-2 { grid-column: 1 / -1; }
.clst-field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.clst-field label,
.clst-login label {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--clst-ink);
}
.clst-form input[type="text"],
.clst-form input[type="email"],
.clst-form input[type="tel"],
.clst-form input[type="url"],
.clst-form input[type="password"],
.clst-form input[type="number"],
.clst-form input[type="month"],
.clst-form input[type="date"],
.clst-form input:not([type]),
.clst-form select,
.clst-form textarea,
.clst-login input[type="text"],
.clst-login input[type="password"] {
	width: 100%;
	min-height: 44px;
	padding: 0.55rem 0.75rem;
	border: 1px solid #B8C4CF;
	border-radius: var(--clst-radius);
	background: #fff;
	color: var(--clst-ink);
	font: inherit;
	font-size: 1rem;
	box-shadow: none;
}
.clst-form textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.clst-field__help { font-size: 0.82rem; color: var(--clst-muted); }
.clst-field__error { font-size: 0.85rem; color: var(--clst-error); font-weight: 600; }
.clst-field.has-error input,
.clst-field.has-error select { border-color: var(--clst-error); }
.clst-field__ok { font-size: 0.85rem; color: var(--clst-green); font-weight: 600; }

.clst-check {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	margin: 0.75rem 0;
	font-size: 0.93rem;
	cursor: pointer;
}
.clst-check input { width: 20px; height: 20px; margin: 0.15rem 0 0; flex: none; accent-color: var(--clst-navy); }
.clst-check.has-error span { color: var(--clst-error); }

.clst-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Scelta del tipo di account ---------- */
.clst-type {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	border: 0;
	padding: 0;
	margin: 0 0 1.75rem;
}
.clst-type legend {
	grid-column: 1 / -1;
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--clst-navy);
	margin-bottom: 0.75rem;
	padding: 0;
}
.clst-type__opt {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 1rem 1.1rem 1rem 3rem;
	border: 1px solid var(--clst-line);
	border-radius: var(--clst-radius);
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.clst-type__opt input {
	position: absolute;
	left: 1.1rem;
	top: 1.2rem;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--clst-navy);
}
.clst-type__title { font-weight: 700; font-size: 1.05rem; color: var(--clst-ink); }
.clst-type__desc { font-size: 0.88rem; color: var(--clst-muted); }
.clst-type__opt:has(input:checked) {
	border-color: var(--clst-navy);
	box-shadow: inset 4px 0 0 var(--clst-cyan);
	background: #FBFDFE;
}

/* ---------- Pannelli ---------- */
.clst-pane { margin-bottom: 0.5rem; }
.clst-reg.js [data-pane] { display: none; }
.clst-reg.js[data-type="candidato"] [data-pane="candidato"],
.clst-reg.js[data-type="azienda"] [data-pane="azienda"] { display: block; }
.clst-reg.js[data-type="candidato"] [data-pane="candidato"] {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 1.5rem;
	align-items: start;
}
.clst-common {
	border-top: 1px solid var(--clst-line);
	padding-top: 1.25rem;
	margin-top: 0.5rem;
}
.clst-common .clst-btn--primary { margin: 0.75rem 0 0.5rem; min-width: 220px; }

/* ---------- Passaggi verifica azienda (è una sequenza reale) ---------- */
.clst-steps {
	list-style: none;
	counter-reset: clst-step;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0;
	margin: 0 0 1.5rem;
	padding: 0;
	border: 1px solid var(--clst-line);
	border-radius: var(--clst-radius);
	background: var(--clst-bg);
}
.clst-steps li {
	counter-increment: clst-step;
	padding: 0.9rem 1rem 0.9rem 3rem;
	position: relative;
	font-size: 0.9rem;
	color: var(--clst-muted);
}
.clst-steps li + li { border-left: 1px solid var(--clst-line); }
.clst-steps li::before {
	content: counter(clst-step);
	position: absolute;
	left: 1rem;
	top: 0.9rem;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	background: var(--clst-navy);
	color: #fff;
	font-weight: 700;
	font-size: 0.8rem;
	display: grid;
	place-items: center;
}
.clst-steps li:last-child::before { background: var(--clst-green); }
.clst-steps strong { display: block; color: var(--clst-ink); }

/* ---------- Carta identità candidato: l'elemento distintivo ---------- */
.clst-idcard {
	position: relative;
	border-radius: 10px;
	background: var(--clst-navy);
	color: #fff;
	padding: 1.1rem 1.2rem 1.2rem;
	overflow: hidden;
}
.clst-idcard::after {
	content: "";
	position: absolute;
	right: -40px;
	top: -40px;
	width: 140px;
	height: 140px;
	border-radius: 50%;
	border: 18px solid rgba(0, 207, 239, 0.12);
}
.clst-idcard > * { position: relative; z-index: 1; }
.clst-idcard::after { z-index: 0; }
.clst-idcard p { margin: 0; }
.clst-idcard__head { font-size: 0.85rem; color: #A9C3DE; margin-bottom: 0.9rem !important; }
.clst-idcard__bars {
	background: #fff;
	border-radius: 4px;
	padding: 0.55rem 0.6rem 0.35rem;
	line-height: 0;
}
.clst-idcard__bars svg { width: 100%; height: 56px; display: block; }
.clst-idcard__code {
	font-variant-numeric: tabular-nums;
	font-size: 1.15rem;
	letter-spacing: 0.12em;
	font-weight: 700;
	margin: 0.5rem 0 0.9rem !important;
}
.clst-idcard__code span { color: #A9C3DE; }
.clst-idcard__name {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.45rem 0.6rem;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.08);
	margin-bottom: 0.8rem !important;
}
.clst-idcard__name [data-mirror] { filter: blur(5px); user-select: none; }
.clst-lock {
	flex: none;
	width: 12px;
	height: 10px;
	border-radius: 2px;
	background: var(--clst-cyan);
	position: relative;
	margin-top: 5px;
}
.clst-lock::before {
	content: "";
	position: absolute;
	left: 2px;
	top: -6px;
	width: 8px;
	height: 8px;
	border: 2px solid var(--clst-cyan);
	border-bottom: 0;
	border-radius: 5px 5px 0 0;
	box-sizing: border-box;
}
.clst-idcard__foot { font-size: 0.82rem; color: #C9D8E8; line-height: 1.45; }
.clst-idcard--live .clst-idcard__code { font-size: 1.35rem; }

/* ---------- Area account ---------- */
.clst-account__head { margin-bottom: 1.25rem; }
.clst-account__head h2 { margin: 0 0 0.2rem; font-size: 1.6rem; color: var(--clst-navy); }
.clst-account__head .clst-muted a { margin-left: 0.75rem; }
.clst-account__grid {
	display: grid;
	grid-template-columns: 320px minmax(0, 1fr);
	gap: 1.25rem;
	margin-bottom: 1.25rem;
}
.clst-card {
	border: 1px solid var(--clst-line);
	border-radius: var(--clst-radius);
	background: #fff;
	padding: 1.25rem;
	margin-bottom: 1.25rem;
}
.clst-card h3 { margin: 0 0 0.6rem; font-size: 1.15rem; color: var(--clst-navy); }
.clst-card--quiet { background: var(--clst-bg); }
.clst-card--quiet h3 { font-size: 1rem; }
.clst-upgrade summary {
	cursor: pointer;
	list-style: none;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.2rem 1rem;
	align-items: center;
}
.clst-upgrade summary::-webkit-details-marker { display: none; }
.clst-upgrade summary h3 { margin: 0; grid-column: 1; }
.clst-upgrade summary .clst-muted { grid-column: 1; }
.clst-upgrade summary::after {
	content: "Apri";
	grid-column: 2;
	grid-row: 1 / span 2;
	font-weight: 600;
	color: var(--clst-navy);
	font-size: 0.9rem;
	padding: 0.35rem 0.8rem;
	border: 1px solid var(--clst-line);
	border-radius: var(--clst-radius);
}
.clst-upgrade[open] summary::after { content: "Chiudi"; }
.clst-upgrade[open] summary { margin-bottom: 1rem; }

.clst-status {
	border-radius: var(--clst-radius);
	padding: 1rem 1.25rem;
	margin-bottom: 1.25rem;
	border: 1px solid var(--clst-line);
	background: #fff;
}
.clst-status h3 { margin: 0 0 0.4rem; font-size: 1.15rem; display: flex; align-items: center; gap: 0.5rem; }
.clst-status p:last-child { margin-bottom: 0; }
.clst-status--verified { background: #F1F8F3; border-color: #B9DCC4; }
.clst-status--verified h3 { color: var(--clst-green); }
.clst-status--pending { background: #FFF8EB; border-color: #F0D9A8; }
.clst-status--pending h3 { color: var(--clst-warn); }
.clst-status--rejected,
.clst-status--suspended { background: #FEF3F2; border-color: #F4C7C3; }
.clst-status--rejected h3,
.clst-status--suspended h3 { color: var(--clst-error); }

.clst-dl { display: grid; grid-template-columns: 140px 1fr; gap: 0.4rem 1rem; margin: 0 0 0.75rem; }
.clst-dl dt { color: var(--clst-muted); font-size: 0.9rem; }
.clst-dl dd { margin: 0; font-weight: 600; }

/* ---------- Badge azienda verificata ---------- */
.clst-verified {
	display: inline-block;
	width: 1.05em;
	height: 1.05em;
	border-radius: 50%;
	background: var(--clst-green, #2D7D46);
	position: relative;
	vertical-align: -0.15em;
	flex: none;
}
.clst-verified::after {
	content: "";
	position: absolute;
	left: 35%;
	top: 18%;
	width: 26%;
	height: 48%;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
li.clst-badge-verified {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	color: #2D7D46;
	font-weight: 600;
}

/* ---------- Login ---------- */
.clst-login form p { margin: 0 0 1rem; }
.clst-login .login-remember label { font-weight: 400; }
.clst-login input[type="submit"] {
	min-height: 44px;
	padding: 0.6rem 1.4rem;
	border: 0;
	border-radius: 6px;
	background: #1A365D;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
	.clst-type,
	.clst-grid,
	.clst-steps,
	.clst-account__grid { grid-template-columns: 1fr; }
	.clst-steps li + li { border-left: 0; border-top: 1px solid var(--clst-line); }
	.clst-reg.js[data-type="candidato"] [data-pane="candidato"] { grid-template-columns: 1fr; }
	.clst-idcard { order: -1; }
	.clst-dl { grid-template-columns: 1fr; }
	.clst-common .clst-btn--primary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.clst-type__opt { transition: none; }
}

/* ---------- Galleria modelli CV ---------- */
.clst-models {
	--clst-navy: #1A365D; --clst-green: #2D7D46; --clst-muted: #5B6B7C; --clst-line: #D6DEE6; --clst-cyan: #00CFEF;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	margin: 1.5rem 0;
}
.clst-model {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--clst-line);
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
}
.clst-model__img { display: block; background: #EEF2F5; padding: 1rem 1rem 0; }
.clst-model__img img {
	display: block; width: 100%; height: auto; aspect-ratio: 210 / 297; object-fit: cover; object-position: top;
	box-shadow: 0 1px 2px rgba(16,32,56,.08), 0 6px 18px rgba(16,32,56,.12); background: #fff;
}
.clst-model__body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem 1.2rem; flex: 1; }
.clst-model__body h3 { margin: 0; font-size: 1.15rem; color: var(--clst-navy); }
.clst-model__price { margin: 0; font-weight: 700; color: #1C2733; }
.clst-model__price.is-free { color: var(--clst-green); }
.clst-model__desc { margin: 0 0 .6rem; color: var(--clst-muted); font-size: .92rem; flex: 1; }
.clst-model .clst-btn { align-self: flex-start; }
.clst-model__img:focus-visible, .clst-model .clst-btn:focus-visible { outline: 3px solid var(--clst-cyan); outline-offset: 2px; }
@media (max-width: 900px) { .clst-models { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .clst-models { grid-template-columns: 1fr; } }

/* ---------- Pagina prodotto modello CV ---------- */
.clst-model-cta {
	border: 1px solid #D6DEE6; border-left: 4px solid #1A365D; border-radius: 6px;
	padding: .9rem 1.1rem; margin: 1rem 0 1.25rem; background: #F5F8FA; font-size: .95rem;
}
.clst-model-cta p { margin: 0 0 .6rem; }
.clst-model-cta p:last-child { margin-bottom: 0; }
.clst-model-cta .clst-btn { display: inline-flex; min-height: 44px; padding: .6rem 1.1rem; border: 1px solid #1A365D; border-radius: 6px; color: #1A365D; font-weight: 600; text-decoration: none; background: #fff; }
.clst-model-cta__colors { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.clst-model-cta__colors span:first-child { margin-right: .3rem; }
.clst-dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #D6DEE6; }
.clst-model-cta .clst-muted { color: #5B6B7C; font-size: .85rem; }

.clst-models__bundle { margin: -0.5rem 0 1.5rem; padding: 0.8rem 1rem; border-radius: 8px; background: #F1F8F3; border: 1px solid #B9DCC4; color: #1C2733; }
.clst-models__bundle a { color: #1A365D; font-weight: 600; }
