  :root {
    --blu-primario: #1d6ee8;
    --blu-primario-hover: #1856bd;
    --blu-scuro: #0c2e5c;
    --blu-medio: #1c5ba6;
    --blu-chiaro: #5da9f0;
    --blu-tenue: #e8f1fc;
    --blu-bg-1: #1759a6;
    --blu-bg-2: #2d7bc8;
    --testo: #2c3e50;
    --testo-soft: #5a6a7a;
    --bordo: #e3e8ef;
    --card-bg: #ffffff;
  }
  
  .assistente-toggle {
    position: fixed;
    bottom: 28px;
    right: 28px;
    height: 56px;
    padding: 0 22px 0 18px;
    border-radius: 28px;
    background: var(--blu-primario);
    color: white;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(29,110,232,0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
  }
  .assistente-toggle:hover {
    background: var(--blu-primario-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(29,110,232,0.55);
  }
  .assistente-toggle .icona-chat {
    font-size: 22px;
  }

  .assistente-panel {
    position: fixed;
    bottom: 100px;
    right: 28px;
    width: 400px;
    max-width: calc(100vw - 56px);
    height: 580px;
    max-height: calc(100vh - 140px);
    background: white;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(12,46,92,0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    border: 1px solid var(--bordo);
  }
  .assistente-panel.aperto {
    display: flex;
    animation: slideUp 0.22s ease-out;
  }
  @keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .assistente-header {
    background: linear-gradient(135deg, var(--blu-medio) 0%, var(--blu-primario) 100%);
    color: white;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .assistente-header .titolo-blocco h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.2px;
  }
  .assistente-header .sottotitolo {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 3px;
  }
  .chiudi-btn {
    background: rgba(255,255,255,0.15);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s;
  }
  .chiudi-btn:hover { background: rgba(255,255,255,0.25); }

  .ricerca-box {
    padding: 14px;
    border-bottom: 1px solid var(--bordo);
    background: #fafbfd;
  }
  .ricerca-box input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--bordo);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: white;
    font-family: inherit;
  }
  .ricerca-box input:focus {
    border-color: var(--blu-primario);
    box-shadow: 0 0 0 3px rgba(29,110,232,0.15);
  }

  .contenuto {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: white;
  }
  .contenuto::-webkit-scrollbar { width: 8px; }
  .contenuto::-webkit-scrollbar-thumb { background: #d6dde6; border-radius: 4px; }

  .breadcrumb {
    font-size: 12px;
    color: var(--testo-soft);
    margin-bottom: 10px;
    cursor: pointer;
    display: inline-block;
    padding: 4px 0;
  }
  .breadcrumb:hover { color: var(--blu-primario); }

  .intro-text {
    font-size: 13px;
    color: var(--testo-soft);
    margin-bottom: 14px;
    line-height: 1.5;
  }

  .categoria-card, .caso-card {
    background: white;
    border: 1px solid var(--bordo);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.15s;
  }
  .categoria-card:hover, .caso-card:hover {
    border-color: var(--blu-primario);
    background: var(--blu-tenue);
    transform: translateX(2px);
  }

  .categoria-card .icona {
    font-size: 24px;
    margin-right: 10px;
    vertical-align: middle;
  }
  .categoria-card .titolo {
    font-weight: 600;
    font-size: 14px;
    color: var(--blu-scuro);
    vertical-align: middle;
  }
  .categoria-card .descr {
    font-size: 12px;
    color: var(--testo-soft);
    margin-top: 6px;
    line-height: 1.4;
  }

  .caso-card {
    font-size: 13px;
    color: var(--testo);
    line-height: 1.45;
  }

  .titolo-categoria {
    font-size: 15px;
    color: var(--blu-scuro);
    margin: 6px 0 14px 0;
    font-weight: 600;
  }

  .risposta-titolo {
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--blu-scuro);
    font-size: 14px;
    line-height: 1.4;
  }
  .risposta-box {
    background: var(--blu-tenue);
    border-left: 3px solid var(--blu-primario);
    padding: 14px 16px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--testo);
  }

  .nessun-risultato {
    text-align: center;
    color: var(--testo-soft);
    font-size: 13px;
    padding: 30px 16px;
    line-height: 1.6;
  }
  .nessun-risultato a { color: var(--blu-primario); }

  .footer-feedback {
    border-top: 1px solid var(--bordo);
    padding: 12px 14px;
    font-size: 12px;
    color: var(--testo-soft);
    text-align: center;
    margin-top: 14px;
  }
  .footer-feedback button {
    background: white;
    border: 1px solid var(--bordo);
    border-radius: 6px;
    padding: 5px 14px;
    margin: 0 4px;
    cursor: pointer;
    font-size: 12px;
    color: var(--testo);
    transition: all 0.15s;
    font-family: inherit;
  }
  .footer-feedback button:hover {
    background: var(--blu-tenue);
    border-color: var(--blu-primario);
    color: var(--blu-primario);
  }
  
  @media (max-width: 768px) {
    .portale-body {
      grid-template-columns: 1fr;
      padding: 36px 28px;
    }
    .illustrazione { font-size: 70px; }
    .assistente-panel {
      right: 12px;
      left: 12px;
      width: auto;
      bottom: 90px;
    }
    .assistente-toggle {
      right: 16px;
      bottom: 16px;
    }
  }