/* ═══ Libreria v3 — pipeline (mockup-libreria-v3.html, decisione Sere 11 giu 2026) ═══
   Palette = variabili :root del tool. Colore SOLO dove codifica informazione:
   badge tipo, pallini corsie/settimana. Bottoni neutri.
   Scoped .lp-* — identico tra coach e studenti. */

.lp-wrap {
  --lp-brand-soft: rgba(153,10,63,.10); --lp-brand-mid: rgba(153,10,63,.32);
  --lp-green-soft: rgba(34,197,94,.08); --lp-green-mid: rgba(34,197,94,.25);
  --lp-orange-soft: rgba(249,115,22,.08); --lp-orange-mid: rgba(249,115,22,.3);
  --lp-purple-soft: rgba(167,139,250,.10);
  --lp-blue-soft: rgba(107,143,255,.10);
  --lp-pink: #f472b6; --lp-pink-soft: rgba(244,114,182,.10);
  --lp-rosa: #d46c8a;
  --lp-dim: #6e6a8a;
}

/* ── Barra-contesto unica (~70px): dove sei + la settimana ── */
.lp-ctxbar { display: flex; gap: .6rem; margin-bottom: 1rem; align-items: stretch; flex-wrap: wrap; }
.lp-ctx { background: var(--card); border: 1px solid var(--border); border-radius: 11px; padding: .5rem .85rem; display: flex; flex-direction: column; justify-content: center; gap: .1rem; }
.lp-ctx-k { font-size: .56rem; text-transform: uppercase; letter-spacing: .1em; color: var(--lp-dim); font-weight: 700; }
.lp-ctx-main { font-size: .85rem; font-weight: 600; white-space: nowrap; }
.lp-ctx-main .lv { color: var(--lp-rosa); }
.lp-ctx-main .cor { color: var(--orange); }
.lp-ctx-main .dim { color: var(--lp-dim); font-size: .7rem; font-weight: 400; }
.lp-ctx-sub { font-size: .64rem; color: var(--muted); white-space: nowrap; }
.lp-ctx-sub b { color: var(--text); font-weight: 600; }
.lp-ctx.week { flex: 1; flex-direction: column; justify-content: center; gap: .3rem; min-width: 300px; }
.lp-whead { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.lp-wnavs { display: inline-flex; align-items: center; gap: .25rem; }
.lp-wnav { background: var(--surface); border: 1px solid var(--border); color: var(--muted); border-radius: 6px; width: 22px; height: 18px; line-height: 1; font-size: .78rem; cursor: pointer; padding: 0; font-family: inherit; }
.lp-wnav:hover { color: var(--text); border-color: var(--border2); }
.lp-wtoday { background: none; border: none; color: var(--lp-rosa); font-size: .6rem; cursor: pointer; padding: 0 .25rem; font-family: inherit; text-transform: uppercase; letter-spacing: .06em; }
.lp-wmini { flex: 1; display: flex; gap: .3rem; }
.lp-wday { position: relative; flex: 1; border: 1px solid var(--border); border-radius: 9px; padding: .3rem .2rem .35rem; text-align: center; min-width: 0; }
.lp-wday-tip { position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%); width: 210px; background: var(--surface2); border: 1px solid var(--border2); border-radius: 9px; padding: .5rem .6rem; box-shadow: 0 8px 24px rgba(0,0,0,.45); display: none; z-index: 50; text-align: left; pointer-events: none; }
.lp-wday:hover .lp-wday-tip { display: block; }
.lp-wtip-h { font-size: .62rem; font-weight: 700; color: var(--text); margin-bottom: .35rem; }
.lp-wtip-i { font-size: .6rem; color: var(--muted); line-height: 1.5; display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-wtip-i.dim { color: var(--lp-dim); }
.lp-wtip-i .lp-wd { flex-shrink: 0; }
.lp-wday.today { border-color: var(--lp-brand-mid); background: var(--lp-brand-soft); }
.lp-wday-name { font-size: .58rem; text-transform: uppercase; color: var(--lp-dim); white-space: nowrap; }
.lp-wday.today .lp-wday-name { color: var(--lp-rosa); font-weight: 700; }
.lp-wday-dots { display: flex; gap: 3px; justify-content: center; margin-top: .25rem; min-height: 8px; flex-wrap: wrap; }
.lp-wd { width: 7px; height: 7px; border-radius: 50%; }
.lp-wd.sched { background: var(--blue); }                                      /* programmato */
.lp-wd.ready { background: transparent; border: 1.5px solid var(--green); }    /* pronto, manca la coda */
.lp-wd.todo { background: transparent; border: 1.5px dashed var(--orange); }   /* da sviluppare */

/* ── Controlli: ricerca + chips + sviluppa tutto, una riga ── */
.lp-controls { display: flex; align-items: center; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.lp-search { flex: 1; min-width: 180px; max-width: 280px; background: var(--card); border: 1px solid var(--border2); border-radius: 8px; padding: .35rem .7rem; color: var(--text); font-size: .78rem; font-family: inherit; }
.lp-search::placeholder { color: var(--lp-dim); }
.lp-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: 20px; font-size: .72rem; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; font-family: inherit; white-space: nowrap; }
.lp-chip .n { font-size: .6rem; opacity: .75; }
.lp-chip.on { background: var(--lp-brand-soft); border-color: var(--lp-brand-mid); color: var(--text); }
.lp-ctrl-right { margin-left: auto; display: flex; gap: .35rem; position: relative; }
.lp-btn-sviluppa-tutto { display: inline-flex; align-items: center; gap: .4rem; background: var(--brand); color: #fff; border: none; border-radius: 8px; padding: .35rem .9rem; font-size: .76rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.lp-btn-sviluppa-tutto:disabled { opacity: .45; cursor: default; }
.lp-kebab { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--border2); background: transparent; color: var(--muted); cursor: pointer; }
.lp-kmenu { position: absolute; right: 0; top: 36px; z-index: 50; background: var(--card); border: 1px solid var(--border2); border-radius: 10px; padding: .4rem; display: flex; flex-direction: column; gap: .25rem; min-width: 180px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.lp-kmenu .lp-ebtn { text-align: left; }

/* ── Pipeline: 3 corsie, i contenuti scorrono verso destra ── */
.lp-pipeline { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .9rem; align-items: start; }
.lp-lane { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .8rem; min-height: 200px; }
.lp-lane-head { display: flex; align-items: center; gap: .5rem; padding: 0 .2rem .7rem; }
.lp-lane-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
/* corsie: solo il pallino è colorato, i titoli restano neutri */
.lp-lane-title { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.lp-lane-n { font-size: .65rem; color: var(--lp-dim); margin-left: auto; }
.lp-lane.todo .lp-lane-dot { background: var(--orange); }
.lp-lane.ready .lp-lane-dot { background: var(--green); }
.lp-lane.sched .lp-lane-dot { background: var(--blue); }
.lp-lane-cards { display: flex; flex-direction: column; gap: .45rem; }
/* pallino stato sulla card (completare/programmare/programmato/pubblicato) + riga "manca…" */
.lp-stato-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.lp-stato-manca { font-size: .62rem; color: var(--orange); margin: .15rem .2rem .35rem; line-height: 1.3; }
.lp-more-btn { width: 100%; padding: .45rem; margin-top: .25rem; border-radius: 8px; border: 1px dashed var(--border2); background: transparent; color: var(--muted); font-size: .72rem; cursor: pointer; font-family: inherit; }
.lp-more-btn:hover { color: var(--text); border-color: var(--border2); }
.lp-lane-empty { font-size: .72rem; color: var(--lp-dim); font-style: italic; padding: .8rem .4rem; text-align: center; line-height: 1.5; }

/* card: badge + giorno + 2 righe testo + UNA azione. Niente bordi colorati per tipo. */
.lp-pcard { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: .6rem .7rem; cursor: pointer; }
.lp-pcard:hover { border-color: var(--border2); }
.lp-pcard.next { border-color: var(--lp-brand-mid); background: linear-gradient(140deg, rgba(153,10,63,.12), var(--card) 70%); }
.lp-next-tag { font-size: .56rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--lp-rosa); }
.lp-pcard-top { display: flex; align-items: center; gap: .45rem; margin-bottom: .35rem; }
.lp-badge { font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .1rem .4rem; border-radius: 4px; flex-shrink: 0; }
.lp-badge.car { background: var(--lp-purple-soft); color: var(--purple); }
.lp-badge.post { background: var(--lp-blue-soft); color: var(--blue); }
.lp-badge.storia { background: var(--lp-orange-soft); color: var(--orange); }
.lp-badge.script { background: var(--lp-pink-soft); color: var(--lp-pink); }
.lp-badge.altro { background: var(--surface2); color: var(--muted); }
.lp-pday { font-size: .62rem; color: var(--lp-dim); }
.lp-pday.oggi { color: var(--accent3); font-weight: 700; }
.lp-pmore { margin-left: auto; color: var(--lp-dim); font-size: .85rem; line-height: 1; padding: 0 .15rem; }
.lp-ptext { font-size: .76rem; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: .5rem; }
.lp-ptext b { color: var(--text); font-weight: 500; }
/* Striscia mini-anteprima slide: rettangoli 4:5 col colore del brand + foto reali */
.lp-slides { display: flex; align-items: center; gap: 4px; margin-bottom: .5rem; flex-wrap: wrap; }
.lp-slide { position: relative; width: 26px; height: 33px; border-radius: 4px; border: 1px solid rgba(255,255,255,.14); display: flex; align-items: flex-end; justify-content: flex-start; flex-shrink: 0; overflow: hidden; }
.lp-slide.has-photo { border-color: rgba(255,255,255,.3); }
.lp-slide-n { font-size: .5rem; font-weight: 700; color: rgba(255,255,255,.85); line-height: 1; padding: 1px 3px; background: rgba(0,0,0,.28); border-radius: 0 3px 0 3px; }
.lp-slide.more { width: auto; min-width: 22px; padding: 0 5px; background: transparent; border: none; color: var(--lp-dim); font-size: .62rem; font-weight: 600; align-items: center; justify-content: center; height: 33px; }
.lp-slides-n { font-size: .6rem; color: var(--lp-dim); margin-left: 2px; white-space: nowrap; }
.lp-pact { display: flex; gap: .35rem; align-items: center; }
/* bottoni NEUTRI: niente testi colorati. L'unico pieno è la "prossima" (brand). */
.lp-pbtn { flex: 1; padding: .3rem .6rem; border-radius: 6px; font-size: .72rem; font-weight: 600; border: 1px solid var(--border2); background: transparent; color: var(--text); cursor: pointer; font-family: inherit; }
.lp-pbtn:hover { background: var(--lp-brand-soft); border-color: var(--lp-brand-mid); }
.lp-pbtn.apri { color: var(--muted); font-weight: 500; }
.lp-pbtn.filled { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.lp-pbtn:disabled { opacity: .55; cursor: default; }
/* unico verde rimasto: è un DATO (metriche reali) */
.lp-pchip-ris { font-size: .6rem; color: var(--green); padding: .15rem .4rem; background: var(--lp-green-soft); border-radius: 4px; white-space: nowrap; }
.lp-pchip-data { font-size: .6rem; color: var(--muted); white-space: nowrap; }

/* dettaglio espanso dentro la card (click) */
.lp-pexp { display: none; border-top: 1px solid var(--border); margin-top: .5rem; padding-top: .5rem; }
.lp-pcard.open .lp-pexp { display: block; }
.lp-pexp-text { font-size: .73rem; color: var(--muted); line-height: 1.6; white-space: pre-wrap; margin-bottom: .5rem; max-height: 180px; overflow: auto; }
.lp-pexp-actions { display: flex; gap: .3rem; flex-wrap: wrap; }
.lp-ebtn { padding: .22rem .55rem; border-radius: 5px; font-size: .68rem; border: 1px solid var(--border2); color: var(--muted); background: transparent; cursor: pointer; font-family: inherit; }
.lp-ebtn:hover { color: var(--text); }
.lp-ebtn.danger:hover { color: #f87171; border-color: rgba(248,113,113,.3); }

/* ── Banner revisione (la revisione vive in Programmazione, sul mese intero) ── */
.lp-review-banner { display: flex; align-items: center; gap: .8rem; margin-top: 1.4rem; background: var(--card); border: 1px dashed var(--border2); border-radius: 12px; padding: .8rem 1rem; }
.lp-rb-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--surface2); display: flex; align-items: center; justify-content: center; color: var(--muted); flex-shrink: 0; font-size: .9rem; }
.lp-rb-text { flex: 1; font-size: .76rem; color: var(--muted); line-height: 1.5; }
.lp-rb-text b { color: var(--text); }
.lp-rb-btn { background: transparent; border: 1px solid var(--border2); color: var(--text); border-radius: 8px; padding: .4rem .9rem; font-size: .75rem; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }

@media (max-width: 860px) { .lp-pipeline { grid-template-columns: 1fr; } .lp-ctx.week { min-width: 100%; } }
