*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: 'Inter', sans-serif; background: #F4F6FB; color: #062B6F; }

/* ── LAYOUT ── */
.layout { display: flex; height: 100vh; overflow: hidden; }

/* ── SIDEBAR ── */
.sidebar {
  width: 224px; flex-shrink: 0;
  background: #fff; border-right: 1px solid #D8E3F5;
  padding: 0 14px; display: flex; flex-direction: column;
  gap: 4px; overflow-y: auto;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 4px 16px; flex-shrink: 0;
}
.logo-icon {
  width: 36px; height: 36px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
}
.logo-img-crop {
  width: 160%; height: 80%;
  object-fit: cover;
  object-position: center 10%;
  margin-left: -30%;
  margin-top: 0;
}
.logo-name {
  font-family: 'Manrope', sans-serif;
  font-size: 17px; font-weight: 800;
  color: #062B6F; letter-spacing: 2px;
  line-height: 1;
}

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px; border-radius: 9px;
  font-size: 13px; color: #4A5568;
  text-decoration: none; transition: all .15s; cursor: pointer;
}
.nav-item:hover { background: #F0F4FF; color: #062B6F; }
.nav-item.active { background: #EBF3FF; color: #062B6F; font-weight: 500; }
.nav-item.star.active { background: #FFF8E6; color: #7A5A00; }
.nav-item.star.active i { color: #F6C54B; }
.nav-item i { font-size: 17px; flex-shrink: 0; }
.nav-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2E83FF; margin-left: auto; flex-shrink: 0;
  display: none;
}
.nav-dot.visible { display: block; }

/* ── CANDIDATURA PENDENTE ── */
.pending-banner {
  background: #EBF3FF; border: 1px solid #A8CEFF;
  border-radius: 12px; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.pending-banner-text { font-size: 13px; color: #062B6F; line-height: 1.5; }
.pending-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
.nav-divider { height: 1px; background: #D8E3F5; margin: 6px 0; border: none; }

.sidebar-bottom { margin-top: auto; padding: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.profile-chip { background: #F0F4FF; border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.chip-label { font-size: 10px; color: #7A8499; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 2px; }
.chip-name  { font-size: 13px; font-weight: 500; color: #062B6F; }
.chip-sub   { font-size: 11px; color: #7A8499; margin-top: 1px; }
.profile-select {
  width: 100%; padding: 7px 10px; border-radius: 8px;
  border: 1px solid #D8E3F5; background: #fff;
  font-size: 13px; color: #062B6F; cursor: pointer;
}

/* ── MAIN ── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.screen { display: none; flex-direction: column; height: 100%; overflow: hidden; }
.screen.active { display: flex; }

.topbar {
  background: #fff; border-bottom: 1px solid #D8E3F5;
  padding: 14px 24px; display: flex; align-items: center;
  justify-content: space-between; flex-shrink: 0;
}
.page-title { font-family: 'Manrope', sans-serif; font-size: 17px; font-weight: 800; color: #062B6F; }
.page-sub   { font-size: 12px; color: #7A8499; margin-top: 2px; }

.content { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }

/* ── BUTTONS ── */
.btn-gold {
  background: #F6C54B; color: #062B6F; border: none;
  border-radius: 8px; padding: 8px 16px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s;
}
.btn-gold:hover { background: #e8b530; }
.btn-primary {
  background: #062B6F; color: #fff; border: none;
  border-radius: 8px; padding: 8px 16px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { background: #041F52; }
.btn-outline {
  background: #fff; color: #062B6F;
  border: 1px solid #D8E3F5; border-radius: 8px;
  padding: 7px 14px; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-outline:hover { border-color: #2E83FF; color: #2E83FF; }
.btn-sm {
  padding: 5px 11px; font-size: 12px; border-radius: 7px;
}

/* ── SEARCH BAR ── */
.search-bar { display: flex; flex-direction: column; gap: 8px; }
.search-bar > *:first-child { display: flex; gap: 8px; align-items: center; }
.search-input {
  flex: 1; padding: 9px 12px; border-radius: 8px;
  border: 1px solid #D8E3F5; font-size: 13px; color: #062B6F;
  background: #fff; outline: none;
}
.search-input:focus { border-color: #2E83FF; }
.search-input.small { max-width: 140px; }
.filter-row { display: flex; align-items: center; gap: 10px; }
.filter-label { font-size: 12px; color: #7A8499; white-space: nowrap; }
.slider { flex: 1; max-width: 120px; accent-color: #2E83FF; }
.slider-val { font-size: 12px; font-weight: 500; color: #062B6F; min-width: 24px; }

/* ── FILTER PANEL ── */
.filter-panel { display: flex; flex-direction: column; gap: 10px; }
.filter-geo-row { display: flex; align-items: center; gap: 8px; }
.filter-geo-row .geo-label { font-size: 12px; color: #1A7A4A; flex: 1; }
.filter-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-group {
  display: flex; align-items: center; gap: 7px;
  background: #F4F6FB; border: 1px solid #D8E3F5;
  border-radius: 9px; padding: 6px 10px;
}
.filter-group .fg-label { font-size: 11px; color: #7A8499; white-space: nowrap; font-weight: 500; }
.filter-group .fg-unit  { font-size: 11px; color: #7A8499; }
.filter-group input[type=number] {
  width: 36px; border: none; background: transparent;
  font-size: 13px; font-weight: 600; color: #062B6F;
  text-align: center; outline: none;
  -moz-appearance: textfield;
}
.filter-group input[type=number]::-webkit-outer-spin-button,
.filter-group input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
.filter-group input[type=range] { width: 55px; accent-color: #2E83FF; cursor: pointer; }
.filter-select {
  padding: 7px 10px; border-radius: 8px; border: 1px solid #D8E3F5;
  font-size: 12px; color: #062B6F; background: #fff; cursor: pointer;
}

/* ── METRICS ── */
.metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.metric  { background: #fff; border: 1px solid #D8E3F5; border-radius: 11px; padding: 13px 15px; }
.metric .val { font-family: 'Manrope', sans-serif; font-size: 22px; font-weight: 800; color: #062B6F; line-height: 1; }
.metric .lbl { font-size: 10px; color: #7A8499; text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }
.metric.blue  .val { color: #2E83FF; }
.metric.gold  .val { color: #7A5A00; }
.metric.green .val { color: #1A7A4A; }

/* ── INSIGHT ── */
.insight {
  background: #FFFCF0; border: 1px solid #F6C54B;
  border-radius: 10px; padding: 12px 15px;
  display: flex; gap: 10px; align-items: flex-start;
}
.insight-dot { width: 8px; height: 8px; min-width: 8px; background: #F6C54B; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.insight-text { font-size: 12px; color: #4A5568; line-height: 1.55; }
.insight-text strong { color: #062B6F; font-weight: 500; }

/* ── CARDS ── */
.card {
  background: #fff; border: 1px solid #D8E3F5;
  border-radius: 11px; padding: 13px 15px;
  transition: border-color .15s;
}
.card:hover { border-color: #2E83FF; cursor: pointer; }
.card-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-left { flex: 1; min-width: 0; }
.card-title {
  font-family: 'Manrope', sans-serif; font-size: 13.5px; font-weight: 800;
  color: #062B6F; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-meta { font-size: 11px; color: #7A8499; margin-top: 3px; }
.card-tags { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.card-explain { padding: 6px 0 4px; display: flex; flex-direction: column; gap: 3px; }
.card-explain-line { font-size: 11.5px; color: #4A5568; }

.score { min-width: 52px; text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; }
.score-num { font-family: 'Manrope', sans-serif; font-size: 18px; font-weight: 800; line-height: 1; }
.score-lbl { font-size: 9px; text-transform: uppercase; letter-spacing: .4px; margin-top: 2px; }
.s-high .score-num { color: #1A7A4A; } .s-high .score-lbl { color: #4AB87A; }
.s-mid  .score-num { color: #2E83FF; } .s-mid  .score-lbl { color: #6AAEFF; }
.s-med  .score-num { color: #C45E08; } .s-med  .score-lbl { color: #E0834A; }
.s-low  .score-num { color: #C0392B; } .s-low  .score-lbl { color: #E07070; }

/* ── TAGS / BADGES ── */
.tag {
  font-size: 11px; padding: 2px 8px; border-radius: 20px;
  border: 1px solid transparent; display: inline-block;
}
.tag-match  { background: #EBF3FF; color: #1A5FCC; border-color: #A8CEFF; }
.tag-gap    { background: #FFF8E6; color: #7A5A00; border-color: #F6C54B; }
.tag-src    { background: #F4F6FB; color: #7A8499; border-color: #D8E3F5; }
.tag-status { background: #F0F4FF; color: #062B6F; border-color: #C0CFEE; }
.tag-excl   { background: #FFF0F0; color: #C0392B; border-color: #FFB3B3; }
.tag-high   { background: #EDFBF3; color: #1A7A4A; border-color: #7DDCA8; }
.tag-mid    { background: #EBF3FF; color: #2E83FF; border-color: #A8CEFF; }
.tag-med    { background: #FFF3EC; color: #C45E08; border-color: #F0A870; }
.tag-low    { background: #FFF0F0; color: #C0392B; border-color: #FFB3B3; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(6,43,111,.35);
  display: none; align-items: center; justify-content: center; z-index: 100;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 14px; width: 580px; max-height: 85vh;
  overflow-y: auto; padding: 24px; box-shadow: 0 8px 40px rgba(6,43,111,.18);
}
.modal-title { font-family: 'Manrope', sans-serif; font-size: 16px; font-weight: 800; color: #062B6F; margin-bottom: 16px; }
.modal-section { margin-bottom: 14px; }
.modal-label { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: #7A8499; margin-bottom: 6px; }
.modal-close { float: right; background: none; border: none; font-size: 20px; cursor: pointer; color: #7A8499; }

/* ── TRACKER ── */
.tracker-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.tracker-list  { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.tracker-item  { background: #fff; border: 1px solid #D8E3F5; border-radius: 11px; padding: 13px 15px; }
.tracker-item-header { display: flex; justify-content: space-between; align-items: center; }
.tracker-item-title  { font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 700; color: #062B6F; }
.tracker-item-meta   { font-size: 11px; color: #7A8499; margin-top: 2px; }
.tracker-offerta     { border-color: #F6C54B; background: #FFFDF0; }
.cal-upcoming        { border-color: #A8CEFF; background: #F5F9FF; }
.offerta-crown       { font-size: 15px; margin-right: 4px; }
.card-rifiutato      { opacity: .72; border-color: #FFB3B3; }
.esito-btns { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.esito-btn {
  padding: 4px 12px; border-radius: 20px; font-size: 12px; cursor: pointer;
  border: 1px solid #D8E3F5; background: #F4F6FB; color: #4A5568;
  transition: all .15s;
}
.esito-btn.active { background: #EBF3FF; color: #062B6F; border-color: #A8CEFF; font-weight: 500; }
.esito-btn:hover  { border-color: #2E83FF; color: #2E83FF; }

/* ── DIRECTION HERO ── */
.dir-hero {
  background: linear-gradient(135deg, #062B6F 0%, #1A4DB5 100%);
  border-radius: 12px; padding: 20px 24px; color: #fff;
  display: flex; justify-content: space-between; align-items: center;
}
.dir-hero-left .hero-label { font-size: 10px; text-transform: uppercase; letter-spacing: .8px; color: rgba(255,255,255,.6); margin-bottom: 6px; }
.dir-hero-left .hero-name  { font-family: 'Manrope', sans-serif; font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 3px; }
.dir-hero-left .hero-sub   { font-size: 12px; color: rgba(255,255,255,.65); }
.dir-hero-right .compat-val{ font-family: 'Manrope', sans-serif; font-size: 2.5rem; font-weight: 800; color: #F6C54B; line-height: 1; text-align: right; }
.dir-hero-right .compat-lbl{ font-size: 10px; color: rgba(255,255,255,.6); margin-top: 2px; text-align: right; }

/* ── PROFILO ── */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.skill-cloud  { display: flex; flex-wrap: wrap; gap: 6px; }
.section-label { font-family: 'Manrope', sans-serif; font-size: 11px; font-weight: 700; color: #062B6F; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; }

/* ── MARKET INSIGHTS ── */
.insights-meta { font-size: 11px; color: #7A8499; margin-bottom: 14px; }
.insights-meta strong { color: #062B6F; }

.ins-bar-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 7px;
}
.ins-bar-label { font-size: 12px; color: #2C3E60; min-width: 170px; flex-shrink: 0; }
.ins-bar-track {
  flex: 1; height: 7px; background: #EDF1FA; border-radius: 4px; overflow: hidden;
}
.ins-bar-fill  { height: 100%; border-radius: 4px; background: #2E83FF;
                 transition: width .4s ease; }
.ins-bar-fill.gap { background: #E0834A; }
.ins-bar-pct   { font-size: 11px; font-weight: 600; color: #7A8499; min-width: 30px; text-align: right; }

.skill-gap-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px;
}
.skill-gap-col-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 8px;
}
.skill-gap-col-title.ok  { color: #1A7A4A; }
.skill-gap-col-title.gap { color: #C45E08; }
.skill-gap-item {
  font-size: 12px; color: #2C3E60; padding: 3px 0;
  display: flex; align-items: center; gap: 5px;
}
.skill-gap-item .pct-badge {
  font-size: 10px; color: #7A8499; background: #F4F6FB;
  border-radius: 4px; padding: 1px 5px;
}

.top-titles-list { list-style: none; padding: 0; margin: 0; }
.top-titles-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; border-bottom: 1px solid #F0F4FA;
  font-size: 13px; color: #2C3E60;
}
.top-titles-list li:last-child { border-bottom: none; }
.top-titles-rank { font-size: 11px; color: #7A8499; min-width: 16px; text-align: right; }
.top-titles-count { margin-left: auto; font-size: 11px; color: #7A8499; }

/* ── UTILS ── */
.loading    { text-align: center; padding: 3rem; color: #7A8499; font-size: 13px; }
.empty-state{ text-align: center; padding: 3rem; color: #7A8499; font-size: 13px; }
.divider    { height: 1px; background: #D8E3F5; margin: 10px 0; }
.text-muted { color: #7A8499; font-size: 12px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; }

/* ── ANALISI CV ── */
.cv-upload-area {
  border: 2px dashed #D8E3F5; border-radius: 12px;
  padding: 40px 24px; text-align: center;
  cursor: pointer; transition: all .2s; background: #fff;
}
.cv-upload-area:hover, .cv-upload-area.dragover {
  border-color: #2E83FF; background: #EBF3FF;
}
.cv-upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.cv-upload-title { font-family: 'Manrope', sans-serif; font-size: 15px; font-weight: 700; color: #062B6F; margin-bottom: 6px; }
.cv-upload-sub   { font-size: 12px; color: #7A8499; }

.cv-file-info {
  display: flex; align-items: center; justify-content: space-between;
  background: #F0F4FF; border: 1px solid #D8E3F5; border-radius: 9px;
  padding: 10px 14px;
}
.cv-file-name { font-size: 13px; color: #062B6F; font-weight: 500; }

.cv-loading {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #D8E3F5; border-radius: 10px;
  padding: 16px 20px;
}
.cv-loading-spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid #D8E3F5; border-top-color: #2E83FF;
  animation: spin .7s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.cv-loading-text { font-size: 13px; color: #4A5568; }

.cv-error {
  background: #FFF0F0; border: 1px solid #FFB3B3; border-radius: 10px;
  padding: 12px 15px; font-size: 13px; color: #C0392B;
}

.cv-result-title    { font-family: 'Manrope', sans-serif; font-size: 16px; font-weight: 800; color: #062B6F; }
.cv-result-seniority{ font-size: 12px; color: #7A8499; margin-top: 2px; margin-bottom: 8px; }
.cv-summary         { font-size: 13px; color: #4A5568; line-height: 1.6; margin-top: 8px; }
.cv-result-badge {
  background: #EBF3FF; color: #1A5FCC; border: 1px solid #A8CEFF;
  border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 600;
  flex-shrink: 0; white-space: nowrap;
}

/* ── CV warning banner livello 2/3 ── */
.cv-warning {
  padding: 10px 14px; border-radius: 9px;
  font-size: 13px; font-weight: 500; margin-bottom: 12px;
}
.cv-warning-yellow  { background: #FFFBEB; border: 1px solid #F6C54B; color: #92610A; }
.cv-warning-orange  { background: #FFF4EC; border: 1px solid #F97316; color: #9A3412; }

/* ── RADAR METRICS ── */
.radar-metric {
  background: #F4F6FB; border-radius: 8px; padding: 8px 4px;
  text-align: center; border: 1px solid #E2E8F4;
}
.radar-metric.rm-gold { background: #FFFBEB; border-color: #F6C54B; }
.rm-val { font-family: 'Manrope', sans-serif; font-size: 18px; font-weight: 800; color: #062B6F; }
.rm-gold .rm-val { color: #92610A; }
.rm-lbl { font-size: 9px; color: #7A8499; margin-top: 2px; text-transform: uppercase; letter-spacing: .4px; }

/* ── Profile editor tags ── */
.pe-tag {
  cursor: pointer; transition: opacity .15s;
}
.pe-tag:hover { opacity: .7; }

/* ── AI analysis badges ── */
.ai-summary { font-size:13px; color:#1A3A6A; font-style:italic; margin-bottom:4px; }
.ai-fit     { font-size:11px; color:#1A7A4A; background:#F0FFF4; border-radius:4px;
              padding:2px 6px; margin-right:4px; display:inline-block; margin-bottom:2px; }
.ai-gap     { font-size:11px; color:#92610A; background:#FFFBEB; border-radius:4px;
              padding:2px 6px; margin-right:4px; display:inline-block; margin-bottom:2px; }
.ai-flag    { font-size:11px; color:#C0392B; background:#FFF0F0; border-radius:4px;
              padding:2px 6px; margin-right:4px; display:inline-block; margin-bottom:2px; }

/* ── IMPOSTAZIONI ── */
.settings-group {
  background: #fff; border: 1px solid #D8E3F5;
  border-radius: 12px; overflow: hidden; margin-bottom: 12px;
  flex-shrink: 0;
}
.settings-group-title {
  font-family: 'Manrope', sans-serif; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px; color: #7A8499;
  padding: 14px 18px 8px;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px; border-top: 1px solid #F0F4FA;
  gap: 16px;
}
.settings-row:first-of-type { border-top: none; }
.settings-row-label { font-size: 13px; color: #062B6F; flex: 1; }
.settings-row-value { font-size: 13px; color: #7A8499; }
.settings-row-hint  { font-size: 11px; color: #B0B8C9; margin-top: 2px; }
.settings-input {
  flex: 1; max-width: 240px; padding: 7px 11px;
  border: 1px solid #D8E3F5; border-radius: 8px;
  font-size: 13px; color: #062B6F; background: #F8FAFF; outline: none;
}
.settings-input:focus { border-color: #2E83FF; background: #fff; }
.settings-select {
  padding: 7px 10px; border: 1px solid #D8E3F5; border-radius: 8px;
  font-size: 13px; color: #062B6F; background: #F8FAFF; outline: none; cursor: pointer;
}
.settings-action {
  font-size: 13px; color: #2E83FF; cursor: pointer;
  background: none; border: none; padding: 0; font-family: inherit;
}
.settings-action:hover { text-decoration: underline; }
.settings-action.danger { color: #C0392B; }
.settings-badge {
  font-size: 11px; font-weight: 600; padding: 3px 9px;
  border-radius: 20px; border: 1px solid transparent;
}
.settings-badge.beta { background: #EBF3FF; color: #1A5FCC; border-color: #A8CEFF; }
.settings-badge.active { background: #EDFBF3; color: #1A7A4A; border-color: #7DDCA8; }

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: #D8E3F5; border-radius: 22px;
  cursor: pointer; transition: background .2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; left: 3px; top: 3px;
  transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.toggle input:checked + .toggle-slider { background: #2E83FF; }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Elimina account flow */
.delete-flow { padding: 14px 18px; border-top: 1px solid #F0F4FA; }
.delete-radio-group { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.delete-radio-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: #062B6F; cursor: pointer;
  padding: 8px 12px; border-radius: 9px; border: 1px solid #D8E3F5;
  transition: border-color .15s, background .15s;
}
.delete-radio-item:hover { border-color: #A8CEFF; background: #F5F9FF; }
.delete-radio-item input[type=radio] { accent-color: #2E83FF; width: 15px; height: 15px; flex-shrink: 0; }
.delete-radio-item.selected { border-color: #2E83FF; background: #EBF3FF; }
.delete-sub { margin-top: 12px; }
.delete-sub-label { font-size: 12px; color: #7A8499; margin-bottom: 6px; }
.delete-textarea {
  width: 100%; min-height: 64px; padding: 9px 12px;
  border: 1px solid #D8E3F5; border-radius: 9px;
  font-size: 13px; font-family: inherit; resize: vertical;
  background: #F8FAFF; outline: none; color: #062B6F;
}
.delete-textarea:focus { border-color: #2E83FF; background: #fff; }

/* Piano placeholder */
.plan-card {
  background: linear-gradient(135deg, #062B6F 0%, #1A4DB5 100%);
  border-radius: 12px; padding: 20px 24px; color: #fff; margin-bottom: 12px;
  flex-shrink: 0;
}
.plan-name  { font-family: 'Manrope', sans-serif; font-size: 20px; font-weight: 800; }
.plan-sub   { font-size: 12px; color: rgba(255,255,255,.65); margin-top: 4px; }
.plan-badge { font-size: 11px; background: #F6C54B; color: #062B6F; font-weight: 700;
              border-radius: 20px; padding: 3px 10px; display: inline-block; margin-top: 10px; }

/* ── SICUREZZA ── */
.sec-banner {
  display: flex; align-items: flex-start; gap: 12px;
  background: #FFF8E6; border: 1px solid #F6C54B; border-radius: 12px;
  padding: 14px 18px; font-size: 13px; color: #7A5A00;
  flex-shrink: 0;
}
.sec-banner-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.sec-card {
  background: #fff; border: 1px solid #D8E3F5; border-radius: 12px;
  padding: 20px 22px; flex-shrink: 0;
}
.sec-card-warn  { border-color: #FFB3B3; background: #FFF8F8; }
.sec-card-alert { border-color: #F6C54B; background: #FFFBEC; }
.sec-card-title { font-family: 'Manrope', sans-serif; font-size: 14px; font-weight: 700; color: #062B6F; margin-bottom: 10px; }
.sec-card-text  { font-size: 13px; color: #4A5568; line-height: 1.6; margin-bottom: 8px; }
.sec-card-text:last-child { margin-bottom: 0; }
.sec-list { margin: 8px 0 0 18px; display: flex; flex-direction: column; gap: 4px; }
.sec-list li { font-size: 13px; color: #4A5568; line-height: 1.5; }

/* ── WELCOME PRINCIPLES OVERLAY ── */
#welcome-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(6,43,111,.55); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  padding: 20px;
}
.welcome-box {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 600px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(6,43,111,.25);
  overflow: hidden;
}
.welcome-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid #EDF1FA;
  flex-shrink: 0;
}
.welcome-logo  { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.welcome-title { font-family: 'Manrope', sans-serif; font-size: 20px; font-weight: 800; color: #062B6F; margin-bottom: 6px; }
.welcome-sub   { font-size: 13px; color: #7A8499; margin-bottom: 10px; }
.welcome-intro { font-size: 13px; color: #4A5568; line-height: 1.6; margin-bottom: 4px; }
.welcome-tagline { font-size: 13px; font-weight: 600; color: #2E83FF; font-style: italic; }

.welcome-scroll {
  flex: 1; overflow-y: auto; padding: 20px 32px;
  display: flex; flex-direction: column; gap: 14px;
}
.welcome-card {
  background: #F8FAFF; border: 1px solid #D8E3F5;
  border-radius: 12px; padding: 18px 20px;
}
.welcome-card p { font-size: 13px; color: #4A5568; line-height: 1.6; margin-bottom: 6px; }
.welcome-card p:last-child { margin-bottom: 0; }
.welcome-card-warn { background: #FFF8F8; border-color: #FFB3B3; }
.welcome-card-title { font-family: 'Manrope', sans-serif; font-size: 14px; font-weight: 700; color: #062B6F; margin-bottom: 10px; }
.welcome-list { margin: 8px 0 0 18px; display: flex; flex-direction: column; gap: 4px; }
.welcome-list li { font-size: 13px; color: #4A5568; line-height: 1.5; }

.welcome-footer {
  padding: 18px 32px; border-top: 1px solid #EDF1FA;
  display: flex; flex-direction: column; gap: 12px;
  flex-shrink: 0; background: #fff;
}
.welcome-check-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: #062B6F; cursor: pointer;
  opacity: .4; transition: opacity .3s;
}
.welcome-check-row input[type=checkbox] { width: 16px; height: 16px; accent-color: #2E83FF; flex-shrink: 0; cursor: pointer; }
.welcome-scroll-hint { font-size: 11px; color: #B0B8C9; text-align: center; }
#welcome-btn:disabled { opacity: .4; cursor: not-allowed; }
