/* ============================================================================
   localeok — PANNELLO CLIENTI
   Design system dedicato: identità localeok (blu #3b5499, verde #29b353,
   HK Grotesk), indipendente dal backoffice.

   Layout: shell con SIDEBAR fissa a sinistra (mobile: topbar + nav orizzontale),
   contenuto con header di pagina uniforme. Tutte le pagine condividono la
   stessa larghezza, gli stessi respiri e gli stessi componenti.
   ============================================================================ */

/* ------------------------------------------------------------------ font */
@font-face { font-family: 'HK Grotesk'; src: url('../../admin/fonts/hkgrotesk-regular.woff2') format('woff2'), url('../../admin/fonts/hkgrotesk-regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'HK Grotesk'; src: url('../../admin/fonts/hkgrotesk-medium.woff2') format('woff2'), url('../../admin/fonts/hkgrotesk-medium.woff') format('woff'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'HK Grotesk'; src: url('../../admin/fonts/hkgrotesk-semibold.woff2') format('woff2'), url('../../admin/fonts/hkgrotesk-semibold.woff') format('woff'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'HK Grotesk'; src: url('../../admin/fonts/hkgrotesk-bold.woff2') format('woff2'), url('../../admin/fonts/hkgrotesk-bold.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }

/* ------------------------------------------------------------------ token */
body.lk-app, body.lk-auth {
	--lk-bg:         #f4f6fa;
	--lk-surface:    #ffffff;
	--lk-brand:      #3b5499;
	--lk-brand-deep: #2f4479;
	--lk-brand-ink:  #1f2c4e;
	--lk-brand-tint: #ecf0f8;
	--lk-green:      #29b353;
	--lk-green-deep: #1e8f42;
	--lk-green-tint: #e7f8ec;
	--lk-ink:        #232946;
	--lk-ink-soft:   #5a6076;
	--lk-ink-faint:  #9298ad;
	--lk-line:       #e6e8f0;
	--lk-danger:     #d64545;
	--lk-danger-tint:#fdecec;
	--lk-warn:       #dd8a09;
	--lk-warn-tint:  #fdf3e2;
	--lk-gold:       #c9971c;
	--lk-gold-deep:  #a87d12;
	--lk-gold-tint:  #faf3dc;
	--lk-radius:     16px;
	--lk-radius-sm:  10px;
	--lk-shadow:     0 1px 2px rgba(35,41,70,.05), 0 8px 24px -12px rgba(35,41,70,.12);
	--lk-shadow-lift:0 2px 4px rgba(35,41,70,.06), 0 16px 36px -14px rgba(35,41,70,.18);
	--lk-sidebar-w:  264px;

	font-family: 'HK Grotesk', -apple-system, 'Segoe UI', sans-serif;
	background: var(--lk-bg);
	color: var(--lk-ink);
	font-size: 15px;
	-webkit-font-smoothing: antialiased;
	margin: 0;
}

body.lk-app h1, body.lk-app h2, body.lk-app h3, body.lk-app h4, body.lk-app h5, body.lk-app h6,
body.lk-auth h1, body.lk-auth h2, body.lk-auth h3, body.lk-auth h4, body.lk-auth h5 {
	font-family: 'HK Grotesk', sans-serif; font-weight: 700; color: var(--lk-ink); letter-spacing: -0.015em;
}
body.lk-app .text-muted, body.lk-auth .text-muted { color: var(--lk-ink-soft) !important; }
body.lk-app ::selection, body.lk-auth ::selection { background: var(--lk-brand); color: #fff; }

/* ============================================================ SHELL LAYOUT */
body.lk-app { display: flex; min-height: 100vh; }

/* ---------- sidebar (desktop) ---------- */
.lk-sidebar {
	width: var(--lk-sidebar-w); flex-shrink: 0;
	background: linear-gradient(178deg, var(--lk-brand-ink) 0%, #27365f 55%, var(--lk-brand-deep) 100%);
	color: #fff;
	display: flex; flex-direction: column;
	position: sticky; top: 0; height: 100vh;
	padding: 1.5rem 1.1rem 1.1rem;
	overflow: hidden;   /* niente contenuto che sborda sul grigio del body */
}
/* il brand resta in alto, la scheda attività + aiuto restano in basso:
   scorre SOLO l'elenco delle voci quando non ci sta tutto (schermi bassi) */
.lk-sidebar .lk-brand, .lk-sidebar .lk-brand-claim, .lk-side-biz, .lk-side-legal, .lk-side-bottom { flex-shrink: 0; }
.lk-sidebar .lk-brand {
	font-size: 1.55rem; font-weight: 700; letter-spacing: -0.5px;
	color: #fff; text-decoration: none; display: block; padding: 0 .55rem; margin-bottom: .35rem;
}
.lk-sidebar .lk-brand b { color: var(--lk-green); }
.lk-sidebar .lk-brand img { height: 32px; width: auto; display: block; }
.lk-mobilebar .lk-brand img { height: 26px; width: auto; display: block; }
.lk-auth-side .lk-brand img { height: 40px; width: auto; display: block; }
.lk-sidebar .lk-brand-claim {
	color: rgba(255,255,255,.45); font-size: .78rem; padding: 0 .55rem; margin-bottom: 1.6rem;
}

.lk-nav { display: flex; flex-direction: column; gap: .25rem; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0 -.35rem; padding: 0 .35rem; }
/* scrollbar sottile e discreta sul fondo scuro */
.lk-nav::-webkit-scrollbar { width: 6px; }
.lk-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }
.lk-nav { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.lk-nav a {
	display: flex; align-items: center; gap: .8rem;
	padding: .65rem .8rem; border-radius: 12px;
	color: rgba(255,255,255,.78); text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.lk-nav a i { font-size: 1.25rem; width: 1.5rem; text-align: center; opacity: .9; }
.lk-nav a .lk-nav-label { font-weight: 600; font-size: .95rem; line-height: 1.15; display: block; }
.lk-nav a .lk-nav-hint { font-size: .72rem; color: rgba(255,255,255,.62); display: block; }
.lk-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.lk-nav a.active { background: rgba(255,255,255,.13); color: #fff; box-shadow: inset 3px 0 0 var(--lk-green); }
.lk-nav a.active .lk-nav-hint { color: rgba(255,255,255,.78); }

/* scheda attività nella sidebar */
.lk-side-biz {
	margin: 1.4rem 0 0; padding: .85rem .9rem;
	background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
	border-radius: 14px;
}
.lk-side-biz .lk-side-biz-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.4); font-weight: 700; }
.lk-side-biz .lk-side-biz-name { font-weight: 700; font-size: .95rem; color: #fff; line-height: 1.25; }
.lk-side-biz .lk-side-biz-type { font-size: .78rem; color: rgba(255,255,255,.55); }

/* badge del piano nella scheda attività */
.lk-side-plan {
	display: inline-flex; align-items: center; gap: .3rem; margin-top: .45rem;
	font-size: .64rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
	padding: .05rem .5rem; border-radius: 999px; text-decoration: none;
}
.lk-side-plan i { font-size: .78rem; }
.lk-sidebar a.lk-side-plan-trial   { background: rgba(201,151,28,.16); border: 1px solid rgba(214,171,60,.5); color: #ecc85e; }
.lk-sidebar a.lk-side-plan-premium { background: linear-gradient(135deg, #d9ab2e, var(--lk-gold-deep)); border: 1px solid #e3bb4a; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.18); }
.lk-sidebar a.lk-side-plan-basic   { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); color: rgba(255,255,255,.75); }
.lk-sidebar a.lk-side-plan-off     { background: rgba(214,69,69,.18); border: 1px solid rgba(214,69,69,.4); color: #f3a0a0; }

/* nessun link blu dentro la sidebar, qualunque regola arrivi dopo */
.lk-sidebar a { color: rgba(255,255,255,.78); }
.lk-sidebar .lk-brand { color: #fff; }

/* riga compatta in fondo: aiuto + legali su un solo rigo, poi il logout */
.lk-side-bottom { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.08); }
.lk-side-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .45rem; font-size: .74rem; padding: 0 .2rem; margin-bottom: .8rem; }
.lk-side-foot a { text-decoration: none; color: rgba(255,255,255,.5); }
.lk-side-foot a:hover { color: #fff; }
.lk-sidebar .lk-side-foot a.lk-mail { color: var(--lk-green); font-weight: 600; }
.lk-side-foot .lk-foot-sep { color: rgba(255,255,255,.22); }
.lk-side-user { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 .2rem; }
.lk-side-user .lk-side-user-name { color: rgba(255,255,255,.85); font-weight: 600; font-size: .88rem; display: flex; align-items: center; gap: .45rem; min-width: 0; }
.lk-side-user .lk-side-user-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-side-user .lk-side-user-name::before { content: ''; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--lk-green); box-shadow: 0 0 0 3px rgba(41,179,83,.25); }
.lk-side-user .btn { border-color: rgba(255,255,255,.3); color: rgba(255,255,255,.85); border-radius: 10px; font-weight: 600; font-size: .8rem; padding: .25rem .7rem; }
.lk-side-user .btn:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- topbar mobile ---------- */
.lk-mobilebar { display: none; }
@media (max-width: 991.98px) {
	body.lk-app { display: block; }
	.lk-sidebar { display: none; }
	.lk-mobilebar {
		display: block; position: sticky; top: 0; z-index: 1020;
		background: linear-gradient(135deg, var(--lk-brand-ink), var(--lk-brand));
		box-shadow: 0 2px 14px rgba(35,41,70,.25);
	}
	.lk-mobilebar .lk-mb-top { display: flex; align-items: center; justify-content: space-between; padding: .7rem 1rem 0; }
	.lk-mobilebar .lk-brand { font-size: 1.3rem; font-weight: 700; color: #fff; text-decoration: none; letter-spacing: -0.5px; }
	.lk-mobilebar .lk-brand b { color: var(--lk-green); }
	.lk-mobilebar .btn { border-color: rgba(255,255,255,.35); color: #fff; border-radius: var(--lk-radius-sm); font-weight: 600; font-size: .8rem; padding: .25rem .8rem; }
	.lk-mobilebar nav { display: flex; overflow-x: auto; gap: .2rem; padding: .3rem .6rem .0; }
	.lk-mobilebar nav a {
		color: rgba(255,255,255,.72); text-decoration: none; font-weight: 600; font-size: .875rem;
		padding: .55rem .8rem; border-bottom: 3px solid transparent; white-space: nowrap;
	}
	.lk-mobilebar nav a.active { color: #fff; border-bottom-color: var(--lk-green); }
}

/* ---------- area contenuto ---------- */
.lk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lk-content { width: 100%; max-width: 1440px; margin: 0 auto; padding: 2rem 2.5rem 1rem; flex: 1; }
@media (max-width: 767.98px) { .lk-content { padding: 1.25rem 1rem .5rem; } }
.lk-footer { text-align: center; padding: 1.2rem; color: var(--lk-ink-faint); font-size: .8rem; }

/* header di pagina uniforme */
.lk-page-head { margin-bottom: 1.5rem; }
.lk-page-head .lk-eyebrow {
	font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
	color: var(--lk-green-deep); margin-bottom: .2rem;
}
.lk-page-head h1 { font-size: 1.65rem; margin-bottom: .25rem; }
.lk-page-head h1 .lk-biz-name { color: var(--lk-brand); }

/* ------- fascicolo: albero cartelle + documenti a riquadri ------- */
.lk-docs-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 991px) { .lk-docs-layout { grid-template-columns: 1fr; } }
.lk-foldertree { position: sticky; top: 1rem; }
.lk-tree { display: flex; flex-direction: column; gap: 2px; }
.lk-tree-item {
	display: flex; align-items: center; gap: .55rem;
	padding: .45rem .65rem; border-radius: 8px;
	color: var(--lk-ink); text-decoration: none; font-size: .92rem;
	cursor: pointer;
}
body.lk-app .lk-content a.lk-tree-item { color: var(--lk-ink); }
.lk-tree-item i { color: var(--lk-brand); font-size: 1.05rem; flex-shrink: 0; }
.lk-tree-item:hover { background: var(--lk-brand-tint); }
.lk-tree-item.active { background: var(--lk-brand); color: #fff; }
body.lk-app .lk-content a.lk-tree-item.active { color: #fff; }
.lk-tree-item.active i, .lk-tree-item.active .lk-tree-count { color: #fff; }
.lk-tree-sub { margin-left: 1.35rem; font-size: .88rem; }
.lk-tree-add { color: var(--lk-ink-soft, #8a90a6); font-style: italic; }
.lk-tree-add i { color: var(--lk-ink-soft, #8a90a6); }
.lk-tree-label { flex-grow: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-tree-count { font-size: .78rem; color: var(--lk-ink-soft, #8a90a6); font-variant-numeric: tabular-nums; }
.lk-tree-chev { flex-shrink: 0; color: var(--lk-ink-soft, #8a90a6) !important; font-size: 1.1rem; padding: 0 .1rem; }
.lk-tree-chev:hover { color: var(--lk-brand) !important; }
.lk-tree-kids { display: flex; flex-direction: column; gap: 2px; }

.lk-docs-main { display: flex; flex-direction: column; }
.lk-doc-grid { display: grid; grid-template-columns: 1fr; gap: .55rem; margin-bottom: 1.5rem; }
.lk-doc-grid:empty { display: none; }
.lk-doc-card {
	background: #fff; border: 1px solid var(--lk-line, #e5e8f0); border-radius: var(--lk-radius, 14px);
	padding: .55rem .85rem; display: flex; flex-direction: row; align-items: center; gap: .8rem;
	transition: box-shadow .15s ease, transform .15s ease;
}
.lk-doc-card:hover { box-shadow: 0 6px 18px rgba(59, 84, 153, .10); transform: translateY(-1px); }
.lk-doc-card.lk-doc-expired { border-color: #f3c2c2; background: #fffafa; }
.lk-doc-top { display: flex; gap: .6rem; align-items: center; flex: 1 1 auto; min-width: 0; }
.lk-doc-ico { font-size: 1.35rem; color: var(--lk-brand); flex-shrink: 0; line-height: 1.1; }
.lk-doc-title { font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-doc-sub { display: flex; align-items: center; gap: .45rem; margin-top: .12rem; min-width: 0; }
.lk-doc-rule { font-size: .76rem; color: var(--lk-ink-soft, #8a90a6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-doc-side { display: flex; align-items: center; gap: .35rem; flex-shrink: 0; margin-left: auto; }
.lk-doc-dates { font-size: .74rem; color: var(--lk-ink-soft, #8a90a6); text-align: right; line-height: 1.3; margin-right: .35rem; white-space: nowrap; }
.lk-doc-path { font-size: .72rem; color: var(--lk-brand); background: var(--lk-brand-tint); padding: .1rem .45rem; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; max-width: 40%; }
@media (max-width: 767.98px) {
	.lk-doc-card { flex-wrap: wrap; }
	.lk-doc-side { margin-left: 2.1rem; }
	.lk-doc-dates { text-align: left; }
}
a.lk-doc-top { text-decoration: none; color: inherit; }
a.lk-doc-top:hover .lk-doc-title { color: var(--lk-brand); }
body.lk-app .lk-content a.lk-doc-top { color: inherit; }

/* overlay del drag & drop: appare trascinando file sulla pagina */
.lk-dropzone {
	display: none; position: fixed; inset: 0; z-index: 2000;
	background: rgba(59, 84, 153, .18); backdrop-filter: blur(2px);
	align-items: center; justify-content: center; pointer-events: none;
}
body.lk-dragging .lk-dropzone { display: flex; }
.lk-dropzone > div {
	background: #fff; border: 3px dashed var(--lk-brand); border-radius: var(--lk-radius, 16px);
	padding: 2.2rem 3rem; text-align: center; font-weight: 700; color: var(--lk-brand); font-size: 1.1rem;
}
.lk-dropzone i { font-size: 2.4rem; }

/* ritaglio del logo (modal caricamento): riquadro 3:1 con sfondo a scacchi */
.lok-crop-frame {
	position: relative; width: 100%; overflow: hidden; border: 1px solid var(--lk-line, #e5e8f0);
	border-radius: 10px; margin-top: .6rem; touch-action: none;
	background: repeating-conic-gradient(#f1f3f9 0% 25%, #fff 0% 50%) 0 0 / 18px 18px;
}
.lok-crop-frame canvas { display: block; cursor: grab; }
.lok-crop-frame canvas:active { cursor: grabbing; }
.lok-crop-bar { display: flex; align-items: center; gap: .6rem; margin-top: .5rem; color: var(--lk-ink-soft, #8a90a6); }
.lok-crop-bar .form-range { flex: 1 1 auto; }

/* trascinamento dei documenti sulle cartelle dell'albero */
.lk-doc-card[draggable="true"] { cursor: grab; }
.lk-doc-card.lk-doc-dragging { opacity: .45; }
.lk-tree-item.lk-tree-drop { background: var(--lk-green-tint); box-shadow: inset 0 0 0 2px var(--lk-green); }
.lk-tree-item.active.lk-tree-drop { background: var(--lk-green-deep); }
.lk-page-head .lk-sub { color: var(--lk-ink-soft); margin: 0; max-width: 95ch; }
.lk-page-head-row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

/* ============================================================ COMPONENTI */

/* ---------- card ---------- */
body.lk-app .card { border: 1px solid var(--lk-line); border-radius: var(--lk-radius); box-shadow: var(--lk-shadow); margin-bottom: 1.25rem; background: var(--lk-surface); }
body.lk-app .card-header { background: transparent; border-bottom: 1px solid var(--lk-line); padding: 1rem 1.25rem; border-radius: var(--lk-radius) var(--lk-radius) 0 0 !important; }
body.lk-app .card-title { font-weight: 700; color: var(--lk-ink); }
body.lk-app .card-animate { transition: transform .18s ease, box-shadow .18s ease; }
body.lk-app .card-animate:hover { transform: translateY(-3px); box-shadow: var(--lk-shadow-lift); }

/* ---------- striscia di stato ("sei in regola?") ---------- */
.lk-hero {
	border-radius: var(--lk-radius); padding: 1.15rem 1.4rem; margin-bottom: 1.5rem;
	display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
	border: 1px solid transparent;
}
.lk-hero i { font-size: 1.9rem; }
.lk-hero .lk-hero-title { font-weight: 700; font-size: 1.08rem; }
.lk-hero p { margin: 0; font-size: .9rem; }
body.lk-app .lk-hero .btn {
	margin-left: auto; flex: 0 0 auto; align-self: center; white-space: nowrap;
	padding: .28rem .7rem; font-size: .8rem; font-weight: 600; border-radius: 8px; line-height: 1.4;
}
body.lk-app .lk-hero .btn i { font-size: .85rem; }
.lk-hero.lk-hero-ok    { background: var(--lk-green-tint); border-color: #c8ecd4; color: var(--lk-green-deep); }
.lk-hero.lk-hero-warn  { background: var(--lk-warn-tint); border-color: #f2ddb2; color: #9c6407; }
.lk-hero.lk-hero-danger{ background: var(--lk-danger-tint); border-color: #f4c7c7; color: var(--lk-danger); }

/* ---------- KPI ---------- */
.lk-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 991.98px) { .lk-kpis { grid-template-columns: repeat(2, 1fr); } }
.lk-kpi {
	background: var(--lk-surface); border: 1px solid var(--lk-line); border-radius: var(--lk-radius);
	box-shadow: var(--lk-shadow); padding: 1rem 1.15rem; position: relative; overflow: hidden;
	text-decoration: none; display: block; transition: transform .18s ease, box-shadow .18s ease;
}
a.lk-kpi:hover { transform: translateY(-3px); box-shadow: var(--lk-shadow-lift); }
.lk-kpi::before { content: ''; position: absolute; inset: 0 auto auto 0; width: 100%; height: 4px; background: var(--lk-line); }
.lk-kpi .lk-kpi-label { font-size: .72rem; letter-spacing: .08em; font-weight: 700; text-transform: uppercase; color: var(--lk-ink-faint); }
.lk-kpi .lk-kpi-value { font-size: 2.15rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin: .15rem 0 0; }
.lk-kpi .lk-kpi-hint { font-size: .78rem; color: var(--lk-ink-faint); }
.lk-kpi.lk-danger::before  { background: var(--lk-danger); }   .lk-kpi.lk-danger .lk-kpi-value { color: var(--lk-danger); }
.lk-kpi.lk-warn::before    { background: var(--lk-warn); }     .lk-kpi.lk-warn .lk-kpi-value { color: var(--lk-warn); }
.lk-kpi.lk-brand::before   { background: var(--lk-brand); }    .lk-kpi.lk-brand .lk-kpi-value { color: var(--lk-brand); }
.lk-kpi.lk-green::before   { background: var(--lk-green); }    .lk-kpi.lk-green .lk-kpi-value { color: var(--lk-green-deep); }

/* ---------- consulenze: card esperti + filtri ---------- */
.lk-chip {
	display: inline-flex; align-items: center; gap: .3rem; cursor: pointer;
	border: 1px solid var(--lk-line); border-radius: 999px; padding: .3rem .85rem;
	font-size: .82rem; font-weight: 600; color: var(--lk-ink-soft); background: var(--lk-surface);
	transition: background .15s ease, color .15s ease;
}
.lk-chip small { font-weight: 500; opacity: .7; }
.lk-chip:hover { border-color: var(--lk-brand); color: var(--lk-brand); }
.lk-chip.active { background: var(--lk-brand); border-color: var(--lk-brand); color: #fff; }
.lk-exp-card { transition: box-shadow .15s ease, transform .15s ease; }
.lk-exp-card:hover { box-shadow: var(--lk-shadow-lift); transform: translateY(-2px); }
.lk-exp-avatar {
	width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
	display: flex; align-items: center; justify-content: center;
	background: var(--lk-brand-tint); color: var(--lk-brand); font-weight: 700; letter-spacing: .02em;
}
.lk-exp-spec { font-size: .78rem; color: var(--lk-brand); background: var(--lk-brand-tint); padding: .12rem .5rem; border-radius: 6px; display: inline-block; margin-top: .2rem; }
.lk-exp-bio { font-size: .86rem; }
.lk-exp-meta {
	display: flex; align-items: center; justify-content: space-between; gap: .8rem;
	border-top: 1px dashed var(--lk-line); padding-top: .7rem; margin-bottom: .8rem;
}
.lk-exp-price { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.lk-exp-incl { font-size: .74rem; color: var(--lk-ink-faint); }
.lk-exp-slot { font-size: .78rem; color: var(--lk-ink-soft); text-align: right; line-height: 1.35; }

/* ---------- piani e prezzi ---------- */
.lk-cycle-toggle { display: flex; justify-content: center; margin-bottom: 1.4rem; }
.lk-cycle-toggle button {
	border: 1px solid var(--lk-line); background: var(--lk-surface); color: var(--lk-ink-soft);
	font-weight: 600; font-size: .9rem; padding: .5rem 1.4rem; cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.lk-cycle-toggle button:first-child { border-radius: 999px 0 0 999px; border-right: none; }
.lk-cycle-toggle button:last-child  { border-radius: 0 999px 999px 0; }
.lk-cycle-toggle button.active { background: var(--lk-brand); border-color: var(--lk-brand); color: #fff; }
.lk-toggle-save { background: var(--lk-green); color: #fff; font-size: .7rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; margin-left: .3rem; }
.lk-pricing[data-cycle="month"] .lk-cycle-year  { display: none; }
.lk-pricing[data-cycle="year"]  .lk-cycle-month { display: none; }
.lk-plan-card {
	position: relative; height: 100%; display: flex; flex-direction: column;
	background: var(--lk-surface); border: 1px solid var(--lk-line); border-radius: var(--lk-radius);
	padding: 1.7rem 1.6rem 1.5rem; box-shadow: var(--lk-shadow);
}
.lk-plan-card.lk-plan-premium { border: 2px solid var(--lk-gold); box-shadow: 0 16px 44px rgba(201, 151, 28, .18); background: linear-gradient(180deg, #fffdf6 0%, var(--lk-surface) 24%); }
.lk-plan-ribbon {
	position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
	background: linear-gradient(135deg, #d9ab2e, var(--lk-gold-deep)); color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.18); font-size: .72rem; font-weight: 700;
	letter-spacing: .07em; text-transform: uppercase; padding: .28rem .9rem; border-radius: 999px; white-space: nowrap;
}
.lk-plan-name { font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; }
.lk-plan-tag  { color: var(--lk-ink-soft); font-size: .87rem; margin: .15rem 0 .9rem; }
.lk-price-row { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; }
.lk-price { font-size: 2.6rem; font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.lk-plan-premium .lk-price { color: var(--lk-gold-deep); }
.lk-price-suffix { color: var(--lk-ink-soft); font-size: .92rem; font-weight: 500; }
.lk-price-incl { color: var(--lk-ink-faint); font-size: .8rem; margin-top: .3rem; }
.lk-price-save { color: var(--lk-green-deep); font-size: .8rem; font-weight: 600; margin-top: .25rem; }
.lk-plan-sep { border-color: var(--lk-line); opacity: 1; margin: 1.1rem 0; }
.lk-plan-footnote { text-align: center; color: var(--lk-ink-faint); font-size: .8rem; margin: 1.2rem 0 .4rem; }

.btn-lok-gold { background: linear-gradient(135deg, #d9ab2e, var(--lk-gold-deep)); border: 1px solid #c79a25; color: #2d2205; font-weight: 600; }
.btn-lok-gold:hover { background: linear-gradient(135deg, #e0b53c, #b08a15); color: #2d2205; }
.lk-badge-premium { background: var(--lk-gold-tint); color: var(--lk-gold-deep); border: 1px solid #ecd9a0; font-weight: 700; }
.lk-hero.lk-hero-gold { background: var(--lk-gold-tint); border-color: #ecd9a0; color: var(--lk-gold-deep); }

/* ---------- legenda stati ---------- */
.lk-legend { display: flex; flex-wrap: wrap; gap: 1.1rem; font-size: .8rem; color: var(--lk-ink-soft); margin-bottom: 1rem; }
.lk-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.lk-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.lk-legend .lk-dot-danger { background: var(--lk-danger); }
.lk-legend .lk-dot-warn   { background: var(--lk-warn); }
.lk-legend .lk-dot-brand  { background: var(--lk-brand); }
.lk-legend .lk-dot-green  { background: var(--lk-green); }

/* ---------- scadenze ---------- */
body.lk-app .lk-deadline { border-left: 4px solid var(--lk-line); }
body.lk-app .lk-deadline.lk-scaduta   { border-left-color: var(--lk-danger); }
body.lk-app .lk-deadline.lk-imminente { border-left-color: var(--lk-warn); }
body.lk-app .lk-deadline.lk-futura    { border-left-color: var(--lk-brand); }
body.lk-app .lk-deadline.lk-adempiuta { border-left-color: var(--lk-green); }
body.lk-app .lk-deadline .fs-5 { font-weight: 700; }
body.lk-app .collapse .bg-light, body.lk-app .collapsing .bg-light { background: var(--lk-brand-tint) !important; border-radius: var(--lk-radius-sm); }
body.lk-app .collapse .bg-light p:last-child { margin-bottom: 0; }
body.lk-app .btn-link { color: var(--lk-brand); font-weight: 600; }

/* elenco compatto scadenze in panoramica */
.lk-next-item { display: flex; align-items: center; gap: .9rem; padding: .7rem 0; border-bottom: 1px solid var(--lk-line); }
.lk-next-item:last-child { border-bottom: none; }
.lk-next-date {
	flex-shrink: 0; width: 3.4rem; text-align: center; border-radius: 12px; padding: .35rem 0;
	font-weight: 700; line-height: 1.05; border: 1px solid var(--lk-line);
}
.lk-next-date .lk-nd-day { font-size: 1.15rem; display: block; }
.lk-next-date .lk-nd-mon { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; display: block; }
.lk-next-date.lk-danger { background: var(--lk-danger-tint); color: var(--lk-danger); border-color: transparent; }
.lk-next-date.lk-warn   { background: var(--lk-warn-tint); color: var(--lk-warn); border-color: transparent; }
.lk-next-date.lk-brand  { background: var(--lk-brand-tint); color: var(--lk-brand); border-color: transparent; }

/* ---------- stato vuoto ---------- */
.lk-empty { text-align: center; padding: 2.6rem 1.5rem; }
.lk-empty .lk-empty-icon {
	width: 64px; height: 64px; margin: 0 auto .9rem; border-radius: 20px;
	background: var(--lk-brand-tint); color: var(--lk-brand);
	display: flex; align-items: center; justify-content: center; font-size: 1.9rem;
}
.lk-empty h5 { margin-bottom: .35rem; }
.lk-empty p { color: var(--lk-ink-soft); max-width: 46ch; margin: 0 auto .9rem; }

/* ---------- passi "come funziona" ---------- */
.lk-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 767.98px) { .lk-steps { grid-template-columns: 1fr; } }
.lk-step-card { background: var(--lk-brand-tint); border-radius: var(--lk-radius-sm); padding: 1rem 1.1rem; }
.lk-step-card .lk-step-n {
	width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--lk-brand); color: #fff;
	font-weight: 700; font-size: .85rem; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .5rem;
}
.lk-step-card b { display: block; margin-bottom: .15rem; }
.lk-step-card p { font-size: .82rem; color: var(--lk-ink-soft); margin: 0; }

/* ---------- badge ---------- */
body.lk-app .badge { font-weight: 600; border-radius: 2rem; padding: .38em .8em; letter-spacing: .01em; }
body.lk-app .badge.bg-danger-subtle    { background: var(--lk-danger-tint) !important; color: var(--lk-danger) !important; }
body.lk-app .badge.bg-warning-subtle   { background: var(--lk-warn-tint) !important;   color: var(--lk-warn) !important; }
body.lk-app .badge.bg-info-subtle      { background: var(--lk-brand-tint) !important;  color: var(--lk-brand) !important; }
body.lk-app .badge.bg-success-subtle   { background: var(--lk-green-tint) !important;  color: var(--lk-green-deep) !important; }
body.lk-app .badge.bg-secondary-subtle { background: #eef0f6 !important; color: var(--lk-ink-soft) !important; }
body.lk-app .text-danger  { color: var(--lk-danger) !important; }
body.lk-app .text-success { color: var(--lk-green-deep) !important; }

/* ---------- bottoni ---------- */
body.lk-app .btn, body.lk-auth .btn { font-weight: 600; border-radius: var(--lk-radius-sm); letter-spacing: .01em; }
body.lk-app .btn-success, body.lk-auth .btn-success { background: var(--lk-green); border-color: var(--lk-green); color: #fff; box-shadow: 0 6px 16px -6px rgba(41,179,83,.55); }
body.lk-app .btn-success:hover, body.lk-auth .btn-success:hover { background: var(--lk-green-deep); border-color: var(--lk-green-deep); color: #fff; }
body.lk-app .btn-primary { background: var(--lk-brand); border-color: var(--lk-brand); color: #fff; box-shadow: 0 6px 16px -6px rgba(59,84,153,.5); }
body.lk-app .btn-primary:hover { background: var(--lk-brand-deep); border-color: var(--lk-brand-deep); color: #fff; }
/* bottoni "soft": base bianca + bordo colorato, così si staccano su qualunque
   sfondo (card bianche E fondo pagina); all'hover si riempiono */
body.lk-app .btn-soft-primary { background: var(--lk-surface); color: var(--lk-brand); border: 1px solid rgba(59,84,153,.35); }
body.lk-app .btn-soft-primary:hover { background: var(--lk-brand); color: #fff; border-color: var(--lk-brand); }
body.lk-app .btn-soft-success { background: var(--lk-surface); color: var(--lk-green-deep); border: 1px solid rgba(41,179,83,.45); }
body.lk-app .btn-soft-success:hover { background: var(--lk-green); color: #fff; border-color: var(--lk-green); }
body.lk-app .btn-light { background: #eaecf3; border-color: #eaecf3; color: var(--lk-ink-soft); }

/* ---------- form ---------- */
body.lk-app .form-control, body.lk-app .form-select, body.lk-auth .form-control, body.lk-auth .form-select {
	border-radius: var(--lk-radius-sm); border-color: var(--lk-line); padding: .55rem .8rem; color: var(--lk-ink);
}
body.lk-app .form-control:focus, body.lk-app .form-select:focus, body.lk-auth .form-control:focus, body.lk-auth .form-select:focus {
	border-color: var(--lk-brand); box-shadow: 0 0 0 .2rem rgba(59,84,153,.12);
}
body.lk-app .form-label, body.lk-auth .form-label { font-weight: 600; color: var(--lk-ink); margin-bottom: .35rem; }
body.lk-app .form-text { color: var(--lk-ink-faint); }
body.lk-app .input-group-text { border-color: var(--lk-line); background: var(--lk-bg); color: var(--lk-ink-soft); }

/* ---------- tabelle ---------- */
body.lk-app .table { color: var(--lk-ink); }
body.lk-app .table thead.table-light th {
	background: var(--lk-bg); color: var(--lk-brand) !important;
	font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; border-bottom: 1px solid var(--lk-line);
}
body.lk-app .table td { border-color: var(--lk-line); padding-top: .8rem; padding-bottom: .8rem; }
body.lk-app .table-hover > tbody > tr:hover > * { background: var(--lk-brand-tint); }

/* ---------- filtri a pillole con contatori ---------- */
body.lk-app .nav-pills { gap: .35rem; }
body.lk-app .nav-pills .nav-link { color: var(--lk-ink-soft); font-weight: 600; border-radius: 2rem; padding: .45rem 1rem; background: var(--lk-surface); border: 1px solid var(--lk-line); }
body.lk-app .nav-pills .nav-link:hover { color: var(--lk-brand); background: var(--lk-brand-tint); border-color: transparent; }
body.lk-app .nav-pills .nav-link.active { background: var(--lk-brand); color: #fff; border-color: var(--lk-brand); box-shadow: 0 6px 16px -6px rgba(59,84,153,.5); }
body.lk-app .nav-pills .nav-link .lk-count { font-weight: 700; opacity: .65; margin-left: .3rem; font-size: .8em; }

/* ---------- wizard ---------- */
body.lk-app .wiz-intro { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
@media (max-width: 767.98px) { body.lk-app .wiz-intro { grid-template-columns: 1fr; } }
body.lk-app .wiz-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; justify-content: center; }
body.lk-app .wiz-pill {
	display: flex; align-items: center; gap: .5rem; padding: .45rem 1rem; border-radius: 2rem;
	background: var(--lk-surface); border: 1px solid var(--lk-line); color: var(--lk-ink-soft);
	font-weight: 600; font-size: .875rem; cursor: default; transition: all .15s ease;
}
body.lk-app .wiz-pill.active { background: var(--lk-brand); border-color: var(--lk-brand); color: #fff; box-shadow: 0 6px 16px -6px rgba(59,84,153,.5); }
body.lk-app .wiz-pill.done { background: var(--lk-green-tint); border-color: transparent; color: var(--lk-green-deep); }
body.lk-app .wiz-pill-num { display: inline-flex; align-items: center; justify-content: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: rgba(0,0,0,.08); font-size: .75rem; font-weight: 700; }
body.lk-app .wiz-pill.active .wiz-pill-num { background: var(--lk-green); color: #fff; }
body.lk-app .wiz-pill.done .wiz-pill-num { background: var(--lk-green); color: #fff; overflow: hidden; text-indent: -9999px; position: relative; }
body.lk-app .wiz-pill.done .wiz-pill-num::before { content: '✓'; text-indent: 0; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .7rem; }
body.lk-app .wiz-progress { height: 6px; border-radius: 3px; background: var(--lk-line); margin-bottom: 1.5rem; overflow: hidden; }
body.lk-app .wiz-progress-bar { height: 100%; background: linear-gradient(90deg, var(--lk-green), #35c765); width: 0; transition: width .3s ease; }
body.lk-app .wiz-step .lk-group-desc { color: var(--lk-ink-soft); margin-bottom: 1.1rem; max-width: 62ch; }

/* ---------- alert ---------- */
body.lk-app .alert { border: none; border-radius: var(--lk-radius-sm); font-weight: 500; }
body.lk-app .alert-warning { background: var(--lk-warn-tint); color: #9c6407; }
body.lk-app .alert-info { background: var(--lk-brand-tint); color: var(--lk-brand-deep); }
body.lk-app .alert-danger { background: var(--lk-danger-tint); color: var(--lk-danger); }
body.lk-app .alert .alert-link { color: inherit; text-decoration: underline; }

/* ---------- link e dettagli ---------- */
/* i link brand valgono solo nel contenuto: nella sidebar (fondo blu) i colori
   li decide la sidebar stessa */
.lk-content a:not(.btn) { color: var(--lk-brand); }
body.lk-app a.link-primary { color: var(--lk-brand) !important; font-weight: 600; text-decoration: none; }
body.lk-app a.link-primary:hover { color: var(--lk-brand-deep) !important; text-decoration: underline; }
body.lk-app .avatar-sm .avatar-title { border-radius: 12px; }

/* ============================================================ AUTH (split) */
body.lk-auth { margin: 0; }
.lk-auth-wrap { display: flex; min-height: 100vh; }
.lk-auth-side {
	flex: 1 1 46%;
	background:
		radial-gradient(46rem 30rem at 118% -10%, rgba(41,179,83,.2), transparent 60%),
		radial-gradient(40rem 26rem at -20% 115%, rgba(70,96,159,.55), transparent 62%),
		linear-gradient(150deg, var(--lk-brand-ink) 0%, var(--lk-brand) 62%, var(--lk-brand-deep) 100%);
	color: #fff; display: flex; flex-direction: column; justify-content: center;
	padding: 3.2rem 3.4rem;
}
/* ogni blocco del pannello ha la stessa larghezza ed è centrato nel riquadro:
   l'insieme risulta centrato, il testo resta leggibile allineato a sinistra */
.lk-auth-side > * { width: 100%; max-width: 34rem; margin-left: auto; margin-right: auto; }
.lk-auth-side .lk-brand { font-size: 2rem; font-weight: 700; letter-spacing: -0.5px; color: #fff; text-decoration: none; }
.lk-auth-side .lk-brand b { color: var(--lk-green); }
body.lk-auth .lk-auth-side .lk-brand img { height: 48px; width: auto; display: block; }
body.lk-auth .lk-auth-side h2 { color: #fff; font-size: 2.15rem; line-height: 1.2; margin: 1.8rem auto .7rem; max-width: 34rem; }
.lk-auth-side .lk-auth-sub { color: rgba(255,255,255,.68); font-size: 1.08rem; line-height: 1.55; margin-bottom: 2.2rem; }
.lk-auth-benefits { display: flex; flex-direction: column; gap: 1.25rem; }
.lk-auth-benefit { display: flex; gap: 1rem; align-items: flex-start; }
.lk-auth-benefit i {
	flex-shrink: 0; width: 2.7rem; height: 2.7rem; border-radius: 13px;
	background: rgba(41,179,83,.18); color: var(--lk-green);
	display: flex; align-items: center; justify-content: center; font-size: 1.35rem;
}
.lk-auth-benefit b { display: block; font-size: 1.05rem; }
.lk-auth-benefit p { margin: .1rem 0 0; font-size: .95rem; line-height: 1.45; color: rgba(255,255,255,.6); max-width: 44ch; }
.lk-auth-foot { margin-top: 2.6rem; font-size: .88rem; color: rgba(255,255,255,.45); }

.lk-auth-form {
	flex: 1 1 54%; background: var(--lk-bg);
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 2.5rem 1.5rem;
}
.lk-auth-card { width: 100%; max-width: 460px; background: var(--lk-surface); border-radius: 20px; box-shadow: var(--lk-shadow-lift); padding: 2.2rem; }
.lk-auth-card h5 { font-size: 1.3rem; margin-bottom: .25rem; }
.lk-auth-card .lk-auth-lead { color: var(--lk-ink-soft); margin-bottom: 1.4rem; }
.lk-auth-switch { margin-top: 1.3rem; text-align: center; color: var(--lk-ink-soft); font-size: .9rem; }
.lk-auth-switch a { color: var(--lk-brand); font-weight: 700; text-decoration: none; }

@media (max-width: 991.98px) {
	.lk-auth-wrap { flex-direction: column; }
	.lk-auth-side { padding: 2rem 1.5rem; flex: none; }
	body.lk-auth .lk-auth-side h2 { font-size: 1.55rem; margin-top: 1rem; }
	.lk-auth-benefits { display: none; }
	.lk-auth-foot { display: none; margin-top: 1rem; }
}

/* ---------- checklist di conformità ---------- */
.lk-check-item { display: flex; align-items: center; gap: .9rem; padding: .8rem 0; border-bottom: 1px solid var(--lk-line); }
.lk-check-item:last-child { border-bottom: none; }
.lk-check-icon { font-size: 1.35rem; flex-shrink: 0; }
.lk-check-item.lk-ok .lk-check-icon    { color: var(--lk-green); }
.lk-check-item.lk-soon .lk-check-icon  { color: var(--lk-warn); }
.lk-check-item.lk-nodoc .lk-check-icon { color: var(--lk-warn); }
.lk-check-item.lk-late .lk-check-icon  { color: var(--lk-danger); }
.lk-check-title { font-weight: 600; }
.lk-check-detail { font-size: .83rem; color: var(--lk-ink-soft); }
.lk-check-item.lk-late .lk-check-detail { color: var(--lk-danger); font-weight: 500; }
.q-help { cursor: help; display: inline-block; vertical-align: middle; }

/* ---------- link legali in sidebar + pagine legali ---------- */
.lk-side-legal { margin-top: .6rem; padding: 0 .55rem; font-size: .72rem; }
.lk-sidebar .lk-side-legal a { color: rgba(255,255,255,.45); text-decoration: none; }
.lk-sidebar .lk-side-legal a:hover { color: rgba(255,255,255,.8); text-decoration: underline; }
.lk-legal-wrap { max-width: 860px; margin: 0 auto; padding: 2rem 1.2rem 1rem; }
.lk-legal-head img { height: 36px; margin-bottom: 1.2rem; }
.lk-legal-body h1 { font-size: 1.6rem; margin-bottom: .3rem; }
.lk-legal-body h2 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; color: var(--lk-brand); }
.lk-legal-body p { color: var(--lk-ink-soft); line-height: 1.65; }
.lk-legal-wrap .lk-footer a { color: var(--lk-ink-faint); }

/* ---------- calendario mensile ---------- */
.lk-cal-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--lk-ink-faint); text-align: center; margin-bottom: 4px; }
.lk-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.lk-cal-cell { min-height: 86px; border: 1px solid var(--lk-line); border-radius: 10px; padding: .3rem .4rem; background: var(--lk-surface); }
.lk-cal-empty { background: transparent; border-style: dashed; opacity: .45; }
.lk-cal-today { border-color: var(--lk-brand); box-shadow: inset 0 0 0 1px var(--lk-brand); }
.lk-cal-day { font-size: .78rem; font-weight: 700; color: var(--lk-ink-soft); margin-bottom: .2rem; }
.lk-cal-today .lk-cal-day { color: var(--lk-brand); }
.lk-cal-evt { display: block; font-size: .68rem; line-height: 1.25; padding: .12rem .35rem; border-radius: 6px; margin-bottom: 2px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-cal-evt.lk-cal-danger  { background: var(--lk-danger-tint); color: var(--lk-danger); }
.lk-cal-evt.lk-cal-warning { background: var(--lk-warn-tint); color: var(--lk-warn); }
.lk-cal-evt.lk-cal-brand   { background: var(--lk-brand-tint); color: var(--lk-brand); }
.lk-cal-evt.lk-cal-success { background: var(--lk-green-tint); color: var(--lk-green-deep); }
.lk-cal-evt.lk-cal-green   { background: var(--lk-green-tint); color: var(--lk-green-deep); }
@media (max-width: 767.98px) { .lk-cal-cell { min-height: 56px; } .lk-cal-evt { font-size: .6rem; } }

/* ---------- recensioni: stelle ---------- */
.lk-stars { color: #e2a90c; letter-spacing: .05em; }
.lk-rate { display: inline-flex; flex-direction: row-reverse; gap: .2rem; font-size: 1.8rem; }
.lk-rate input { display: none; }
.lk-rate label { color: #d8dbe6; cursor: pointer; transition: color .1s ease; }
.lk-rate input:checked ~ label, .lk-rate label:hover, .lk-rate label:hover ~ label { color: #e2a90c; }

/* documento obbligatorio: il badge si deve notare tra le righe */
.lk-doc-required { border: 1px solid #f3c2c2; font-weight: 700; }
