.valutazione-container { max-width: 1200px; margin: 0 auto; }
.valutazione-header h4 { color: #5cb85c; font-weight: 600; }
.search-tools-compact { max-width: 400px; margin: 0 auto; }
.search-tools-compact .input-group-text { background: #5cb85c; color: white; border-color: #5cb85c; }
.search-tools-compact .form-control:focus { border-color: #5cb85c; box-shadow: 0 0 0 0.2rem rgba(92,184,92,0.25); }
.stats-row .stat-card { background: white; padding: 1.5rem; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); text-align: center; border: 1px solid #e9ecef; transition: transform 0.3s ease; }
.stats-row .stat-card:hover { transform: translateY(-2px); }
.stat-number { font-size: 1.8rem; font-weight: bold; color: #5cb85c; margin-bottom: 0.25rem; }
.stat-label { color: #6c757d; font-size: 0.85rem; font-weight: 500; }
.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px,1fr)); gap: 1.5rem; margin-top: 2rem; }
.category-card { background: white; border-radius: 12px; padding: 1.5rem; box-shadow: 0 4px 20px rgba(0,0,0,0.08); border: 1px solid #e9ecef; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; opacity: 0; animation: fadeInUp 0.6s ease forwards; }
.category-card:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(0,0,0,0.15); border-color: #5cb85c; }
.category-card::before { content: ''; position: absolute; top:0; left:0; right:0; height:4px; background: linear-gradient(90deg,#5cb85c,#449d44); transform: scaleX(0); transition: transform 0.3s ease; }
.category-card:hover::before { transform: scaleX(1); }
.category-header { display:flex; align-items:flex-start; margin-bottom:1rem; }
.category-icon { font-size:2rem; margin-right:1rem; flex-shrink:0; }
.category-info { flex-grow:1; }
.category-info h5 { margin:0; color:#333; font-weight:600; font-size:1.2rem; }
.category-info small { color:#6c757d; font-size:0.85rem; }
.category-status { flex-shrink:0; }
.category-description { color:#666; font-size:0.9rem; line-height:1.5; margin-bottom:1rem; }
.category-tools { display:flex; flex-wrap:wrap; gap:0.5rem; }
.tool-badge { background:#f8f9fa; color:#6c757d; padding:0.25rem 0.75rem; border-radius:15px; font-size:0.75rem; font-weight:500; border:1px solid #e9ecef; }
.tool-badge.available { background:#d4edda; color:#155724; border-color:#c3e6cb; }
.back-to-categories { text-align:center; margin:2rem 0; }

/* Category Detail Styles */
.category-detail { animation: fadeInUp 0.5s ease; }
.category-detail-header { background: linear-gradient(135deg,#5cb85c,#449d44); color:white; padding:2rem; border-radius:12px; margin-bottom:2rem; text-align:center; }
.tools-detail-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap:1.5rem; }
.tool-detail-card { background:white; border-radius:12px; padding:1.5rem; box-shadow:0 4px 20px rgba(0,0,0,0.08); border:1px solid #e9ecef; transition: all 0.3s ease; cursor:pointer; }
.tool-detail-card:hover { transform: translateY(-3px); box-shadow:0 6px 25px rgba(0,0,0,0.12); border-color:#5cb85c; }
.tool-detail-header { display:flex; align-items:center; margin-bottom:1rem; }
.tool-detail-icon { width:50px; height:50px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:1.2rem; color:white; margin-right:1rem; font-weight:bold; background: linear-gradient(135deg,#5cb85c,#449d44); }
.tool-detail-info h5 { margin:0; color:#333; font-weight:600; }
.tool-detail-subtitle { color:#6c757d; font-size:0.85rem; margin-top:0.25rem; }
.tool-detail-description { color:#666; font-size:0.9rem; line-height:1.5; margin-bottom:1rem; }
.tool-detail-actions { display:flex; justify-content:space-between; align-items:center; }

/* Responsive Design */
@media (max-width:768px) {
  .categories-grid { grid-template-columns:1fr; }
  .category-header { flex-direction:column; text-align:center; }
  .category-icon { margin-right:0; margin-bottom:0.5rem; }
  .stats-row .row { text-align:center; }
}

@keyframes fadeInUp {
  from { opacity:0; transform:translateY(30px); }
  to { opacity:1; transform:translateY(0); }
}

.category-card:nth-child(1){ animation-delay:0.1s; }
.category-card:nth-child(2){ animation-delay:0.2s; }
.category-card:nth-child(3){ animation-delay:0.3s; }
.category-card:nth-child(4){ animation-delay:0.4s; }
.category-card:nth-child(5){ animation-delay:0.5s; }
.category-card:nth-child(6){ animation-delay:0.6s; }
.category-card:nth-child(7){ animation-delay:0.7s; }
.category-card:nth-child(8){ animation-delay:0.8s; }
.category-card:nth-child(9){ animation-delay:0.9s; }

/* Miglioramenti responsive specifici */
@media (max-width:576px) {
  .valutazione-container { padding:0 0.5rem; }
  .category-card { padding:1rem; }
  .category-header { flex-direction:column; text-align:center; gap:0.5rem; }
  .category-icon { font-size:1.5rem; margin:0 0 0.5rem 0; }
  .category-tools { justify-content:center; }
  .tool-badge { font-size:0.7rem; padding:0.2rem 0.5rem; }
  .stats-row .stat-card { padding:1rem; }
  .stat-number { font-size:1.5rem; }
  .tools-detail-grid { grid-template-columns:1fr; }
  .tool-detail-card { padding:1rem; }
  .category-detail-header { padding:1.5rem 1rem; }
  .category-detail-header h3 { font-size:1.5rem; }
}

/* Transizioni fluide */
.categories-grid, .category-details, .back-to-categories, .search-tools-compact, .stats-row { transition: all 0.3s ease; }

/* Loading states */
.category-card.loading { opacity:0.6; pointer-events:none; }
.category-card.loading::after { content:''; position:absolute; top:50%; left:50%; width:20px; height:20px; border:2px solid #f3f3f3; border-top:2px solid #5cb85c; border-radius:50%; animation:spin 1s linear infinite; transform:translate(-50%, -50%); }

@keyframes spin { 0% { transform:translate(-50%, -50%) rotate(0deg);} 100% { transform:translate(-50%, -50%) rotate(360deg);} }

/* Miglioramenti accessibilità */
.category-card:focus { outline:2px solid #5cb85c; outline-offset:2px; }
.tool-detail-card:focus { outline:2px solid #5cb85c; outline-offset:2px; }

/* Stati hover migliorati */
.category-card:hover .category-icon { transform:scale(1.1); transition:transform 0.3s ease; }
.tool-detail-card:hover .tool-detail-icon { transform:scale(1.05); transition:transform 0.3s ease; }

/* Pagina Strumenti Multidimensionali */
.multidimensional-container { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; margin-top: 2rem; }
.tool-card { background: white; border-radius: 16px; box-shadow: 0 6px 24px rgba(0,0,0,0.08); padding: 2rem; border: 2px solid #e9ecef; transition: all 0.3s ease; position: relative; overflow: hidden; }
.tool-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #5cb85c, #449d44); }
.tool-card:hover { transform: translateY(-8px); box-shadow: 0 12px 36px rgba(0,0,0,0.15); border-color: #5cb85c; }
.tool-header { display: flex; align-items: center; margin-bottom: 1.5rem; }
.tool-icon { width: 60px; height: 60px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: white; margin-right: 1rem; font-weight: bold; }
.ipos-icon { background: linear-gradient(135deg, #007bff, #0056b3); }
.esas-icon { background: linear-gradient(135deg, #dc3545, #c82333); }
.tool-title { font-size: 1.6rem; font-weight: 700; color: #2c3e50; margin-bottom: 0.5rem; }
.tool-subtitle { font-size: 1rem; color: #6c757d; font-weight: 500; }
.tool-description { color: #495057; margin-bottom: 2rem; line-height: 1.6; }
.tool-actions { display: flex; gap: 1rem; }
.action-btn { flex: 1; padding: 0.75rem 1.5rem; border: none; border-radius: 8px; font-weight: 600; text-decoration: none; text-align: center; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; gap: 0.5rem; white-space: nowrap; }
.btn-primary-custom { background: linear-gradient(135deg, #5cb85c, #449d44); color: white; }
.btn-primary-custom:hover { background: linear-gradient(135deg, #449d44, #3e8e41); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(92,184,92,0.3); color: white; }
.btn-outline-custom { background: transparent; color: #5cb85c; border: 2px solid #5cb85c; }
.btn-outline-custom:hover { background: #5cb85c; color: white; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(92,184,92,0.3); }
.page-header { text-align: center; margin-bottom: 3rem; }
.page-title { font-size: 2.5rem; font-weight: 700; color: #2c3e50; margin-bottom: 1rem; }
.page-subtitle { font-size: 1.2rem; color: #6c757d; max-width: 600px; margin: 0 auto; }
.badge-versions { background: #d4edda; color: #449d44; padding: 0.4rem 0.8rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-top: 1rem; display: inline-block; }
.version-modal .modal-content { border: none; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.version-modal .modal-header { background: linear-gradient(135deg, #5cb85c, #449d44); color: white; border-radius: 16px 16px 0 0; }
.version-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}
.version-card { border: 2px solid #e9ecef; border-radius: 12px; padding: 1.5rem; text-align: center; transition: all 0.3s ease; cursor: pointer; }
.version-card:hover { border-color: #5cb85c; background: #d4edda; transform: translateY(-2px); }
.version-icon { font-size: 2rem; color: #5cb85c; margin-bottom: 1rem; }
.version-title { font-weight: 700; color: #2c3e50; margin-bottom: 0.5rem; }
.version-desc { color: #6c757d; font-size: 0.9rem; }

@media (max-width: 768px) {
  .tools-grid { grid-template-columns: 1fr; }
  .tool-actions { gap: 0.75rem; }
  .version-grid { grid-template-columns: 1fr; }
  .action-btn { font-size: 0.9rem; padding: 0.6rem 1rem; }
  .page-title { font-size: 2rem; }
}

/* Sezione Valutazione Complessità */
.valutazione-detail-section { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }
.page-icon { font-size: 3rem; }
.idcpal-card { max-width: 450px; margin: 0 auto; }
.idcpal-icon { background: linear-gradient(135deg, #007bff, #0056b3); }
.btn-primary-idcpal { background: linear-gradient(135deg, #007bff, #0056b3); color: #fff; }
.btn-primary-idcpal:hover { background: linear-gradient(135deg, #0056b3, #004085); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,123,255,0.3); color: #fff; }
.btn-outline-idcpal { background: transparent; color: #007bff; border: 2px solid #007bff; }
.btn-outline-idcpal:hover { background: #007bff; color: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,123,255,0.3); }
.btn-outline-warning-custom { background: transparent; color: #856404; border: 2px solid #ffc107; }
.btn-outline-warning-custom:hover { background: #ffc107; color: #000; transform: translateY(-2px); }
.tool-extra-action { margin-top: 0.5rem; text-align: left; }
.glossary-btn { flex: none; padding: 0.4rem 0.8rem; font-size: 0.85rem; }

/* === CATEGORIA PERFORMANCE === */
.tool-card.performance-card {
  border: 3px solid #6f42c1;
}

.tool-icon-large.performance-icon {
  background: linear-gradient(135deg, #6f42c1, #563d7c);
}

.tool-card.performance-card .btn-primary {
  background: linear-gradient(135deg, #6f42c1, #563d7c);
  border: none;
}

.tool-card.performance-card .btn-primary:hover {
  background: linear-gradient(135deg, #563d7c, #4a2c6a);
  transform: translateY(-2px);
}

.tool-card.performance-card .btn-outline-primary {
  border: 2px solid #6f42c1;
  color: #6f42c1;
  background: white;
}

.tool-card.performance-card .btn-outline-primary:hover {
  background: #6f42c1;
  color: white;
}

.tool-card.performance-card .feature-badge {
  background: rgba(111, 66, 193, 0.1);
  color: #6f42c1;
  border: 1px solid rgba(111, 66, 193, 0.2);
}

.tool-card.performance-card:hover {
  border-color: #563d7c;
  box-shadow: 0 8px 32px rgba(111, 66, 193, 0.15);
}

.tool-card.performance-card:hover::before {
  background: linear-gradient(90deg, #6f42c1, #563d7c);
}

.tool-card.akps-performance {
  border-color: #28a745;
}
.tool-card.akps-performance .tool-icon-large {
  background: linear-gradient(135deg, #28a745, #20c997);
}

.tool-card.pps-performance {
  border-color: #dc3545;
}
.tool-card.pps-performance .tool-icon-large {
  background: linear-gradient(135deg, #dc3545, #fd7e14);
}

.tool-card.adl-performance {
  border-color: #007bff;
}
.tool-card.adl-performance .tool-icon-large {
  background: linear-gradient(135deg, #007bff, #6f42c1);
}

.tool-card.badl-performance {
  border-color: #6c757d;
}
.tool-card.badl-performance .tool-icon-large {
  background: linear-gradient(135deg, #6c757d, #495057);
}

/* Griglia due colonne per Performance */
.tools-grid.performance-grid {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
  .tools-grid.performance-grid {
    grid-template-columns: 1fr;
  }
}
.tool-icon-large {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.tool-letters {
  color: inherit;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
}

.tool-features {
  background: var(--success-bg);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--success-border);
}

.feature-badge {
  color: #155724;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Categoria Sedazione */
.tool-card.sedazione-card {
  border: 3px solid #17a2b8;
}

.tool-card.sedazione-card .tool-icon-large {
  background: linear-gradient(135deg, #17a2b8, #138496);
  box-shadow: 0 4px 16px rgba(23, 162, 184, 0.3);
}

.tool-card.sedazione-card:hover {
  border-color: #138496;
}

.tool-card.sedazione-card .btn-primary {
  background: linear-gradient(135deg, #17a2b8, #138496);
}

.tool-card.sedazione-card .btn-outline-primary {
  border: 2px solid #17a2b8;
  color: #17a2b8;
  background: white;
}

.tool-card.sedazione-card .btn-outline-primary:hover {
  background: #17a2b8;
  color: white;
}

/* Categoria Sedazione - Ramsey variante viola */
.tool-card.ramsey-card {
  border: 3px solid #6f42c1;
}

.tool-card.ramsey-card .tool-icon-large {
  background: linear-gradient(135deg, #6f42c1, #5936b4);
  box-shadow: 0 4px 16px rgba(111, 66, 193, 0.3);
}

.tool-card.ramsey-card:hover {
  border-color: #5936b4;
}

.tool-card.ramsey-card .btn-primary {
  background: linear-gradient(135deg, #6f42c1, #5936b4);
}

.tool-card.ramsey-card .btn-outline-primary {
  border: 2px solid #6f42c1;
  color: #6f42c1;
  background: white;
}

.tool-card.ramsey-card .btn-outline-primary:hover {
  background: #6f42c1;
  color: white;
}

.tool-card.delirium-card {
  border: 3px solid #6f42c1;
}

.tool-card.delirium-card .tool-icon-large {
  background: linear-gradient(135deg, #6f42c1, #5936b4);
  box-shadow: 0 4px 16px rgba(111,66,193,0.3);
}

.tool-card.delirium-card:hover {
  border-color: #5936b4;
}

.tool-card.delirium-card .btn-primary {
  background: linear-gradient(135deg, #6f42c1, #5936b4);
}

.tool-card.delirium-card .btn-outline-primary {
  border: 2px solid #6f42c1;
  color: #6f42c1;
  background: white;
}

.tool-card.delirium-card .btn-outline-primary:hover {
  background: #6f42c1;
  color: white;
}
