/* Integrazioni dell'area reale rispetto alla demo */
body{background:#141414}
.kc-auth-body{min-height:100dvh;font-family:Sora,system-ui,sans-serif;color:#F2F2F2}
.kc-auth{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:32px;padding:40px 16px}
.kc-auth-card{width:min(440px,100%);background:#202020;border:1px solid #343434;border-radius:4px;padding:36px 32px}
.kc-auth-card h1{font-family:Michroma,Sora,sans-serif;font-weight:400;text-transform:uppercase;font-size:1.25rem;line-height:1.3;margin:0 0 12px}
.kc-auth-card label{display:flex;flex-direction:column;gap:8px;font-size:13px;color:#A6A6A6}
.kc-auth-card .check-label{flex-direction:row}
.kc-auth-card input[type=email],.kc-auth-card input[type=password],.kc-auth-card input:not([type]){background:#141414;border:1px solid #767676;border-radius:4px;color:#F2F2F2;padding:12px 14px;font:inherit;font-size:14px}
.kc-auth-card input:focus-visible{outline:2px solid #C2F05A;outline-offset:1px}
.kc-auth-card a{color:#F2F2F2}
.kc-auth-switch{margin:24px 0 0;font-size:12px;color:#A6A6A6;text-align:center}
.kc-alert,.kc-notice{margin:16px 0 0;padding:12px 14px;border-radius:4px;font-size:13px;line-height:1.5}
.kc-alert{border:1px solid #8a4b4b;background:#2a1d1d;color:#f2d6d6}
.kc-notice{border:1px solid #343434;background:#292929;color:#F2F2F2}
.dashboard-shell .kc-system{font-size:11px}
.dashboard-shell .kc-date{color:#8A8A8A;font-weight:400;margin-left:6px}
.dashboard-shell .message-files a,.dashboard-shell .kc-file-list a{color:inherit;text-decoration:underline;text-underline-offset:2px}
.dashboard-shell .kc-file-list{list-style:none;margin:0;padding:0;font-size:12px;display:flex;flex-direction:column;gap:6px;word-break:break-all}
.dashboard-shell .kc-status-line{display:flex;align-items:center;gap:8px;font-size:12px;color:#A6A6A6;margin:12px 0}
.dashboard-shell .kc-details-form{margin-top:12px;gap:12px}
.dashboard-shell .kc-details-form label{display:flex;flex-direction:column;gap:6px;font-size:11px;color:#A6A6A6}
.dashboard-shell .kc-details-form input,.dashboard-shell .kc-details-form select{background:#141414;border:1px solid #767676;border-radius:4px;color:#F2F2F2;padding:8px 10px;font:inherit;font-size:12px}
.dashboard-shell .sidebar-bottom a{display:block}
[hidden]{display:none!important}

/* Campo password con l'occhio Kreacode */
.kc-auth-card .kc-field{display:flex;flex-direction:column;gap:8px}
.kc-auth-card .kc-field>label{font-size:13px;color:#A6A6A6}
.kc-password{position:relative;display:block}
.kc-auth-card .kc-password input{width:100%;padding-right:56px}
.kc-auth-card .kc-password input[type=text]{background:#141414;border:1px solid #767676;border-radius:4px;color:#F2F2F2;padding:12px 56px 12px 14px;font:inherit;font-size:14px}
.kc-eye{--eye-bg:#141414;position:absolute;top:50%;right:4px;transform:translateY(-50%);width:44px;height:40px;display:flex;align-items:center;justify-content:center;padding:0;border-radius:3px;color:#C2F05A;opacity:.72;transition:opacity .15s cubic-bezier(.2,0,0,1)}
.kc-eye:hover,.kc-eye:focus-visible{opacity:1}
.kc-eye:focus-visible{outline:2px solid #C2F05A;outline-offset:-2px}
.kc-eye svg{width:28px;height:21px;overflow:visible;filter:drop-shadow(0 0 2px #C2F05A55)}
.kc-eye-shape{stroke:currentColor;stroke-width:38;stroke-linecap:round}
.kc-eye-gap{stroke:var(--eye-bg);stroke-width:110;stroke-linecap:round}
.kc-eye-bar{stroke:currentColor;stroke-width:52;stroke-linecap:round}

/* Sidebar: nome agenzia ed email restano nella colonna */
.dashboard-shell .sidebar-agency{min-width:0}
.dashboard-shell .sidebar-agency>strong,.dashboard-shell .sidebar-agency>small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Icone Lucide */
.dashboard-shell .kc-icon{width:18px;height:18px;flex:none;display:block}

/* Progetti: i contatori vivono nei filtri */
.dashboard-shell .project-filters button{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.dashboard-shell .kc-count{color:#8A8A8A;font-variant-numeric:tabular-nums}
.dashboard-shell :is(.project-filters button[aria-pressed=true],.kc-tabs [aria-selected=true]) .kc-count{color:#F2F2F2}
.dashboard-shell .project-filters button.kc-attention:before{content:"";width:6px;height:6px;border-radius:50%;background:#C2F05A;flex:none}

/* Staff: l'email del partner nell'elenco resta nella colonna */
.dashboard-shell .project-placeholder-name{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Elementi del pannello laterale validi a ogni larghezza */
.dashboard-shell .kc-mobile-bar{display:none}
.dashboard-shell .kc-icon-button{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;flex:none;padding:0;border-radius:6px;color:#A6A6A6;border:1px solid transparent}
.dashboard-shell .kc-icon-button:hover{background:#292929;color:#F2F2F2;border-color:#484848}
.dashboard-shell .kc-icon-button .kc-icon{width:20px;height:20px}
.dashboard-shell .kc-panel{display:flex;min-width:0;min-height:0;border-left:1px solid #343434;background:#141414}
.dashboard-shell .kc-panel-main{width:360px;display:flex;flex-direction:column;min-height:0;min-width:0}
.dashboard-shell .kc-panel-head{display:flex;align-items:center;gap:12px;min-height:67px;padding:12px 16px 12px 12px;border-bottom:1px solid #343434}
.dashboard-shell .kc-tabs{display:flex;flex:1;border:1px solid #343434;border-radius:6px;padding:3px}
.dashboard-shell .kc-tabs button{flex:1;min-height:34px;padding:6px 12px;font-size:14px;border-radius:4px;color:#A6A6A6;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.dashboard-shell .kc-tabs button[aria-selected=true]{background:#343434;color:#F2F2F2}
.dashboard-shell .kc-tabs button:hover:not([aria-selected=true]){background:#292929;color:#F2F2F2}
.dashboard-shell .kc-panel-body{flex:1;min-height:0;overflow-y:auto;padding:20px 16px}
.dashboard-shell .kc-group{font-family:Sora,system-ui,sans-serif;text-transform:none;letter-spacing:0;font-size:13px;line-height:20px;font-weight:500;color:#A6A6A6;margin:0 0 12px}
.dashboard-shell .kc-thumbs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:24px}
.dashboard-shell .has-preview .kc-thumbs{grid-template-columns:repeat(2,minmax(0,1fr))}
.dashboard-shell .kc-thumb{aspect-ratio:1;padding:0;border:1px solid #343434;border-radius:6px;overflow:hidden;background:#202020}
.dashboard-shell .kc-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.dashboard-shell .kc-thumb:hover{border-color:#767676}
.dashboard-shell .kc-thumb[aria-pressed=true]{border-color:#C2F05A;box-shadow:0 0 0 1px #C2F05A}
.dashboard-shell .kc-files{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.dashboard-shell .kc-file{width:100%;display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 8px;border-radius:6px;border:1px solid transparent;text-align:left}
.dashboard-shell .kc-file:hover{background:#292929}
.dashboard-shell .kc-file[aria-pressed=true]{background:#292929;border-color:#484848}
.dashboard-shell .kc-ext{font-size:11px;line-height:18px;font-weight:600;color:#A6A6A6;border:1px solid #484848;border-radius:4px;text-align:center;overflow:hidden}
.dashboard-shell .kc-file-name{font-size:14px;color:#F2F2F2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dashboard-shell .kc-file-size{font-size:13px;color:#8A8A8A;white-space:nowrap}
.dashboard-shell .kc-panel-empty{display:flex;flex-direction:column;align-items:flex-start;gap:16px}
.dashboard-shell .kc-panel-empty p{font-size:14px;line-height:22px;color:#A6A6A6}
.dashboard-shell .kc-panel .project-details{display:block;position:static;width:auto;border:0;padding:0;background:none;box-shadow:none;overflow:visible}
.dashboard-shell .kc-details .kc-status-line{margin:0 0 20px}
.dashboard-shell .kc-details dl{margin-top:0}
.dashboard-shell .kc-details>.text-link{margin-top:24px}
.dashboard-shell .kc-preview{display:flex;flex-direction:column;min-width:0;min-height:0;border-right:1px solid #343434;background:#202020}
.dashboard-shell .kc-preview-head{display:flex;align-items:center;gap:12px;padding:12px 16px;min-height:67px;border-bottom:1px solid #343434}
.dashboard-shell .kc-preview-head>div{flex:1;min-width:0;display:flex;flex-direction:column}
.dashboard-shell .kc-preview-head strong{font-size:14px;font-weight:500;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dashboard-shell .kc-preview-head span{font-size:13px;color:#8A8A8A}
.dashboard-shell .kc-preview-head .button{min-height:36px;padding:6px 12px;font-size:13px}
.dashboard-shell .kc-preview-body{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:16px;overflow:auto}
.dashboard-shell .kc-preview-body img,.dashboard-shell .kc-preview-body video{max-width:100%;max-height:100%;object-fit:contain;border-radius:4px}
.dashboard-shell .kc-preview-body audio{width:100%}
.dashboard-shell .kc-preview-pdf{padding:0}
.dashboard-shell .kc-preview-pdf iframe{width:100%;height:100%;border:0;background:#F2F2F2}
.dashboard-shell .kc-preview-none p{font-size:14px;line-height:22px;color:#A6A6A6;text-align:center;max-width:260px}

/* Desktop: barra riducibile, intestazione su una riga, conversazione a tutta altezza */
@media(min-width:801px){
 .dashboard-shell .kc-sidebar-top{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:40px}
 .dashboard-shell .kc-collapse{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;flex:none;padding:0;border-radius:6px;color:#A6A6A6}
 .dashboard-shell .kc-collapse:hover{background:#292929;color:#F2F2F2}
 .dashboard-shell .kc-collapse .kc-icon{width:20px;height:20px}
 .dashboard-shell .kc-collapse .kc-icon+.kc-icon,.dashboard-shell.kc-collapsed .kc-collapse .kc-icon:first-child{display:none}
 .dashboard-shell.kc-collapsed .kc-collapse .kc-icon+.kc-icon{display:block}
 .dashboard-shell .dashboard-sidebar nav button,.dashboard-shell .dashboard-sidebar nav button.selected{display:flex;align-items:center;gap:12px;padding:8px 12px}
 .dashboard-shell .dashboard-sidebar nav button.selected:before{display:none}
 .dashboard-shell .dashboard-sidebar nav button.selected .kc-icon{color:#C2F05A}
 .dashboard-shell .sidebar-bottom>a{display:flex;align-items:center;gap:12px}
 .dashboard-shell.kc-collapsed{grid-template-columns:72px minmax(0,1fr)}
 .dashboard-shell.kc-collapsed .dashboard-sidebar{padding:24px 12px}
 .dashboard-shell.kc-collapsed .sidebar-agency,.dashboard-shell.kc-collapsed .kc-brand .kc-logo-full{display:none}
 .dashboard-shell.kc-collapsed .kc-brand .kc-logo-mark{display:block}
 /* Barra ridotta: il logo corto <k> sopra il pulsante per riaprirla */
 .dashboard-shell.kc-collapsed .kc-sidebar-top{flex-direction:column;justify-content:center;gap:16px;margin-bottom:32px}
 .dashboard-shell.kc-collapsed .dashboard-sidebar nav{align-items:center}
 .dashboard-shell.kc-collapsed .dashboard-sidebar nav button{justify-content:center;width:48px;height:40px;padding:0}
 .dashboard-shell.kc-collapsed .sidebar-bottom{align-items:center;padding-inline:0}
 .dashboard-shell.kc-collapsed .sidebar-bottom>a{justify-content:center;width:48px}
 .dashboard-shell.kc-collapsed .kc-label{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

 .dashboard-shell .dashboard-main{padding-top:20px}
 .dashboard-shell .dashboard-heading.kc-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:12px 24px;padding-block:0 20px}
 .dashboard-shell .kc-heading h1{font-size:22px;line-height:32px;white-space:nowrap}
 .dashboard-shell .kc-heading .project-toolbar{flex:1 1 auto;margin:0;gap:16px;min-width:0}
 .dashboard-shell .kc-heading .project-filters button{min-height:40px;padding:8px 12px}
 .dashboard-shell .kc-heading-actions>.button{flex:none;min-height:40px;padding:8px 16px}

 .dashboard-shell .dashboard-main.kc-fill{display:flex;flex-direction:column;height:max(100dvh,640px);padding-bottom:24px}
 .dashboard-shell .kc-fill .project-layout{flex:1 1 auto;height:auto;min-height:0;grid-template-columns:272px minmax(0,1fr) auto}
 .dashboard-shell .kc-rail{display:flex;flex-direction:column;align-items:center;padding:12px 8px;border-left:1px solid #343434;background:#141414}
 .dashboard-shell .kc-panel.has-preview .kc-panel-main{width:300px}
 .dashboard-shell .kc-preview{width:clamp(320px,28vw,640px)}
 .dashboard-shell .chat-messages{padding:28px 32px}
 .dashboard-shell .chat-message{width:auto;max-width:min(680px,82%)}
 .dashboard-shell .chat-message.revision-message{width:100%;max-width:680px}
 .dashboard-shell .message-composer{margin:0 24px 20px;padding:8px}
}
/* Conversazione stretta (anteprima aperta): il campo di testo prende tutta la riga */
.dashboard-shell .chat-pane{container-type:inline-size}
@container (max-width:720px){
 .dashboard-shell .composer-actions>span{display:none}
}
@container (max-width:560px){
 .dashboard-shell .message-composer{grid-template-areas:"status status status" "text text text" "plus . actions" "files files files"}
 .dashboard-shell .message-composer textarea{padding-inline:8px}
 .dashboard-shell .composer-actions>span{display:none}
}
/* Con l'anteprima aperta su schermi medi, l'elenco progetti lascia spazio alla conversazione */
@media(min-width:801px) and (max-width:1599px){
 .dashboard-shell .kc-fill .project-layout.preview-open{grid-template-columns:minmax(0,1fr) auto}
 .dashboard-shell .project-layout.preview-open .project-list{display:none}
}
/* Fino a 1440 px, con il pannello aperto restano conversazione e pannello */
@media(min-width:801px) and (max-width:1439px){
 .dashboard-shell .kc-fill .project-layout.panel-open{grid-template-columns:minmax(0,1fr) auto}
 .dashboard-shell .project-layout.panel-open .project-list{display:none}
}
@media(min-width:801px) and (max-width:1279px){
 .dashboard-shell .kc-fill .project-layout{grid-template-columns:232px minmax(0,1fr) auto}
 .dashboard-shell .kc-panel-main{width:320px}
 .dashboard-shell .chat-messages{padding:24px}
 /* Schermi piccoli: con l'anteprima restano conversazione e anteprima */
 .dashboard-shell .kc-panel.has-preview .kc-panel-main{display:none}
 .dashboard-shell .kc-preview{width:clamp(320px,40vw,520px);border-right:0}
}

/* Mobile */
@media(max-width:800px){
 .dashboard-shell .kc-collapse,.dashboard-shell .kc-rail,.dashboard-shell .dashboard-sidebar .kc-icon{display:none}
 .dashboard-shell .kc-sidebar-top{display:contents}
 .dashboard-shell .dashboard-heading.kc-heading{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;padding-block:24px 16px}
 .dashboard-shell .kc-heading h1{flex:1 1 auto;min-width:0;font-size:22px;line-height:32px}
 .dashboard-shell .kc-heading-actions>.button{flex:none;min-height:44px}
 .dashboard-shell .kc-heading .project-toolbar{order:3;flex:1 1 100%;margin:0}
 .dashboard-shell .project-filters{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}
 .dashboard-shell .project-filters button{flex:none}
 .dashboard-shell .kc-mobile-bar{display:flex;align-items:center;gap:12px;padding:8px 16px;border-bottom:1px solid #343434}
 .dashboard-shell .kc-mobile-bar .mobile-back{display:inline-flex;align-items:center;min-height:44px;font-size:14px}
 .dashboard-shell .kc-mobile-bar strong{flex:1;min-width:0;font-size:15px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .dashboard-shell .kc-mobile-bar .text-button{min-height:44px;font-size:14px}
 .dashboard-shell .kc-panel{position:absolute;inset:0;z-index:6;flex-direction:column}
 .dashboard-shell .project-layout.mobile-list .kc-panel{display:none}
 .dashboard-shell .kc-panel-main{width:auto;flex:1}
 .dashboard-shell .kc-panel.has-preview .kc-panel-main{display:none}
 .dashboard-shell .kc-preview{flex:1;border-right:0}
}

/* ---------- 1.1.0 ---------- */

/* Composer: + a sinistra, testo al centro, invio a destra; stato e file in righe intere */
.dashboard-shell .message-composer{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"status status status" "plus text actions" "files files files";align-items:end;column-gap:8px;row-gap:0}
.dashboard-shell .message-composer textarea{grid-area:text;min-height:44px;max-height:220px;padding:10px 0;line-height:24px;overflow-y:auto}
.dashboard-shell .message-composer .composer-actions{grid-area:actions;display:flex;align-items:center;gap:16px;margin:0}
.dashboard-shell .message-composer .pending-files{grid-area:files}
.dashboard-shell .kc-plus-wrap{grid-area:plus;position:relative;align-self:end}
.dashboard-shell .kc-plus{width:44px;height:44px}
.dashboard-shell .kc-plus[aria-expanded=true]{background:#292929;color:#F2F2F2;border-color:#484848}
.dashboard-shell .kc-menu{position:absolute;left:0;bottom:calc(100% + 8px);z-index:12;min-width:220px;display:flex;flex-direction:column;padding:6px;background:#202020;border:1px solid #343434;border-radius:8px;box-shadow:0 16px 40px #14141499}
.dashboard-shell .kc-menu button{text-align:left;padding:10px 12px;min-height:40px;font-size:14px;border-radius:4px;color:#F2F2F2}
.dashboard-shell .kc-menu button:hover,.dashboard-shell .kc-menu button:focus-visible{background:#292929}
.dashboard-shell .kc-status-row{grid-area:status;display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px 16px;padding:8px 8px 12px;margin-bottom:8px;border-bottom:1px solid #343434}
.dashboard-shell .kc-status-row label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:#A6A6A6;flex:1 1 200px;max-width:320px}
.dashboard-shell .kc-status-row :is(select,input){font-size:14px;padding:8px 10px;min-height:40px}
.dashboard-shell .kc-status-row .text-button{min-height:40px;font-size:14px}
.dashboard-shell .message-composer.kc-status-mode{border-color:#A6A6A6}
.dashboard-shell .pending-files>span{align-items:center}

/* Spunte */
.dashboard-shell .kc-ticks{display:inline-flex;vertical-align:-4px;margin-left:6px;color:#8A8A8A}
.dashboard-shell .kc-ticks .kc-icon{width:16px;height:16px;stroke-width:2}
.dashboard-shell .kc-ticks-read{color:#C2F05A}

/* Aggiornamenti di stato in chat */
.dashboard-shell .kc-status-change{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:14px;color:#A6A6A6;margin-bottom:8px}
.dashboard-shell .chat-message.own .kc-status-change{justify-content:flex-end}
.dashboard-shell .kc-status-change .status-badge{color:#F2F2F2;font-size:14px}

/* Allegati da archivio */
.dashboard-shell .kc-archive-chip{padding:0;font:inherit;color:inherit;text-decoration:underline;text-underline-offset:2px}
.dashboard-shell .kc-file-path{color:#8A8A8A}
.dashboard-shell .kc-file-group+.kc-file-group{margin-top:24px}
.dashboard-shell .kc-group .kc-count{margin-left:4px}
.dashboard-shell .kc-hint{font-size:13px;line-height:20px;color:#A6A6A6;margin:-8px 0 20px}

/* Trascinamento dei file sulla conversazione */
.dashboard-shell .chat-pane{position:relative}
.dashboard-shell .kc-drop{display:none;position:absolute;inset:8px;z-index:8;align-items:center;justify-content:center;text-align:center;padding:24px;border:2px dashed #A6A6A6;border-radius:10px;background:#141414ee;pointer-events:none}
.dashboard-shell .chat-pane.kc-dragging .kc-drop{display:flex}
.dashboard-shell .kc-drop p{display:flex;flex-direction:column;gap:8px;max-width:380px}
.dashboard-shell .kc-drop strong{font-size:18px;font-weight:500;color:#F2F2F2}
.dashboard-shell .kc-drop span{font-size:14px;line-height:22px;color:#A6A6A6}

/* Colore per tipo di progetto: barra a sinistra in elenco e kanban */
.kc-type-landing{--kc-type:var(--kc-type-landing)}
.kc-type-vetrina{--kc-type:var(--kc-type-vetrina)}
.kc-type-ecommerce{--kc-type:var(--kc-type-ecommerce)}
.kc-type-altro{--kc-type:var(--kc-type-altro)}
.dashboard-shell :is(.project-item,.kanban-card)[class*=kc-type-]{box-shadow:inset 4px 0 0 var(--kc-type)}
.dashboard-shell .kc-type-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}

/* Aspetto */
.dashboard-shell .sidebar-bottom{position:relative}
.dashboard-shell .sidebar-bottom>.kc-appearance-toggle{display:flex;align-items:center;gap:12px;padding:0;min-height:20px;font-size:13px;line-height:20px;color:inherit;text-align:left}
.dashboard-shell .sidebar-bottom>.kc-appearance-toggle:hover{color:#F2F2F2}
.dashboard-shell .kc-appearance{position:absolute;left:0;bottom:calc(100% + 8px);z-index:30;width:272px;padding:16px;display:flex;flex-direction:column;gap:16px;background:#202020;border:1px solid #343434;border-radius:10px;box-shadow:0 16px 40px #14141499}
.dashboard-shell .kc-appearance[hidden]{display:none}
.dashboard-shell .kc-appearance-group{display:flex;flex-direction:column;gap:8px}
.dashboard-shell .kc-appearance-group>span{font-size:13px;color:#A6A6A6}
.dashboard-shell .kc-seg{display:flex;border:1px solid #343434;border-radius:6px;padding:3px}
.dashboard-shell .kc-seg button{flex:1;min-height:36px;padding:6px 8px;font-size:14px;border-radius:4px;color:#A6A6A6}
.dashboard-shell .kc-seg button[aria-pressed=true]{background:#343434;color:#F2F2F2}
.dashboard-shell .kc-seg button:hover:not([aria-pressed=true]){background:#292929;color:#F2F2F2}
.dashboard-shell .kc-appearance .kc-hint{margin:0}
@media(min-width:801px){
 .dashboard-shell.kc-collapsed .sidebar-bottom>.kc-appearance-toggle{justify-content:center;width:48px}
 .dashboard-shell.kc-collapsed .kc-appearance{left:calc(100% + 12px);bottom:0}
}
@media(max-width:800px){
 .dashboard-shell .sidebar-bottom{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:0 16px}
 .dashboard-shell .sidebar-bottom>a{display:inline-flex;align-items:center;min-height:44px}
 .dashboard-shell .sidebar-bottom>.kc-appearance-toggle{display:inline-flex;min-height:44px;font-size:.875rem}
 .dashboard-shell .kc-appearance{left:auto;right:0;bottom:auto;top:calc(100% + 8px)}
}

/* Nuovo progetto: materiali */
.modal .kc-field-files{display:flex;flex-direction:column;gap:8px}
.modal .kc-field-label{font-size:14px;color:#d0d0d0}
.modal .kc-field-label small{color:#A6A6A6;font-size:inherit}
.modal .kc-dropzone{border:1px dashed #767676;border-radius:8px;padding:20px;text-align:center;display:flex;flex-direction:column;gap:8px}
.modal .kc-dropzone.kc-over{border-color:#C2F05A;background:#292929}
.modal .kc-dropzone p{font-size:14px;color:#d0d0d0;margin:0}
.modal .kc-dropzone .text-button{font-size:14px;padding:0;color:inherit}
.modal .kc-dropzone .demo-note{font-size:13px;color:#A6A6A6}
.modal .kc-new-files{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.modal .kc-new-files li{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;font-size:14px;padding:6px 0;border-bottom:1px solid #343434}
.modal .kc-new-files li>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.modal .kc-new-files .kc-file-size{font-size:13px;color:#8A8A8A}
.modal .kc-new-files .text-button{font-size:13px;padding:0}

/* Dimensione del testo: tutta l'area cresce in proporzione */
html[data-text=piccolo]{--kc-zoom:.9}
html[data-text=grande]{--kc-zoom:1.125}
html[data-text] .dashboard-shell,html[data-text] .modal{zoom:var(--kc-zoom,1)}
html[data-text] .modal{max-height:calc(100dvh / var(--kc-zoom,1) - 40px)}
@media(min-width:801px){
 html[data-text] .dashboard-shell .dashboard-sidebar{height:calc(100dvh / var(--kc-zoom,1))}
 html[data-text] .dashboard-shell .dashboard-main.kc-fill{height:max(calc(100dvh / var(--kc-zoom,1)),640px)}
}

/* Michroma: tratti sottili, quindi niente allineamento alla griglia dei pixel.
   michroma-area-partner.woff2 è senza hinting e senza sporgenze delle lettere tonde
   (tools/prepara-michroma.py): stesso spessore e stessa altezza per tutte le maiuscole. */
:is(.dashboard-shell,.modal,.kc-auth-card) :is(h1,h2,h3,h4,h5,h6),.dashboard-shell :is(.project-item,.kanban-card) strong{text-rendering:geometricPrecision}

/* Tema: un solo pulsante, sole per il chiaro e luna per lo scuro */
.dashboard-shell .kc-heading-actions{display:flex;align-items:center;gap:12px;margin-left:auto}
.dashboard-shell .kc-theme-toggle{position:relative;overflow:hidden}
.dashboard-shell .kc-theme-icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
html:not([data-theme=chiaro]) .dashboard-shell .kc-sun,html[data-theme=chiaro] .dashboard-shell .kc-moon{opacity:0;transform:rotate(-90deg) scale(.6)}
/* Mobile: titolo e sole/luna sulla prima riga, vista e "Nuovo progetto" sulla seconda, filtri sotto */
@media(max-width:800px){
 .dashboard-shell .kc-heading .kc-heading-actions{display:contents}
 .dashboard-shell .kc-heading .kc-theme-toggle{order:1}
 .dashboard-shell .kc-heading .view-switch{order:2}
 .dashboard-shell .kc-heading .kc-heading-actions>.button{order:2;margin-left:auto}
}

/* ---------- 1.2.0 ---------- */

/* Accesso e registrazione: errore sotto il campo, contatto sempre visibile */
.kc-auth-card .kc-field-error{margin:0;font-size:13px;line-height:1.5;color:#f2d6d6}
.kc-auth-card [aria-invalid=true]{border-color:#c97b7b!important}
.kc-auth-card .kc-field-error a,.kc-alert a,.kc-auth-help a,.kc-auth-switch a,.kc-auth-card .check-label a{text-decoration:underline;text-underline-offset:2px}
.kc-auth-card .kc-field-error a,.kc-alert a{color:inherit}
.kc-auth-help{margin:0;font-size:13px;color:#A6A6A6;text-align:center}
.kc-auth-help a{color:#F2F2F2}
.kc-auth-card p+p.muted{margin-top:12px}

/* Stati in cui tocca all'agenzia: pallino lime */
.dashboard-shell .status-badge.lime:before{background:#C2F05A}

/* Menu: numero delle nuove agenzie */
.dashboard-shell .dashboard-sidebar nav .kc-count{margin-left:6px}

/* Nuovo progetto: due campi per riga, caselle, pulsante sempre visibile in fondo */
.modal .kc-form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.modal .kc-form-row label{display:flex;flex-direction:column;gap:8px}
.modal .kc-form-row.kc-has-price{grid-template-columns:1fr}
.modal .kc-checks{border:0;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px 24px}
.modal .kc-checks legend{padding:0;margin-bottom:8px;font-size:14px;font-weight:500;color:#d0d0d0;width:100%}
.modal .kc-checks .check-label{display:inline-flex;align-items:center;gap:8px;font-weight:400}
.modal .kc-modal-actions{position:sticky;bottom:0;z-index:2;margin:0 -32px -32px;padding:16px 32px 24px;background:var(--raised);border-top:1px solid #343434}
.modal .kc-modal-actions .button{margin:0;width:100%}
.modal .kc-confirm-row{gap:12px;margin-top:8px}
.modal .kc-confirm-row .button{margin:0}
@media(max-width:800px){.modal .kc-modal-actions{margin:0 -26px -26px;padding:16px 26px 20px}}
@media(max-width:520px){.modal .kc-form-row{grid-template-columns:1fr}.modal .kc-modal-actions{margin:0 -24px -24px;padding:16px 24px 20px}}
@media(max-width:359px){.modal .kc-modal-actions{margin:0 -16px -16px;padding:12px 16px 16px}}

/* Conversazione: risposte del brief, preventivo, tappa vista dal partner */
.dashboard-shell .kc-brief-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 24px;margin:0 0 8px;padding:12px 16px;border:1px solid #343434;border-radius:8px;background:#202020;text-align:left}
.dashboard-shell .kc-brief-facts dt{font-size:13px;line-height:20px;color:#8A8A8A}
.dashboard-shell .kc-brief-facts dd{margin:0;font-size:14px;line-height:22px;color:#F2F2F2}
.dashboard-shell .kc-stage-hint{font-size:12px;line-height:18px;color:#8A8A8A}

/* Dettagli: richiesta e accordi in due gruppi */
.dashboard-shell .kc-details .kc-group{margin:24px 0 8px}
.dashboard-shell .kc-details .kc-status-line+.kc-group,.dashboard-shell .kc-details-form .kc-group:first-child{margin-top:0}
.dashboard-shell .kc-details-form .kc-group{margin:12px 0 0}

/* Kanban: numero per colonna, Da leggere sulle schede, colonne vuote dello staff strette */
.dashboard-shell .kanban-column h3 .kc-count{font-family:Sora,system-ui,sans-serif;margin-left:4px}
.dashboard-shell .kanban-card .project-item-top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px 8px;width:100%;font-size:13px;color:#A6A6A6}
.dashboard-shell .kanban-card .project-item-top .kc-type-label{white-space:normal}
.dashboard-shell .kanban-column.kc-col-empty{display:flex;justify-content:center;padding:16px 8px;min-width:0}
.dashboard-shell .kc-col-empty h3{align-self:flex-start;writing-mode:vertical-rl;transform:rotate(180deg);border:0;padding:0;margin:0;color:#8A8A8A;white-space:nowrap}
.dashboard-shell .kc-board-staff .kanban-column h3{overflow-wrap:normal}
.dashboard-shell .kanban-board.kc-overflow{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 56px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 56px),transparent)}

/* Nuove agenzie (staff) */
.dashboard-shell .kc-agencies{list-style:none;margin:24px 0 0;padding:0;display:flex;flex-direction:column}
.dashboard-shell .kc-agency{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px 24px;padding:20px 0;border-top:1px solid #343434}
.dashboard-shell .kc-agency-data{display:flex;flex-direction:column;gap:4px;min-width:0}
.dashboard-shell .kc-agency-data strong{font-size:16px;font-weight:500;color:#F2F2F2;overflow-wrap:anywhere}
.dashboard-shell .kc-agency-data span{font-size:14px;line-height:22px;color:#A6A6A6;overflow-wrap:anywhere}
.dashboard-shell .kc-agency .button-row{gap:12px}

/* Telefono: menu e filtri vanno a capo; con una conversazione aperta resta solo la conversazione */
@media(max-width:800px){
 .dashboard-shell .dashboard-sidebar nav{flex-wrap:wrap;overflow:visible}
 .dashboard-shell .project-filters{flex-wrap:wrap;overflow:visible}
 .dashboard-shell .kanban-column.kc-col-empty{min-width:56px;flex:none}
 .dashboard-shell.kc-chat-open{display:block}
 .dashboard-shell.kc-chat-open .dashboard-sidebar,.dashboard-shell.kc-chat-open .kc-heading{display:none}
 .dashboard-shell.kc-chat-open .dashboard-main{padding:0;height:100dvh;display:flex;flex-direction:column}
 .dashboard-shell.kc-chat-open .project-layout{flex:1 1 auto;height:auto;min-height:0;border:0;border-radius:0}
 .dashboard-shell.kc-chat-open .chat-pane{min-height:0}
 .dashboard-shell.kc-chat-open .chat-messages{padding:16px}
 .dashboard-shell.kc-chat-open .message-composer{margin:0 12px 12px}
 .dashboard-shell .kc-brief-facts{grid-template-columns:1fr}
}

/* ---------- 1.2.1 ---------- */

/* Nuovo progetto: prezzo di listino già compilato, si legge ma non si cambia */
.modal .kc-readonly{background:transparent;border-style:dashed;border-color:#626262;cursor:default}
.modal textarea.kc-readonly{min-height:50px;resize:none;overflow:hidden}
.modal .kc-readonly:focus-visible{outline:2px solid #C2F05A;outline-offset:2px}
.modal .kc-field-note{font-size:13px;font-weight:400;line-height:1.5;color:#A6A6A6;margin-top:-2px}
.modal .kc-optional{font-size:inherit;font-weight:400;color:#A6A6A6}

/* Conversazione: il sito di riferimento prende tutta la riga */
.dashboard-shell .kc-brief-facts .kc-fact-wide{grid-column:1/-1}
.dashboard-shell .kc-brief-facts dd{overflow-wrap:anywhere}
.dashboard-shell .kc-details-form textarea{min-height:0;background:#141414;border:1px solid #767676;border-radius:4px;color:#F2F2F2;padding:8px 10px;font:inherit;font-size:12px;line-height:1.5;resize:vertical}

/* Logo <krea/code_>: lo stesso del sito, in SVG. I colori sono quelli del testo, così il tema chiaro li adatta. */
.kc-brand{display:inline-flex;align-items:center;line-height:0;font-size:0;letter-spacing:0}
.kc-logo{display:block;width:auto;overflow:visible}
.kc-logo-full{height:20px;aspect-ratio:1031/139}
.kc-logo-mark{display:none;height:20px;aspect-ratio:312.4/138.4}
.kc-logo-sign,.kc-logo-krea{fill:#F2F2F2}
.kc-logo-code{fill:#A6A6A6}
.kc-auth .kc-brand .kc-logo-full{height:28px}
/* Telefono: logo sulla stessa riga della prima voce in alto a destra */
@media(max-width:800px){.dashboard-shell .kc-brand{align-self:start;min-height:44px}.dashboard-shell .kc-logo-full{height:15px}}
