/* MY AI NOW · Contratti di adesione (27/11/2026). Elenco compatto tipo foglio, dettaglio a fisarmonica, sezioni a tendina. */
.co-box-riga { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.6rem; margin: 1rem 0; }
.co-box { background: var(--white); border: 1px solid var(--ink-line); border-radius: 12px; padding: 0.6rem 0.8rem; display: flex; flex-direction: column; gap: 0.1rem; }
.co-box span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); font-weight: 700; }
.co-box strong { font-size: var(--t-m, 1.1rem); font-weight: 800; }
.co-box small { font-size: 0.7rem; color: var(--ink-soft); }
.co-barra { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.5rem 0 0.75rem; }
.co-barra select, .co-barra input { font: inherit; font-size: var(--t-s); border: 1px solid var(--ink-line); border-radius: 8px; padding: 0.3rem 0.5rem; background: var(--paper); }
.co-barra input[type="search"] { flex: 1 1 14rem; max-width: 22rem; }
.co-riga { cursor: pointer; }
.co-annullato td { opacity: 0.55; }
.co-tab tr.co-aperta > td { background: var(--paper-2); }
.co-det { font: inherit; font-size: 0.68rem; background: var(--white); border: 1px solid var(--ink-line); border-radius: 8px; padding: 0.08rem 0.5rem; cursor: pointer; white-space: nowrap; }
.co-acc > td { padding: 0 !important; background: var(--paper) !important; }
.co-acc-box { padding: 0.5rem 0.25rem 1rem; }
.co-ok { color: var(--lime-deep); font-weight: 700; }
.co-ko { color: var(--magenta-deep); font-weight: 700; }

.co-editor { margin: 0.5rem 0 1rem; }
.co-editor h2 { font-size: var(--t-m, 1.1rem); margin: 0 0 0.5rem; }
.co-editor h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 0.6rem 0 0.3rem; color: var(--ink-soft); }
.co-sez { border: 1px solid var(--ink-line); border-radius: 10px; margin-bottom: 0.45rem; background: var(--white); }
.co-sez > summary { cursor: pointer; font-weight: 700; font-size: var(--t-s); padding: 0.4rem 0.7rem; }
.co-sez[open] > summary { border-bottom: 1px solid var(--ink-line); }
.co-sez-corpo { padding: 0.5rem 0.7rem 0.6rem; }
.co-form input, .co-form select, .co-form textarea { font: inherit; font-size: var(--t-xs, 0.8rem); border: 1px solid var(--ink-line); border-radius: 6px; padding: 0.22rem 0.4rem; background: var(--paper); min-width: 0; }
.co-form textarea { width: 100%; resize: vertical; }
.co-cond { font-size: 0.75rem !important; line-height: 1.4; }
.co-griglia { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.35rem 0.8rem; }
.co-campo { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.7rem; color: var(--ink-soft); font-weight: 600; }
.co-campo input, .co-campo select { color: var(--ink); font-weight: 400; }
.co-largo { margin-top: 0.5rem; }
.co-linea { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0.3rem 0; font-size: var(--t-xs, 0.8rem); }
.co-spunte { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: center; font-size: var(--t-xs, 0.8rem); }
.co-spunta { display: inline-flex; gap: 0.3rem; align-items: center; cursor: pointer; }
.co-spunta input { accent-color: var(--magenta-deep); }
.co-altro { width: 14rem; }
.co-cerca { width: 100%; max-width: 26rem; margin-bottom: 0.3rem; }
.co-risultati { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 0.4rem; max-width: 34rem; }
.co-ris { font: inherit; font-size: var(--t-xs, 0.8rem); text-align: left; background: var(--white); border: 1px solid var(--ink-line); border-radius: 8px; padding: 0.3rem 0.5rem; cursor: pointer; }
.co-ris small { color: var(--ink-soft); }
.co-collegato { font-size: var(--t-xs, 0.8rem); margin-bottom: 0.3rem; }
.co-link { font: inherit; background: none; border: 0; padding: 0; color: var(--magenta-deep); text-decoration: underline; cursor: pointer; }
.co-righe .co-cod { width: 6rem; text-transform: uppercase; }
.co-righe .co-desc, .co-linea .co-desc { width: 22rem; max-width: 60vw; }
.co-righe .co-nota { width: 12rem; }
.co-num { width: 6.5rem; text-align: right; }
.co-num-s { width: 3.6rem; text-align: right; }
.co-cfoto { white-space: nowrap; }
.co-cfoto label { display: inline-flex; align-items: center; gap: 0.25rem; cursor: pointer; }
.co-cfoto img { width: 34px; height: 26px; object-fit: cover; border-radius: 4px; border: 1px solid var(--ink-line); background: var(--paper-2); }
.co-x { font: inherit; font-size: 0.75rem; background: none; border: 1px solid var(--ink-line); border-radius: 6px; padding: 0.05rem 0.35rem; cursor: pointer; }
.co-x:hover { border-color: var(--magenta-deep); color: var(--magenta-deep); }
tr.co-errata > td { background: color-mix(in srgb, var(--magenta-deep) 12%, transparent) !important; }
.co-sc-imp { font-variant-numeric: tabular-nums; color: var(--ink-soft); min-width: 6rem; }
.co-totali { margin-top: 0.6rem; }
.co-tot { min-width: 18rem; }
.co-tot .co-forte td { font-weight: 800; border-top: 2px solid var(--ink-line); }
.co-rate input[data-k="descrizione"] { width: 14rem; }
.co-rate small { color: var(--ink-soft); }
.co-azioni { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.co-storico { margin-top: 0.6rem; font-size: var(--t-xs, 0.8rem); }
.co-storico summary { cursor: pointer; font-weight: 700; }

/* scelta dal catalogo */
.co-fin-ov { position: fixed; inset: 0; z-index: 900; background: rgba(0,0,0,0.35); display: flex; align-items: flex-start; justify-content: center; padding: 3vh 12px; overflow-y: auto; }
.co-fin { background: var(--white); border-radius: 14px; width: 100%; max-width: 760px; box-shadow: 0 16px 40px rgba(0,0,0,0.25); }
.co-fin-testa { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--ink-line); position: sticky; top: 0; background: var(--white); border-radius: 14px 14px 0 0; }
.co-fin-testa h2 { margin: 0; font-size: var(--t-m, 1.05rem); }
.co-fin-x { border: 0; background: none; font-size: 1.2rem; cursor: pointer; }
.co-fin-corpo { padding: 0.7rem 0.9rem 1rem; }
.co-fin-corpo input[type="search"] { width: 100%; font: inherit; border: 1px solid var(--ink-line); border-radius: 8px; padding: 0.4rem 0.6rem; }
.co-fin-corpo h3 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 0.8rem 0 0.3rem; color: var(--ink-soft); }
.co-cat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.co-cat li { display: grid; grid-template-columns: 52px 1fr auto auto; gap: 0.6rem; align-items: center; padding: 0.25rem 0; border-bottom: 1px solid var(--ink-line); font-size: var(--t-xs, 0.8rem); }
.co-cat img { width: 52px; height: 38px; object-fit: cover; border-radius: 5px; background: var(--paper-2); }
.co-cat small { display: block; color: var(--ink-soft); }
.co-cat .num { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* pagina intera come Costi e commesse */
body.co-pieno .contenitore.my-app { width: calc(100% - 2 * var(--gutter)); max-width: none; }
body.co-pieno .my-layout, body.co-pieno .my-layout.ridotto { grid-template-columns: minmax(0, 1fr); }
body.co-pieno .my-nav, body.co-pieno .my-menu-btn, body.co-pieno .my-nav-riduci { display: none !important; }
.co-btn-pieno { margin-bottom: 0.5rem; }
@media (max-width: 40rem) {
  .co-righe .co-desc { width: 13rem; }
  .co-cat li { grid-template-columns: 44px 1fr; }
  .co-cat li .num, .co-cat li button { grid-column: 2; justify-self: start; }
}

/* versioni (27/11/2026) */
.co-banner { border-radius: 10px; padding: 0.5rem 0.75rem; margin-bottom: 0.5rem; font-size: var(--t-xs, 0.8rem); }
.co-banner p { margin: 0 0 0.3rem; }
.co-banner-blocco { background: color-mix(in srgb, var(--magenta-deep) 10%, var(--white)); border: 1px solid color-mix(in srgb, var(--magenta-deep) 40%, transparent); }
.co-banner-nuova { background: color-mix(in srgb, var(--lime-deep) 12%, var(--white)); border: 1px solid color-mix(in srgb, var(--lime-deep) 45%, transparent); }
.co-banner input { font: inherit; border: 1px solid var(--ink-line); border-radius: 6px; padding: 0.25rem 0.45rem; background: var(--white); }
.co-motivo { flex: 1 1 22rem; }
.co-blocco { border: 0; padding: 0; margin: 0; min-width: 0; }
.co-blocco:disabled { opacity: 0.72; }
.co-luogo { max-width: 24rem; margin-bottom: 0.45rem; }
.co-ver .co-azioni-ver { white-space: nowrap; }
.co-diff { margin-top: 0.5rem; border: 1px solid var(--ink-line); border-radius: 10px; padding: 0.4rem 0.7rem; background: var(--white); }
.co-diff ul { margin: 0.2rem 0 0 1.1rem; padding: 0; }
/* 27/11/2026 sconto per voce, costo, margine, agenti */
.co-csc { white-space: nowrap; }
.co-csc select { width: 3.2rem; }
.co-tutte { margin-left: 2px; font-weight: 700; }
.co-marg { margin-top: 10px; background: #fff8e1; }
.co-marg caption { text-align: left; font-weight: 700; font-size: .85rem; padding: 4px 0; color: #7a5a00; }
.co-agenti { grid-template-columns: 2fr 1fr 2fr 1fr; }
@media (max-width: 700px) { .co-agenti { grid-template-columns: 1fr 1fr; } }
/* con sconto e costo la tabella voci si allarga: la descrizione e la nota si stringono, il resto scorre nel suo riquadro */
.co-righe .co-desc { width: 15rem; }
.co-righe .co-nota { width: 8rem; }
.co-righe .co-num { width: 5.5rem; }
.co-acc-box { max-width: calc(100vw - 13rem); }
body:not(.co-pieno) .co-acc-box { max-width: calc(100vw - 22rem); }
@media (max-width: 900px) { body:not(.co-pieno) .co-acc-box { max-width: calc(100vw - 2rem); } }
