    /* Layout principale */
    .main-wrapper {
      display: flex;
      min-height: 100vh;
    }
    
    /* Sidebar */
    .sidebar {
      width: 250px;
      background-color: #2c3e50;
      color: white;
      position: fixed;
      height: 100vh;
      overflow-y: auto;
      overflow-x: hidden;
      box-shadow: 2px 0 5px rgba(0,0,0,0.1);
      z-index: 1000;
    }
    
    .sidebar-header {
      padding: 1rem;
      background-color: #1a252f;
      text-align: center;
      border-bottom: 1px solid #34495e;
    }
    
    .sidebar-header h5 {
      margin: 0;
      font-size: 1.1rem;
      font-weight: 600;
    }
    
    /* Search box nella sidebar */
    .sidebar-search {
      padding: 0.75rem;
      background-color: #34495e;
      border-bottom: 1px solid #1a252f;
    }
    
    .sidebar-search input {
      background-color: #2c3e50;
      border: 1px solid #445566;
      color: white;
      font-size: 0.875rem;
      padding: 0.5rem;
    }
    
    .sidebar-search input::placeholder {
      color: #95a5a6;
    }
    
    .sidebar-search input:focus {
      background-color: #1a252f;
      border-color: #3498db;
      box-shadow: none;
      color: white;
    }
    
    /* Gruppi di indici */
    .index-group {
      margin-bottom: 0.5rem;
    }
    
    .index-group-header {
      padding: 0.5rem 1rem;
      background-color: #34495e;
      font-size: 0.85rem;
      font-weight: 600;
      color: #ecf0f1;
      cursor: pointer;
      user-select: none;
      display: flex;
      justify-content: space-between;
      align-items: center;
      transition: background-color 0.2s;
    }
    
    .index-group-header:hover {
      background-color: #445566;
    }
    
    .index-group-header i {
      font-size: 0.75rem;
      transition: transform 0.2s;
    }
    
    .index-group-header.collapsed i {
      transform: rotate(-90deg);
    }
    
    /* Lista di indici */
    .index-list {
      background-color: #2c3e50;
      max-height: 400px;
      overflow-y: auto;
      transition: max-height 0.3s ease;
    }
    
    .index-list.collapsed {
      max-height: 0;
      overflow: hidden;
    }
    
    .index-item {
      padding: 0.6rem 1.25rem;
      cursor: pointer;
      font-size: 0.875rem;
      border-left: 3px solid transparent;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    
    .index-item:hover {
      background-color: #34495e;
      border-left-color: #3498db;
    }
    
    .index-item.active {
      background-color: #3498db;
      border-left-color: #2980b9;
      font-weight: 600;
    }
    
    .index-item .flag {
      font-size: 1.1rem;
    }
    
    .index-item .name {
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    
    /* Content area */
    .content-area {
      margin-left: 250px;
      flex: 1;
      background-color: #ffffff;
      min-height: 100vh;
      padding: 2rem;
      width: calc(100% - 250px);
    }
    
    /* Mobile responsive */
    .sidebar-toggle {
      display: none;
      position: fixed;
      top: 10px;
      right: 10px;
      z-index: 1100;
      background-color: #2c3e50;
      color: white;
      border: none;
      padding: 0.5rem;
      border-radius: 0.25rem;
      font-size: 1.25rem;
      line-height: 1;
      cursor: pointer;
    }
    
    @media (max-width: 991px) {
      .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
      }
      
      .sidebar.show {
        transform: translateX(0);
      }
      
      .content-area {
        margin-left: 0;
      }
      
      .sidebar-toggle {
        display: block;
      }
      
      .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
      }
      
      .sidebar-backdrop.show {
        display: block;
      }
    }
    
    /* Scrollbar personalizzata per la sidebar */
    .sidebar::-webkit-scrollbar,
    .index-list::-webkit-scrollbar {
      width: 6px;
    }
    
    .sidebar::-webkit-scrollbar-track,
    .index-list::-webkit-scrollbar-track {
      background: #1a252f;
    }
    
    .sidebar::-webkit-scrollbar-thumb,
    .index-list::-webkit-scrollbar-thumb {
      background: #34495e;
      border-radius: 3px;
    }
    
    .sidebar::-webkit-scrollbar-thumb:hover,
    .index-list::-webkit-scrollbar-thumb:hover {
      background: #445566;
    }
    
    /* Stili esistenti */
    .signal-long { background: linear-gradient(135deg, #28a745, #20c997); color: white; }
    .signal-short { background: linear-gradient(135deg, #dc3545, #e74c3c); color: white; }
    .signal-neutral { background: linear-gradient(135deg, #6c757d, #868e96); color: white; }
    .confidence-bar { height: 30px; background: #e9ecef; border-radius: 30px; overflow: hidden; position: relative;}
    #confidenceText{position: absolute;top: 5px;width: 100%;
    left: 0;}
    .confidence-fill { height: 100%; transition: width 0.5s ease; }
    .indicator-badge { font-size: 0.85rem; padding: 0.25rem 0.5rem; }
    .success-high { background-color: #28a745; color: white; }
    .success-medium { background-color: #ffc107; color: black; }
    .success-low { background-color: #dc3545; color: white; }
    .signal-item { padding: 0.5rem 0; border-bottom: 1px solid #e9ecef; }
    .level-card { background: #f8f9fa; padding: 1rem; border-radius: 10px; margin-bottom: 1rem; }
    .ev-positive { color: #28a745; font-weight: bold; }
    .ev-negative { color: #dc3545; font-weight: bold; }
    .bg-white{background-color:#ffffff;color:var(--bs-secondary-color) !important;}
    .timeframe-badge { 
      display: inline-block; 
      padding: 0.25rem 0.75rem; 
      background: #0d6efd; 
      color: white; 
      border-radius: 20px; 
      font-size: 0.875rem; 
      margin-bottom: 0.5rem;
    }
    .market-status-badge {
     
      padding: 0.2rem 0.5rem;
      font-weight: bold;
      font-size: 0.7rem;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
      display: flex;
      align-items: center;
      gap: 0.5rem;
      z-index: 100;
    }
    .market-open {
      background: linear-gradient(135deg, #28a745, #20c997);
      color: white;
    }
    .market-closed {
      background: linear-gradient(135deg, #dc3545, #e74c3c);
      color: white;
    }
    .market-status-badge .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: currentColor;
      animation: pulse 2s infinite;
    }
    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.5; }
    }
    .market-info-text {
      font-size: 0.7rem;
      opacity: 0.9;
      margin-left: 0.1rem;
    }
    
    /* Stili per i pulsanti del periodo del grafico */
    .chart-period-buttons {
      display: flex;
      gap: 0.25rem;
      flex-wrap: wrap;
      margin-bottom: 0.5rem;
    }
    .chart-period-btn {
      padding: 0.25rem 0.75rem;
      font-size: 0.875rem;
      border: 1px solid #dee2e6;
      background-color: #fff;
      color: #495057;
      border-radius: 0.25rem;
      cursor: pointer;
      transition: all 0.15s ease-in-out;
    }
    .chart-period-btn:hover {
      background-color: #e9ecef;
      border-color: #adb5bd;
    }
    .chart-period-btn.active {
      background-color: #0d6efd;
      color: white;
      border-color: #0d6efd;
    }
    .chart-controls {
      padding: 0;
      border-radius: 6px;
      margin-bottom: 1rem;
    }

    .badge{
      border-radius: 6px;
    }

    .card-header{
      border-radius: 12px 12px 0 0!important;
    }
    .card{
      border-radius: 12px!important;
    }
    .border-radius-12{
      border-radius: 12px!important;
    }