body
{
   background-color: transparent;
   color: #000000;
   font-family: Arial;
   font-weight: normal;
   font-size: 16px;
   line-height: 1.1875;
   margin: 0;
   padding: 0;
}
  /* Aislamiento total - estos estilos SOLO afectan al dashboard */
  .desempeno-wrapper {
    --bg-dashboard: #f1f5f9;
    --card-dashboard: #ffffff;
    --text-dashboard: #0f172a;
    --muted-dashboard: #475569;
    --line-dashboard: #e2e8f0;
    --primary-dashboard: #2563eb;
    --primary-light-dashboard: #3b82f6;
    --green-dashboard: #10b981;
    --yellow-dashboard: #f59e0b;
    --red-dashboard: #ef4444;
    --shadow-dashboard: 0 20px 35px -12px rgba(0,0,0,0.08);
    --sidebar-bg-dashboard: #ffffff;

    background: var(--bg-dashboard);
    color: var(--text-dashboard);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
  }

  .desempeno-wrapper.dark {
    --bg-dashboard: #0a0f1c;
    --card-dashboard: #111827;
    --text-dashboard: #e2e8f0;
    --muted-dashboard: #94a3b8;
    --line-dashboard: #1e293b;
    --sidebar-bg-dashboard: #0f172a;
    --shadow-dashboard: 0 20px 35px -12px rgba(0,0,0,0.4);
  }

  /* Layout interno */
  .dashboard-inner {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }

  .sidebar-fixed {
    width: 290px;
    flex-shrink: 0;
    background: var(--sidebar-bg-dashboard);
    border-right: 1px solid var(--line-dashboard);
    padding: 1.5rem 1rem;
    overflow-y: visible;
    box-shadow: var(--shadow-dashboard);
    z-index: 5;
    height: auto;
  }

  .main-content {
    flex: 1;
    padding: 1.8rem 2rem;
    min-width: 0;
    overflow-x: auto;
  }

  /* Grid system forzado con float para evitar conflictos */
  .row {
    display: block !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
  }

  .row:after {
    content: "";
    display: table;
    clear: both;
  }

  .col-md-6, .col-md-4, .col-xl-4 {
    float: left;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }

  .col-md-6 { width: 50%; }
  .col-md-4 { width: 33.333%; }
  .col-xl-4 { width: 33.333%; }

  /* Corrección: asegurar que las columnas se limpien cada 3 */
  .row .col-md-6.col-xl-4:nth-child(3n+1) {
    clear: left;
  }

  @media (max-width: 768px) {
    .col-md-6, .col-md-4, .col-xl-4 { width: 100%; float: none; }
  }

  /* Tarjetas */
  .card-soft {
    background: var(--card-dashboard);
    border: 1px solid var(--line-dashboard);
    border-radius: 24px;
    box-shadow: var(--shadow-dashboard);
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }

  /* Badges y utilerías */
  .badge-green {
    background: rgba(16,185,129,0.12);
    color: var(--green-dashboard);
    border: 1px solid rgba(16,185,129,0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    display: inline-block;
  }

  .badge-yellow {
    background: rgba(245,158,11,0.12);
    color: #b45309;
    border: 1px solid rgba(245,158,11,0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    display: inline-block;
  }

  .badge-red {
    background: rgba(239,68,68,0.12);
    color: var(--red-dashboard);
    border: 1px solid rgba(239,68,68,0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    display: inline-block;
  }

  .badge-soft {
    background: rgba(37,99,235,0.08);
    color: var(--primary-dashboard);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    display: inline-block;
  }

  /* Formularios */
  .form-select, .form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    border: 1px solid var(--line-dashboard);
    background: var(--card-dashboard);
    color: var(--text-dashboard);
  }

  .view-selector-btn {
    background: transparent;
    border: 1px solid var(--line-dashboard);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    transition: all 0.2s;
    color: var(--text-dashboard);
    cursor: pointer;
  }

  .view-selector-btn.active {
    background: var(--primary-dashboard);
    border-color: var(--primary-dashboard);
    color: white;
  }

  /* Sidebar links */
  .sidebar-link {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid var(--line-dashboard);
    background: transparent;
    color: var(--text-dashboard);
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
    cursor: pointer;
  }

  .sidebar-link:hover, .sidebar-link.active {
    background: var(--primary-dashboard);
    border-color: var(--primary-dashboard);
    color: #fff;
  }

  .category-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(37,99,235,0.05);
    margin-bottom: 6px;
    cursor: pointer;
  }

  .category-check span:first-of-type {
    color: var(--text-dashboard) !important;
    font-size: 0.85rem;
  }

  .category-count {
    font-size: 0.7rem;
    background: var(--line-dashboard);
    padding: 2px 6px;
    border-radius: 20px;
    margin-left: auto;
    color: var(--text-dashboard);
  }

  /* Items */
  .task-item, .agreement-item {
    border: 1px solid var(--line-dashboard);
    border-radius: 16px;
    padding: 0.8rem;
    margin-bottom: 0.7rem;
  }

  .strength-item {
    background: rgba(16,185,129,0.08);
    border-left: 3px solid var(--green-dashboard);
    padding: 8px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
  }

  .opportunity-item {
    background: rgba(239,68,68,0.08);
    border-left: 3px solid var(--red-dashboard);
    padding: 8px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
  }

  .area-compare-row {
    border-bottom: 1px solid var(--line-dashboard);
    transition: background 0.2s;
    cursor: pointer;
    padding: 8px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .area-compare-row:hover {
    background: rgba(37,99,235,0.05);
  }

  .area-item {
    flex: 1;
    padding: 0 4px;
  }

  /* Modal nativo */
  .modal-native {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
  }

  .modal-native.show {
    display: flex;
  }

  .modal-native .modal-content {
    background: var(--card-dashboard);
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    border: 1px solid var(--line-dashboard);
  }

  .progress-custom {
    height: 8px;
    border-radius: 10px;
    background: rgba(100,116,139,0.2);
  }

  .progress-bar-custom {
    border-radius: 10px;
    transition: width 0.3s;
    height: 100%;
  }

  .bg-success { background-color: var(--green-dashboard) !important; }
  .bg-warning { background-color: var(--yellow-dashboard) !important; }
  .bg-danger { background-color: var(--red-dashboard) !important; }
  .bg-primary { background-color: var(--primary-dashboard) !important; }
  .bg-secondary { background-color: var(--muted-dashboard) !important; }
  .text-success { color: var(--green-dashboard) !important; }
  .text-danger { color: var(--red-dashboard) !important; }
  .text-warning { color: var(--yellow-dashboard) !important; }
  .text-muted { color: var(--muted-dashboard) !important; }
  .text-center { text-align: center; }
  .fw-bold { font-weight: bold; }
  .fw-semibold { font-weight: 600; }
  .small { font-size: 0.75rem; }
  .tiny { font-size: 0.7rem; }
  .fs-3 { font-size: 1.75rem; }
  .fs-4 { font-size: 1.5rem; }
  .fs-6 { font-size: 1rem; }
  .display-4 { font-size: 2.5rem; font-weight: 300; }
  .display-6 { font-size: 1.75rem; font-weight: 600; }

  .d-flex { display: flex; }
  .flex-column { flex-direction: column; }
  .justify-content-between { justify-content: space-between; }
  .align-items-center { align-items: center; }
  .gap-1 { gap: 0.25rem; }
  .gap-2 { gap: 0.5rem; }
  .gap-3 { gap: 1rem; }
  .me-1 { margin-right: 0.25rem; }
  .me-2 { margin-right: 0.5rem; }
  .ms-auto { margin-left: auto; }
  .mb-1 { margin-bottom: 0.25rem; }
  .mb-2 { margin-bottom: 0.5rem; }
  .mb-3 { margin-bottom: 1rem; }
  .mb-4 { margin-bottom: 1.5rem; }
  .mt-1 { margin-top: 0.25rem; }
  .mt-2 { margin-top: 0.5rem; }
  .mt-3 { margin-top: 1rem; }
  .p-2 { padding: 0.5rem; }
  .p-3 { padding: 1rem; }
  .p-4 { padding: 1.5rem; }
  .rounded { border-radius: 0.375rem; }
  .rounded-circle { border-radius: 50%; }
  .w-100 { width: 100%; }
  .flex-fill { flex: 1; }
  .border { border: 1px solid var(--line-dashboard); }
  .border-bottom { border-bottom: 1px solid var(--line-dashboard); }
  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.2rem;
    border: 1px solid var(--line-dashboard);
    background: var(--card-dashboard);
    cursor: pointer;
  }
  .header-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dashboard), var(--primary-light-dashboard));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .individual-badge {
    background: var(--primary-dashboard);
    color: white;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.7rem;
    display: inline-block;
  }
  .individual-score {
    background: rgba(16,185,129,0.15);
    color: var(--green-dashboard);
    padding: 4px 10px;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
  }
  .fade-in {
    animation: fadeIn 0.3s ease;
  }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @media (max-width: 768px) {
    .dashboard-inner { flex-direction: column; }
    .sidebar-fixed { width: 100%; position: relative; height: auto; }
    .main-content { padding: 1rem; }
  }

  /* Tabla usando divs */
  .area-table {
    width: 100%;
    border-collapse: collapse;
  }
  .area-table-header, .area-table-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line-dashboard);
    padding: 8px;
  }
  .area-table-header {
    font-weight: bold;
    border-bottom: 2px solid var(--line-dashboard);
  }
  .area-cell {
    flex: 1;
    padding: 0 4px;
  }
