/* Uannabi Client Portal — brand: pink #F21F4A, orange #f85808, yellow #f8d808,
   purple #5808ce, cream #fff3ec. Titles: Plus Jakarta Sans. Body: DM Sans. */

.ucp-portal {
	--ucp-pink: #F21F4A;
	--ucp-orange: #f85808;
	--ucp-yellow: #f8d808;
	--ucp-purple: #5808ce;
	--ucp-cream: #fff3ec;
	--ucp-ink: #241f21;
	--ucp-muted: #8a7f82;
	--ucp-radius: 14px;
	font-family: 'DM Sans', system-ui, sans-serif;
	color: var(--ucp-ink);
	max-width: 1040px;
	margin: 0 auto;
}
.ucp-portal h2, .ucp-portal h3, .ucp-portal h4, .ucp-portal strong,
.ucp-tab, .ucp-btn, .ucp-card-num {
	font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* Header */
.ucp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.ucp-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ucp-pink); }
.ucp-title { margin: 4px 0 0; font-size: 28px; font-weight: 800; }
.ucp-logout { font-size: 14px; color: var(--ucp-muted); text-decoration: none; }
.ucp-logout:hover { color: var(--ucp-pink); }

/* Tabs */
.ucp-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.ucp-tab {
	padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 700;
	text-decoration: none; color: var(--ucp-ink); background: var(--ucp-cream);
	transition: background .15s, color .15s;
}
.ucp-tab:hover { background: #ffe4d6; color: var(--ucp-ink); }
.ucp-tab.is-active { background: var(--ucp-pink); color: #fff; }
.ucp-badge {
	display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px;
	background: var(--ucp-yellow); color: var(--ucp-ink); font-size: 12px; text-align: center;
}

/* Cards */
.ucp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.ucp-card {
	display: flex; flex-direction: column; gap: 4px; padding: 20px;
	background: var(--ucp-cream); border-radius: var(--ucp-radius);
	text-decoration: none; color: var(--ucp-ink); transition: transform .15s;
}
.ucp-card:hover { transform: translateY(-2px); }
.ucp-card.is-alert { background: var(--ucp-pink); color: #fff; }
.ucp-card-num { font-size: 36px; font-weight: 800; line-height: 1; }
.ucp-card-label { font-size: 14px; opacity: .85; }

/* Alert box */
.ucp-alertbox {
	background: #fff; border: 2px solid var(--ucp-yellow); border-radius: var(--ucp-radius);
	padding: 14px 18px; margin-bottom: 24px; font-size: 14px;
}
.ucp-alertbox a { color: var(--ucp-pink); font-weight: 700; text-decoration: none; }

/* Items / list */
.ucp-h3 { font-size: 18px; font-weight: 800; margin: 24px 0 12px; }
.ucp-item {
	display: block; background: #fff; border: 1px solid #f0e4dc; border-radius: var(--ucp-radius);
	padding: 16px 18px; margin-bottom: 10px;
}
.ucp-item-link { text-decoration: none; color: var(--ucp-ink); transition: border-color .15s; }
.ucp-item-link:hover { border-color: var(--ucp-pink); }
.ucp-item-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ucp-item-body { font-size: 14px; margin-top: 8px; }
.ucp-muted { color: var(--ucp-muted); font-size: 13px; }
.ucp-back { font-size: 14px; font-weight: 700; color: var(--ucp-pink); text-decoration: none; }

/* Pills (stati) */
.ucp-pill { padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ucp-pill--aperto        { background: var(--ucp-yellow); }
.ucp-pill--in_lavorazione{ background: var(--ucp-purple); color: #fff; }
.ucp-pill--in_attesa     { background: var(--ucp-orange); color: #fff; }
.ucp-pill--risolto       { background: #d7f0d7; color: #1d6b1d; }
.ucp-pill--pending       { background: var(--ucp-yellow); }
.ucp-pill--approved,
.ucp-pill--auto          { background: #d7f0d7; color: #1d6b1d; }
.ucp-pill--changes       { background: var(--ucp-orange); color: #fff; }

/* Split layout ticket */
.ucp-split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; }
@media (max-width: 820px) { .ucp-split { grid-template-columns: 1fr; } }
.ucp-panel { background: var(--ucp-cream); border-radius: var(--ucp-radius); padding: 20px; align-self: start; }

/* Forms */
.ucp-form label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.ucp-form input, .ucp-form select, .ucp-form textarea {
	display: block; width: 100%; margin-top: 5px; padding: 10px 12px;
	border: 1px solid #e5d5cb; border-radius: 10px; font: inherit; background: #fff;
}
.ucp-form input:focus, .ucp-form select:focus, .ucp-form textarea:focus {
	outline: 2px solid var(--ucp-pink); border-color: transparent;
}
.ucp-btn {
	background: var(--ucp-pink); color: #fff; border: 0; border-radius: 10px;
	padding: 11px 22px; font-size: 14px; font-weight: 800; cursor: pointer;
	transition: filter .15s;
}
.ucp-btn:hover { filter: brightness(.92); }
.ucp-btn--ghost { background: transparent; color: var(--ucp-ink); border: 2px solid var(--ucp-ink); }
.ucp-feedback { font-size: 14px; font-weight: 700; margin-top: 10px; }
.ucp-feedback.is-ok { color: #1d6b1d; }
.ucp-feedback.is-err { color: var(--ucp-pink); }

/* Thread ticket */
.ucp-thread { margin: 18px 0; }
.ucp-msg { border-radius: var(--ucp-radius); padding: 14px 18px; margin-bottom: 10px; font-size: 14px; max-width: 85%; }
.ucp-msg--client { background: var(--ucp-cream); }
.ucp-msg--team { background: #f1eafd; margin-left: auto; }
.ucp-msg-meta { font-size: 12px; color: var(--ucp-muted); margin-bottom: 6px; font-weight: 700; }
.ucp-attachment { color: var(--ucp-purple); font-weight: 700; text-decoration: none; }

/* Kanban */
.ucp-kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
@media (max-width: 820px) { .ucp-kanban { grid-template-columns: 1fr; } }
.ucp-col { background: var(--ucp-cream); border-radius: var(--ucp-radius); padding: 12px; }
.ucp-col-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin: 4px 4px 12px; }
.ucp-col--da_fare    { color: var(--ucp-orange); }
.ucp-col--in_corso   { color: var(--ucp-purple); }
.ucp-col--completato { color: #1d6b1d; }
.ucp-taskcard { background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; font-size: 14px; }
.ucp-taskcard p { margin: 6px 0; color: var(--ucp-muted); font-size: 13px; }

/* Progress bar */
.ucp-progress { height: 8px; background: #f0e4dc; border-radius: 999px; margin: 10px 0 6px; overflow: hidden; }
.ucp-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--ucp-pink), var(--ucp-orange)); border-radius: 999px; }

/* Timeline */
.ucp-timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--ucp-cream); }
.ucp-timeline li { position: relative; padding: 6px 0 6px 20px; font-size: 14px; }
.ucp-timeline li::before {
	content: ''; position: absolute; left: -8px; top: 12px; width: 12px; height: 12px;
	border-radius: 50%; background: var(--ucp-yellow); border: 2px solid #fff;
}
.ucp-timeline li.is-done { color: var(--ucp-muted); text-decoration: line-through; }
.ucp-timeline li.is-done::before { background: #1d6b1d; }
.ucp-timeline-date { display: inline-block; min-width: 52px; font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif; }

/* Countdown / approvals */
.ucp-countdown { font-weight: 800; color: var(--ucp-orange); font-size: 14px; }
.ucp-countdown.is-late { color: var(--ucp-pink); }
.ucp-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

/* Events */
.ucp-events { list-style: none; padding: 0; margin: 0; }
.ucp-events li {
	display: flex; gap: 16px; align-items: flex-start; background: #fff;
	border: 1px solid #f0e4dc; border-radius: var(--ucp-radius); padding: 14px 18px; margin-bottom: 10px;
}
.ucp-event-date {
	display: flex; flex-direction: column; align-items: center; min-width: 64px;
	background: var(--ucp-cream); border-radius: 10px; padding: 8px 10px;
	font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px;
}
.ucp-event-date em { font-style: normal; font-size: 12px; color: var(--ucp-muted); }

/* Documents */
.ucp-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ucp-doc {
	display: flex; gap: 12px; align-items: center; background: #fff;
	border: 1px solid #f0e4dc; border-radius: var(--ucp-radius); padding: 14px 16px;
	text-decoration: none; color: var(--ucp-ink); transition: border-color .15s;
}
.ucp-doc:hover { border-color: var(--ucp-purple); }
.ucp-doc-icon { font-size: 24px; }
.ucp-doc em { display: block; font-style: normal; font-size: 12px; color: var(--ucp-muted); }

/* Login */
.ucp-login { max-width: 420px; }
.ucp-login .login-username, .ucp-login .login-password { margin-bottom: 14px; }
.ucp-login label { font-size: 13px; font-weight: 700; }
.ucp-login input[type="text"], .ucp-login input[type="password"] {
	display: block; width: 100%; margin-top: 5px; padding: 11px 12px;
	border: 1px solid #e5d5cb; border-radius: 10px; font: inherit;
}
.ucp-login .button-primary {
	background: var(--ucp-pink); border: 0; border-radius: 10px; padding: 11px 22px;
	font-weight: 800; color: #fff; cursor: pointer; font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Report KPI */
.ucp-report {
	position: relative; width: 100%; aspect-ratio: 4 / 3;
	background: var(--ucp-cream); border-radius: var(--ucp-radius); overflow: hidden;
}
@media (min-width: 821px) { .ucp-report { aspect-ratio: 16 / 10; } }
.ucp-report iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Knowledge base */
.ucp-kb-cat {
	font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
	color: var(--ucp-purple); margin: 22px 0 10px;
	font-family: 'Plus Jakarta Sans', sans-serif;
}
.ucp-kb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.ucp-kb-item {
	display: block; background: #fff; border: 1px solid #f0e4dc; border-radius: 12px;
	padding: 13px 16px; font-size: 14px; font-weight: 700; text-decoration: none;
	color: var(--ucp-ink); transition: border-color .15s, transform .15s;
}
.ucp-kb-item:hover { border-color: var(--ucp-pink); transform: translateY(-1px); }
.ucp-kb-article { font-size: 15px; line-height: 1.65; }
.ucp-kb-article strong { color: var(--ucp-pink); }

/* ===== v1.2 ===== */

/* Onboarding */
.ucp-onb { list-style: none; padding: 0; margin: 16px 0 0; counter-reset: none; }
.ucp-onb li {
	display: flex; gap: 14px; align-items: flex-start; background: #fff;
	border: 1px solid #f0e4dc; border-radius: var(--ucp-radius);
	padding: 14px 18px; margin-bottom: 8px; font-size: 14px;
}
.ucp-onb li.is-done { opacity: .65; }
.ucp-onb li.is-done > div > strong { text-decoration: line-through; }
.ucp-onb-check {
	flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--ucp-cream); font-weight: 800; color: var(--ucp-muted);
}
.ucp-onb li.is-done .ucp-onb-check { background: #d7f0d7; color: #1d6b1d; }

/* Stock */
.ucp-pill--stock-attiva  { background: var(--ucp-yellow); }
.ucp-pill--stock-gestita { background: var(--ucp-purple); color: #fff; }
.ucp-pill--stock-risolta { background: #d7f0d7; color: #1d6b1d; }

/* Campagne */
.ucp-campaign { border-left: 4px solid var(--ucp-pink); }
.ucp-slots { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 10px; }
.ucp-slot-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ucp-slot-row input { width: auto; margin-top: 0; }
.ucp-slot-row input[type="date"] { flex: 1 1 140px; }
.ucp-slot-row input[type="time"] { flex: 0 1 110px; }
.ucp-slot-remove {
	background: none; border: 0; cursor: pointer; color: var(--ucp-muted);
	font-size: 16px; padding: 4px 8px;
}
.ucp-slot-remove:hover { color: var(--ucp-pink); }
.ucp-slot-add { padding: 8px 14px; font-size: 13px; }
.ucp-slot-summary { list-style: none; padding: 0; margin: 4px 0 0; font-size: 14px; }
.ucp-slot-summary li { padding: 3px 0; }

/* PED */
.ucp-ped-current { border: 2px solid var(--ucp-pink); background: #fff; }
.ucp-pill--ped-in_approvazione { background: var(--ucp-yellow); }
.ucp-pill--ped-bloccato        { background: #d7f0d7; color: #1d6b1d; }
.ucp-pill--ped-superato        { background: #eee; color: var(--ucp-muted); }

/* FAQ accordion */
.ucp-faq {
	background: #fff; border: 1px solid #f0e4dc; border-radius: 12px;
	margin-bottom: 8px; overflow: hidden;
}
.ucp-faq summary {
	cursor: pointer; padding: 14px 18px; font-weight: 700; font-size: 14px;
	font-family: 'Plus Jakarta Sans', sans-serif; list-style: none; position: relative;
}
.ucp-faq summary::-webkit-details-marker { display: none; }
.ucp-faq summary::after {
	content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
	color: var(--ucp-pink); font-size: 18px; font-weight: 800;
}
.ucp-faq[open] summary::after { content: '−'; }
.ucp-faq[open] summary { border-bottom: 1px solid #f0e4dc; }
.ucp-faq-body { padding: 12px 18px 16px; font-size: 14px; line-height: 1.6; }

/* ===== v1.3 ===== */

/* Trend radar */
.ucp-trend { border-left: 4px solid var(--ucp-orange); }
.ucp-pill--trend { background: var(--ucp-orange); color: #fff; }
.ucp-trend-action {
	background: var(--ucp-cream); border-radius: 10px; padding: 10px 14px;
	font-size: 14px; margin-top: 8px;
}

/* Assistente AI */
.ucp-ai-fab {
	position: fixed; right: 20px; bottom: 20px; z-index: 9998;
	width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--ucp-pink); color: #fff; font-size: 24px;
	box-shadow: 0 6px 20px rgba(242, 31, 74, .4);
	transition: transform .15s;
}
.ucp-ai-fab:hover { transform: scale(1.06); }
.ucp-ai-panel {
	position: fixed; right: 20px; bottom: 90px; z-index: 9999;
	width: min(380px, calc(100vw - 32px)); height: min(520px, calc(100vh - 120px));
	background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(36, 31, 33, .25);
	display: flex; flex-direction: column; overflow: hidden;
	font-family: 'DM Sans', system-ui, sans-serif;
}
.ucp-ai-head {
	background: var(--ucp-pink); color: #fff; padding: 14px 18px;
	display: flex; align-items: center; justify-content: space-between;
	font-family: 'Plus Jakarta Sans', sans-serif;
}
.ucp-ai-head button { background: none; border: 0; color: #fff; font-size: 16px; cursor: pointer; }
.ucp-ai-body { flex: 1; overflow-y: auto; padding: 14px; background: var(--ucp-cream); }
.ucp-ai-msg {
	max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14px;
	line-height: 1.5; margin-bottom: 8px; white-space: pre-wrap; word-wrap: break-word;
}
.ucp-ai-msg--bot { background: #fff; border-bottom-left-radius: 4px; }
.ucp-ai-msg--user { background: var(--ucp-purple); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.ucp-ai-msg.is-typing { color: var(--ucp-muted); }
.ucp-ai-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #f0e4dc; }
.ucp-ai-form input {
	flex: 1; padding: 10px 14px; border: 1px solid #e5d5cb; border-radius: 999px;
	font: inherit; font-size: 14px;
}
.ucp-ai-form input:focus { outline: 2px solid var(--ucp-pink); border-color: transparent; }
.ucp-ai-form .ucp-btn { border-radius: 999px; padding: 10px 16px; }
.ucp-ai-foot {
	margin: 0; padding: 8px 14px 12px; font-size: 12px; color: var(--ucp-muted); text-align: center;
}
.ucp-ai-foot a { color: var(--ucp-pink); font-weight: 700; text-decoration: none; }

@media (max-width: 480px) {
	.ucp-ai-panel { right: 8px; bottom: 84px; }
}

/* ===== v1.4 ===== */

/* Branding cliente */
.ucp-brand { display: flex; gap: 18px; align-items: center; }
.ucp-brand-logo {
	width: 72px; height: 72px; object-fit: contain; border-radius: 16px;
	background: #fff; border: 1px solid #f0e4dc; padding: 8px;
}
.ucp-brand-desc { margin: 4px 0 0; font-size: 14px; color: var(--ucp-muted); }
.ucp-brand-site { font-size: 13px; font-weight: 700; color: var(--ucp-purple); text-decoration: none; }

/* iCal */
.ucp-ical {
	background: var(--ucp-cream); border-radius: var(--ucp-radius);
	padding: 14px 18px; margin-bottom: 16px; font-size: 14px; line-height: 1.7;
}
.ucp-ical-url {
	display: inline-block; background: #fff; border-radius: 8px; padding: 4px 10px;
	font-size: 12px; word-break: break-all; margin: 6px 8px 0 0;
}

/* Regia live */
.ucp-regia-phase { margin-top: 12px; }
.ucp-regia-checks { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.ucp-regia-check {
	display: flex; gap: 10px; align-items: center; background: #fff;
	border: 1px solid #f0e4dc; border-radius: 12px; padding: 12px 16px;
	font-size: 14px; cursor: pointer;
}
.ucp-regia-check input { width: 18px; height: 18px; accent-color: var(--ucp-pink); }
.ucp-regia-timer {
	font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(64px, 18vw, 120px);
	font-weight: 800; text-align: center; letter-spacing: .02em; line-height: 1;
	margin: 20px 0 4px; color: var(--ucp-ink); font-variant-numeric: tabular-nums;
}
.ucp-regia-timer.is-target { color: #1d6b1d; }
.ucp-regia-target { text-align: center; color: var(--ucp-muted); font-size: 14px; margin: 0 0 16px; }
.ucp-regia-alert {
	background: var(--ucp-yellow); border-radius: var(--ucp-radius);
	padding: 16px 20px; font-size: 16px; font-weight: 800; text-align: center;
	font-family: 'Plus Jakarta Sans', sans-serif; margin-bottom: 14px;
	animation: ucp-flash .6s ease 4;
}
@keyframes ucp-flash { 50% { background: var(--ucp-orange); color: #fff; } }
.ucp-regia .ucp-regia-actions,
.ucp-regia-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.ucp-regia-actions .ucp-btn { font-size: 16px; padding: 16px 26px; }
.ucp-regia-stop { display: block; margin: 20px auto 0; background: var(--ucp-ink); }
.ucp-regia-summarybox {
	background: var(--ucp-cream); border-radius: var(--ucp-radius);
	padding: 14px 18px; font-size: 15px; font-weight: 700;
}

/* Osservatorio */
.ucp-obs { border-left: 4px solid var(--ucp-purple); }
.ucp-obs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 12px 0; }
.ucp-obs-stat {
	background: var(--ucp-cream); border-radius: 12px; padding: 14px;
	display: flex; flex-direction: column; gap: 2px; text-align: center;
}
.ucp-obs-num { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 26px; font-weight: 800; color: var(--ucp-purple); }
.ucp-obs-lbl { font-size: 12px; color: var(--ucp-muted); }

/* Calcolatore */
.ucp-calc-params { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.ucp-calc-params label {
	font-size: 13px; font-weight: 700; display: flex; flex-direction: column; gap: 5px;
}
.ucp-calc-params input {
	width: 130px; padding: 9px 12px; border: 1px solid #e5d5cb; border-radius: 10px; font: inherit;
}
.ucp-calc-tablewrap { overflow-x: auto; background: #fff; border: 1px solid #f0e4dc; border-radius: var(--ucp-radius); }
.ucp-calc-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.ucp-calc-table th {
	font-family: 'Plus Jakarta Sans', sans-serif; font-size: 12px; text-transform: uppercase;
	letter-spacing: .04em; text-align: left; padding: 12px 10px; background: var(--ucp-cream);
}
.ucp-calc-table td { padding: 8px 10px; border-top: 1px solid #f5ebe4; white-space: nowrap; }
.ucp-calc-table input { width: 100%; min-width: 70px; padding: 7px 9px; border: 1px solid #e5d5cb; border-radius: 8px; font: inherit; }
.ucp-calc-table .c-name { min-width: 130px; }
.ucp-calc-table tfoot td { font-weight: 800; background: var(--ucp-cream); }
.c-margin.is-pos, [data-t="margin"].is-pos { color: #1d6b1d; font-weight: 800; }
.c-margin.is-warn { color: var(--ucp-orange); font-weight: 800; }
.c-margin.is-neg, [data-t="margin"].is-neg { color: var(--ucp-pink); font-weight: 800; }

/* ===== v1.5 ===== */

/* Navigazione a gruppi */
.ucp-nav { position: relative; z-index: 50; }
.ucp-navgroup { position: relative; }
.ucp-navgroup-btn { border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ucp-caret { font-size: 10px; opacity: .7; transition: transform .15s; }
.ucp-navgroup.is-open .ucp-caret,
.ucp-navgroup:hover .ucp-caret { transform: rotate(180deg); }
.ucp-navdrop {
	position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px;
	background: #fff; border: 1px solid #f0e4dc; border-radius: 14px;
	box-shadow: 0 10px 30px rgba(36, 31, 33, .12); padding: 8px;
	display: none; flex-direction: column; gap: 2px;
}
.ucp-navgroup.is-open .ucp-navdrop { display: flex; }
@media (hover: hover) and (min-width: 821px) {
	.ucp-navgroup:hover .ucp-navdrop { display: flex; }
}
.ucp-navitem {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 9px 14px; border-radius: 10px; font-size: 14px; font-weight: 700;
	color: var(--ucp-ink); text-decoration: none;
	font-family: 'Plus Jakarta Sans', sans-serif;
}
.ucp-navitem:hover { background: var(--ucp-cream); color: var(--ucp-ink); }
.ucp-navitem.is-active { background: var(--ucp-pink); color: #fff; }
@media (max-width: 820px) {
	.ucp-navdrop { position: static; box-shadow: none; border: 0; background: var(--ucp-cream); margin-top: 6px; width: 100%; }
	.ucp-navgroup { width: 100%; }
	.ucp-navgroup-btn { width: 100%; justify-content: space-between; }
	.ucp-nav { flex-direction: column; align-items: stretch; }
	.ucp-nav > .ucp-tab { text-align: center; }
}

/* Report performance */
.ucp-perf-mini { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; font-size: 14px; }
.ucp-perf-table td:first-child { white-space: normal; }
.ucp-delta {
	display: inline-block; padding: 3px 10px; border-radius: 999px;
	font-size: 12px; font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif;
}
.ucp-delta--good    { background: #d7f0d7; color: #1d6b1d; }
.ucp-delta--bad     { background: #fde0e6; color: #c01038; }
.ucp-delta--neutral { background: #eee; color: #666; }
.ucp-delta--na      { color: var(--ucp-muted); }

/* Stampa: solo il report */
@media print {
	body * { visibility: hidden; }
	.ucp-report-single, .ucp-report-single * { visibility: visible; }
	.ucp-report-single { position: absolute; left: 0; top: 0; width: 100%; }
	.ucp-noprint, .ucp-ai-fab, .ucp-ai-panel { display: none !important; }
	.ucp-calc-tablewrap { border: 1px solid #ccc; }
	.ucp-delta--good { color: #1d6b1d !important; }
	.ucp-delta--bad { color: #c01038 !important; }
}

/* ===== v1.7 ===== */

/* Registro decisioni */
.ucp-decisions .ucp-dec-body { flex: 1; }
.ucp-decisions li { display: flex; gap: 12px; align-items: flex-start; }

/* Moodboard */
.ucp-mood-fields { display: grid; grid-template-columns: 2fr 2fr 1fr auto; gap: 8px; align-items: center; }
@media (max-width: 820px) { .ucp-mood-fields { grid-template-columns: 1fr; } }
.ucp-mood-fields input { margin-top: 0; }
.ucp-mood-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.ucp-mood-item {
	display: flex; flex-direction: column; background: #fff; border: 1px solid #f0e4dc;
	border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--ucp-ink);
	transition: transform .15s, border-color .15s;
}
.ucp-mood-item:hover { transform: translateY(-2px); border-color: var(--ucp-pink); }
.ucp-mood-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.ucp-mood-linkicon {
	display: flex; align-items: center; justify-content: center;
	aspect-ratio: 1; font-size: 40px; background: var(--ucp-cream);
}
.ucp-mood-caption { padding: 9px 12px; font-size: 12px; font-weight: 700; }
.ucp-mood-caption em { font-style: normal; color: var(--ucp-muted); font-weight: 400; }

/* Piano organico */
.ucp-organic.is-published { opacity: .6; }
.ucp-pill--org-idea        { background: #eee; color: #666; }
.ucp-pill--org-programmato { background: var(--ucp-yellow); }
.ucp-pill--org-pubblicato  { background: #d7f0d7; color: #1d6b1d; }

/* ===== v1.8 ===== */

/* Header tools: presidio + ricerca */
.ucp-head-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ucp-presence { font-size: 12px; font-weight: 700; background: #fff; border: 1px solid #f0e4dc;
	border-radius: 999px; padding: 6px 12px; color: var(--ucp-muted); white-space: nowrap; }
.ucp-presence.is-open { color: #1d6b1d; border-color: #d7f0d7; background: #f2fbf2; }
.ucp-headsearch input { border: 1px solid #f0e4dc; border-radius: 999px; padding: 8px 16px;
	font: inherit; font-size: 13px; width: 140px; background: #fff; transition: width .2s; }
.ucp-headsearch input:focus { width: 200px; outline: 2px solid var(--ucp-pink); border-color: transparent; }
@media (max-width: 700px) { .ucp-presence { display: none; } }

/* Preferiti */
.ucp-tab--fav { background: var(--ucp-yellow); }
.ucp-navitem-row { display: flex; align-items: center; }
.ucp-navitem-row .ucp-navitem { flex: 1; }
.ucp-fav-toggle { background: none; border: 0; cursor: pointer; font-size: 15px; color: #e0d2c8;
	padding: 4px 10px 4px 2px; line-height: 1; }
.ucp-fav-toggle:hover { color: var(--ucp-yellow); }
.ucp-fav-toggle.is-fav { color: #f8d808; text-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* Quick actions */
.ucp-qa-fab { position: fixed; bottom: 24px; right: 92px; width: 56px; height: 56px; border-radius: 50%;
	background: var(--ucp-ink); color: #fff; border: 0; font-size: 26px; cursor: pointer; z-index: 999;
	box-shadow: 0 6px 22px rgba(36,31,33,.28); transition: transform .2s; }
.ucp-qa-fab.is-open { transform: rotate(45deg); }
.ucp-qa-menu { position: fixed; bottom: 92px; right: 92px; background: #fff; border-radius: 16px;
	box-shadow: 0 10px 36px rgba(36,31,33,.2); z-index: 999; overflow: hidden; min-width: 230px; }
.ucp-qa-item { display: block; padding: 13px 18px; text-decoration: none; color: var(--ucp-ink);
	font-weight: 700; font-size: 14px; border-bottom: 1px solid #f7ede6; }
.ucp-qa-item:last-child { border-bottom: 0; }
.ucp-qa-item:hover { background: var(--ucp-cream); }
@media (max-width: 700px) { .ucp-qa-fab { right: 84px; bottom: 20px; } .ucp-qa-menu { right: 20px; bottom: 84px; } }

/* Ricerca risultati */
.ucp-item-link { display: block; text-decoration: none; color: var(--ucp-ink); transition: border-color .15s; }
.ucp-item-link:hover { border-color: var(--ucp-pink); }

/* Commenti */
.ucp-comments { margin-top: 12px; border-top: 1px dashed #f0e4dc; padding-top: 10px; }
.ucp-comments summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ucp-muted); }
.ucp-comments-body { padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.ucp-comments .ucp-comment-form textarea { min-height: 54px; }

/* Appuntamenti */
.ucp-book-slots { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.ucp-slot-btn { background: #fff; border: 1px solid #f0e4dc; border-radius: 10px; padding: 9px 14px;
	font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ucp-slot-btn:hover { border-color: var(--ucp-pink); }
.ucp-slot-btn.is-sel { background: var(--ucp-pink); color: #fff; border-color: var(--ucp-pink); }

/* Fatture */
.ucp-pill--inv-pagata    { background: #d7f0d7; color: #1d6b1d; }
.ucp-pill--inv-da_pagare { background: var(--ucp-yellow); }
.ucp-pill--inv-scaduta   { background: #fde3e3; color: #b02020; }


/* ===== v1.9 ===== */

/* Brief del giorno */
.ucp-brief { background: #fff; border: 1px solid #f0e4dc; border-radius: 18px; padding: 18px 22px; margin-bottom: 18px; }
.ucp-brief.is-matchday { background: var(--ucp-ink); border-color: var(--ucp-ink); color: #fff; }
.ucp-brief.is-matchday .ucp-brief-title { color: #fff; }
.ucp-brief.is-matchday a { color: #fff; }
.ucp-brief-title { font-family: var(--ucp-font-title); font-size: 16px; font-weight: 800; margin: 0 0 6px; }
.ucp-brief-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.ucp-brief-list li { display: flex; gap: 9px; align-items: baseline; font-size: 14px; }
.ucp-brief-list a { color: inherit; text-decoration: none; }
.ucp-brief-list a:hover { text-decoration: underline; }

/* Libreria script d'asta */
.ucp-auction-lib { margin-top: 14px; }
