/* Schede tecniche IA — dentro la candidatura pubblicata */
#view-schede {
  background: #050608;
  min-height: 100vh;
  color-scheme: dark;
}
#schede-portal.es-st {
  max-width: 1120px;
  margin: 0 auto;
  padding: 7.25rem 1.5rem 3.5rem;
  color: #e2e8f0;
}
.es-st-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #38bdf8;
}
.es-st-title,
body.layout-portfolio .es-st-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  font-weight: 800;
  color: #fff !important;
  text-transform: none !important;
  letter-spacing: -0.03em !important;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif !important;
}
.es-st-lead {
  margin: 0 0 0.85rem;
  color: #94a3b8;
  font-size: 0.94rem;
  line-height: 1.45;
  max-width: 46rem;
}
.es-st-note {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.08);
  color: #7dd3fc;
  font-size: 0.78rem;
  font-weight: 700;
}
.es-st-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}
.es-st-toolbar select,
body.layout-portfolio .es-st-toolbar select {
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  border-radius: 12px !important;
  background: rgba(15, 23, 42, 0.85) !important;
  color: #e2e8f0 !important;
  padding: 0.5rem 0.7rem !important;
  font: inherit;
  font-size: 0.85rem;
}
.es-st-btn,
.es-st-ghost {
  border-radius: 999px !important;
  padding: 0.48rem 0.9rem !important;
  font-weight: 800 !important;
  font-size: 0.8rem !important;
  cursor: pointer;
  text-transform: none !important;
}
.es-st-btn {
  border: 0 !important;
  background: linear-gradient(135deg, #0284c7, #38bdf8) !important;
  color: #041018 !important;
}
.es-st-ghost {
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  background: transparent !important;
  color: #7dd3fc !important;
}
.es-st-split {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
  align-items: start;
}

/* ---- UX Kanban Fase 4: Lista Schede Tecniche ---- */

/* Colonna sinistra: wrapping container per toolbar sticky + lista */
.es-st-list-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Toolbar sticky sopra la lista: count pill + collasso */
.es-st-hbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0 8px;
  background: rgba(12, 18, 32, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
  margin-bottom: 8px;
}

.es-st-hbar h4 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(148, 163, 184, 0.8);
}

/* Pill contatore schede */
.es-st-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--es-font);
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Pulsante collasso lista */
.es-st-toggle {
  background: none;
  border: none;
  color: rgba(148, 163, 184, 0.7);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}
.es-st-toggle:hover {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.08);
}
.es-st-toggle svg {
  display: block;
  transition: transform 0.2s ease;
}
.es-st-toggle[aria-expanded="false"] svg {
  transform: rotate(180deg);
}

/* Wrapper con fade-bottom mask */
.es-st-list-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
}
.es-st-list-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(to bottom, transparent, rgba(12, 18, 32, 0.95));
  border-radius: 0 0 8px 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.es-st-list-wrap.has-overflow::after {
  opacity: 1;
}

/* Lista vera con scroll interno capped */
.es-st-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 520px;
  overflow-y: auto;
  padding-bottom: 4px;
  /* Scrollbar sottile 4px */
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
}
.es-st-list::-webkit-scrollbar { width: 4px; }
.es-st-list::-webkit-scrollbar-track { background: transparent; }
.es-st-list::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 4px;
}

/* Stato collassato: lista nascosta con transizione */
.es-st-list.is-collapsed {
  max-height: 0;
  overflow: hidden;
}
.es-st-list-wrap.is-collapsed::after {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .es-st-toggle svg,
  .es-st-list-wrap::after,
  .es-st-list {
    transition: none;
  }
}

@media (max-width: 680px) {
  .es-st-list { max-height: 320px; }
}
.es-st-item {
  text-align: left;
  width: 100%;
  border: 1px solid rgba(56, 189, 248, 0.18);
  background: rgba(12, 18, 32, 0.82);
  border-radius: 14px;
  padding: 0.7rem 0.75rem;
  color: inherit;
  cursor: pointer;
}
.es-st-item.is-on {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
}
.es-st-item h3 {
  margin: 0;
  font-size: 0.95rem;
  color: #fff;
}
.es-st-item p {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
}
.es-st-match {
  float: right;
  font-size: 0.78rem;
  font-weight: 800;
  color: #86efac;
}
.es-st-st {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7dd3fc;
}
.es-st-st.shortlist { color: #fde68a; }
.es-st-st.scartata { color: #f87171; }
.es-st-sheet {
  background: rgba(12, 18, 32, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 18px;
  padding: 1.1rem 1.15rem 1.25rem;
}
.es-st-sheet h2 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  color: #fff;
}
.es-st-ai-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #38bdf8;
}
.es-st-hero {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 0.85rem;
}
.es-st-ava {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #7dd3fc;
}
.es-st-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.es-st-ai {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.35rem;
}
.es-st-ai p { margin: 0; color: #e2e8f0; font-size: 0.9rem; }
.es-st-ai-sub {
  margin: 0.65rem 0 0.25rem !important;
  font-size: 0.72rem !important;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dd3fc !important;
}
.es-st-src-banner {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  background: transparent;
}
.es-st-src-banner.es-st-src-ia {
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}
.es-st-src-banner.es-st-src-club {
  border-color: rgba(125, 211, 252, 0.35);
  color: #bae6fd;
}
.es-st-locked { color: #fbbf24 !important; }
.es-st-media {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.es-st-media-item {
  min-width: 88px;
  min-height: 56px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #7dd3fc;
  padding: 0.45rem 0.6rem;
}
.es-st-media-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.es-st-media-item.is-video { color: #fde68a; }
.es-st-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1.1rem;
  margin-top: 0.9rem;
}
.es-st-block h4 {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #38bdf8;
}
.es-st-block p, .es-st-block ul {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.45;
}
.es-st-block ul { padding-left: 1.1rem; }
.es-st-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  overflow: hidden;
  margin-top: 0.35rem;
}
.es-st-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #4ade80);
}
.es-st-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}
.es-st-compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.es-st-compare .es-st-sheet { padding: 0.85rem; }
.es-st-empty {
  text-align: center;
  color: #94a3b8;
  padding: 2rem 1rem;
}
.pf-job-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: stretch;
}
.pf-job-actions .pf-job-cta { width: 100%; }
@media (max-width: 860px) {
  .es-st-split,
  .es-st-grid,
  .es-st-compare { grid-template-columns: 1fr; }
  .es-st-list { max-height: none; }
}

.es-pub-card {
  max-width: 740px !important;
  width: calc(100% - 1.5rem);
  max-height: 90vh;
  overflow: auto;
  text-align: left;
  padding: 1.4rem 1.35rem 1.5rem;
}
.es-pub-card h3 {
  font-size: 1.35rem;
  color: #fff;
  margin: 0 0 0.45rem;
}
.es-pub-intro {
  color: #94a3b8;
  font-size: 0.88rem;
  margin: 0 0 1rem;
  line-height: 1.5;
}
.es-pub-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.es-pub-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 0.65rem;
}
.es-pub-box {
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 14px;
  padding: 0.85rem 0.9rem 0.35rem;
  margin: 0.85rem 0 1rem;
  background: rgba(12, 18, 32, 0.45);
}
.es-pub-box legend {
  padding: 0 0.4rem;
  color: #7dd3fc;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.es-pub-hint {
  margin: 0 0 0.75rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 500;
}
.es-pub-ai {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0.4rem 0 1.1rem;
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
}
.es-pub-ai input { margin-top: 0.2rem; accent-color: #38bdf8; }
.es-pub-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}
.pf-job-offer, .pf-job-req {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #94a3b8;
}
.pf-job-ai {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fde68a;
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
}
@media (max-width: 620px) {
  .es-pub-grid2 { grid-template-columns: 1fr; }
}

.es-st-ia-overlay {
  position: fixed;
  inset: 0;
  z-index: 120000;
  background: rgba(5, 6, 8, 0.72);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 16px 24px;
  overflow: auto;
}
.es-st-ia-dialog {
  width: min(880px, 100%);
  background: #0b0e14;
  border: 1px solid #1e2430;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.es-st-ia-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.es-st-ia-bar strong {
  display: block;
  color: #eef1f6;
  font-size: 0.95rem;
  font-weight: 600;
}
.es-st-ia-body {
  padding: 8px 16px 20px;
}
.es-st-ia-body .es-st-sheet {
  max-width: none;
}
.es-st-export-note {
  margin: 0 0 10px;
  color: #8a93a3;
  font-size: 0.75rem;
}
.es-st-sec {
  margin: 1.25rem 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #38bdf8;
}
.es-st-kvgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}
.es-st-kv span {
  display: block;
  font-size: 0.68rem;
  color: #8a93a3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.es-st-kv b {
  color: #eef1f6;
  font-size: 0.88rem;
  font-weight: 600;
}
.es-st-status {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}
.es-st-status.is-free { color: #fbbf24; background: rgba(245, 158, 11, 0.12); }
.es-st-status.is-contract { color: #4ade80; background: rgba(74, 222, 128, 0.12); }
.es-st-status.is-loan { color: #38bdf8; background: rgba(56, 189, 248, 0.12); }
.es-st-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.es-st-badges span {
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.08);
  color: #7dd3fc;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
}
.es-st-sat { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 8px; align-items: center; margin: 6px 0; color: #cbd5e1; font-size: 0.8rem; }
.es-st-heat { background: #0b0e14; border: 1px solid #1e2430; border-radius: 8px; padding: 12px 14px; color: #cbd5e1; font-size: 0.84rem; line-height: 1.5; }
.es-st-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; margin: 8px 0 4px; }
.es-st-table th, .es-st-table td { border-bottom: 1px solid #1e2430; padding: 7px 8px; text-align: left; color: #cbd5e1; }
.es-st-table th { color: #8a93a3; font-weight: 600; }
.es-st-tot td { color: #eef1f6; font-weight: 700; }
.es-st-export-row { margin-top: 16px; }
@media (max-width: 720px) {
  .es-st-kvgrid, .es-st-sat { grid-template-columns: 1fr; }
}
@media print {
  .es-st-ia-overlay { position: static; background: #fff; padding: 0; }
  .es-st-ia-bar, .es-st-export-row, .es-pro-sidebar, header, footer { display: none !important; }
  .es-st-sheet { background: #fff; color: #111; border: 0; }
  .es-st-kv b, .es-st-sheet h2, .es-st-table td { color: #111 !important; }
}
