/* /lab/public/css/main-style.css */

    /* --- Reset y Estilos Base --- */
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      background-color: var(--background-color);
      color: var(--text-color);
      line-height: 1.6;
      padding-top: 80px; /* Espacio para el header fijo */
    }

    /* --- Encabezado Principal (Unificado con brios.com.uy) --- */
    .main-header {
      background-color: var(--card-bg-color);
      box-shadow: var(--card-shadow);
      padding: 0 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: 70px;
      position: fixed;
      top: 0;
      width: 100%;
      z-index: 1100;
    }

    .header-logo img {
      max-height: 52px;
      width: auto;
    }
    
    .header-title h1 {
        font-size: 1.5rem;
        color: var(--primary-color);
        font-weight: 600;
    }

    .header-controls {
      display: flex;
      align-items: center;
      gap: 20px;
    }

    /* --- Menú de Aplicaciones (Estilo Google Waffle) --- */
    .app-launcher-btn {
      background: none;
      border: none;
      cursor: pointer;
      font-size: 1.8rem;
      color: var(--primary-color);
    }
    
    .app-launcher {
      display: none; /* Se muestra con JS */
      position: fixed;
      top: 84px !important;
      right: 20px;
      background-color: var(--card-bg-color);
      border-radius: var(--border-radius);
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
      padding: 20px;
      width: 320px;
      z-index: 1200;
      display: block;
      max-height: 80vh;
      overflow-y: auto;
      grid-template-columns: repeat(3, 1fr);
      gap: 15px;
    }

    .app-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      text-decoration: none;
      color: var(--text-color);
      padding: 10px 5px;
      border-radius: var(--border-radius);
      transition: background-color 0.2s ease;
    }
    .app-item:hover {
      background-color: #e9ecef;
    }
    .app-item i {
      font-size: 1.8rem;
      margin-bottom: 8px;
      color: var(--primary-color);
    }
    .app-item span {
      font-size: 0.8rem;
      font-weight: 500;
    }
    .app-section {
      margin-bottom: 15px;
    }

    .app-launcher h3 {
        font-size: 0.9em;
        font-weight: 600;
        color: #6c757d; /* Un gris sutil */
        text-align: left;
        padding-bottom: 8px;
        margin-bottom: 8px;
        border-bottom: 1px solid #e9ecef;
    }

    .app-section .app-item {
        display: inline-flex; 
        margin: 5px;
        vertical-align: top;
    }

    .app-item:hover {
        text-decoration: none;
    }
    .menu-launcher-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding-left: 12px;
        padding-right: 12px;
        border-radius: 0.5rem;
        text-decoration: none;
        color: var(--color-texto);
        transition: background-color 0.2s ease;
    }

    .menu-launcher-item:hover {
        background-color: var(--color-secundario);
        color: var(--primary-color);
        text-decoration: none;
    }

    .menu-launcher-item i {
        font-size: 2rem;
        color: var(--primary-color);
    }
    .menu-launcher-item span {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    /* --- Login y Perfil de Usuario --- */
    .user-profile {
        position: relative;
    }
    .user-btn {
        background-color: var(--primary-color);
        color: white;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: none;
        cursor: pointer;
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .user-dropdown {
        display: none;
        position: absolute;
        top: 50px;
        right: 0;
        background: white;
        box-shadow: var(--card-shadow);
        border-radius: var(--border-radius);
        overflow: hidden;
        width: 150px;
    }
    .user-dropdown a {
        display: block;
        padding: 10px 15px;
        text-decoration: none;
        color: var(--text-color);
    }
    .user-dropdown a:hover {
        background-color: #f1f1f1;
    }
    .btn-login {
        background-color: var(--secondary-color);
        color: white;
        padding: 8px 20px;
        border-radius: var(--border-radius);
        text-decoration: none;
        font-weight: bold;
        transition: background-color 0.2s ease;
    }
    .btn-login:hover {
        background-color: #0086b3;
    }

    
    :root {
        --primary-color: #0d6efd !important;
        --secondary-color: #00A8E8 !important;
        --background-color: #f8f9fa !important;
        --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37)!important;
        --border-radius: 1rem !important;
    }
    body {
        background-color: var(--background-color)!important;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        padding-top: 90px;
    }
    .navbar-nav {flex-direction: unset !important;}
    .glassmorphic {
        background: rgba(255, 255, 255, 0.6) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border-radius: var(--border-radius) !important;
        border: 1px solid rgba(255, 255, 255, 0.4) !important;
        box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1), inset 0 1px 1px 0 rgba(255, 255, 255, 0.5) !important;
    }
    .main-header {
        padding: 0.5rem 2rem !important;
        position: fixed !important;
        top: 10px !important;
        left: 1% !important;
        width: 98% !important;
        z-index: 1050 !important;
    }
    .header-logo img { max-height: 45px; }
    .header-controls { display: flex; align-items-center; gap: 1rem; margin-left: auto; }
    .user-profile { position: relative; }
    .user-btn { background-color: var(--primary-color); color: white; width: 40px; height: 40px; border-radius: 50%; border: none; font-size: 1.2rem; }
    .user-dropdown {
        display: none;
        position: absolute;
        top: 55px;
        right: 0;
        width: 180px;
        z-index: 1200;
        list-style: none;
        padding: 0.5rem;
        overflow: hidden;
    }
    .user-dropdown li, .user-dropdown a { background: transparent !important; }
    .user-dropdown a { padding: 0.5rem 1rem; color: #333; text-decoration: none; display: block; border-radius: 0.5rem; }
    .user-dropdown a:hover { background-color: rgba(255, 255, 255, 0.5) !important; }
    .user-dropdown .dropdown-divider { height: 1px; margin: 0.5rem 0; background-color: rgba(255, 255, 255, 0.4); border: 0; }
    .app-launcher-btn { background: none; border: none; cursor: pointer; font-size: 1.8rem; color: var(--primary-color); }
    .app-launcher { display: none; position: fixed; top: 75px; right: 20px; width: 320px; z-index: 1200; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; padding: 20px; }
    .app-item { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: #333; padding: 10px 5px; border-radius: var(--border-radius); transition: background-color 0.2s ease; }
    .app-item:hover { background-color: #e9ecef; }
    .app-item i { font-size: 1.8rem; margin-bottom: 8px; color: var(--primary-color); }
    .app-item span { font-size: 0.8rem; font-weight: 500; }
    .menu-launcher-item { text-decoration: none; color: #333; padding: 0.5rem 1rem; }
    .content { padding: 20px; max-width: 1200px; margin: 0 auto; }
    .chart-section { background: #fff; padding: 20px; border-radius: var(--border-radius); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08); margin-bottom: 40px; }
    .app-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
    .app-card { background: #fff; border-radius: var(--border-radius); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08); padding: 25px; display: flex; flex-direction: column; }
    .footer { text-align: center; padding: 25px; margin-top: 40px; background-color: var(--primary-color); color: rgba(255, 255, 255, 0.8); }


/* 2. ESTILOS BASE Y TIPOGRAFÍA */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  padding-top: 80px; /* Espacio para el header fijo */
}
h1, h2, h3 { color: var(--primary-color); margin-bottom: 1rem; }
h1 { font-size: 1.8rem !important; text-align: center; margin-bottom: 1.5rem;}
h2 { font-size: 1.4rem !important; border-bottom: 1px solid var(--border-color); padding-bottom: 0.75rem ;}
p { margin-bottom: 1rem; }
a { color: var(--secondary-color); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 4. COMPONENTES REUTILIZABLES */
.navbar-nav {flex-direction: unset !important;}
/* Paneles y Tarjetas */
.form-section, .card {
  background: var(--card-bg-color);
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  margin-bottom: 2rem;
  min-width: -webkit-fill-available;
}

/* Formularios */
.form-row { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 1.25rem; }
.form-group { flex: 1; min-width: calc(50% - 1rem); }
.form-group label { display: block; margin-bottom: .5rem; font-weight: 600; font-size: .9rem; }
input[type="number"], input[type="text"], select, textarea {
  display: block; width: 100%; padding: .6rem .8rem; font-size: .95rem;
  color: var(--text-color); background-color: #fff;
  border-radius: 6px;
  transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
input[type="number"]:focus, input[type="text"]:focus, select:focus, textarea:focus {
  border-color: var(--secondary-color); outline: 0;
  box-shadow: 0 0 0 .2rem rgba(0, 168, 232, 0.25);
}
.notes_reference { font-size: 0.8rem; color: #6c757d; margin-top: .25rem; display: block; }

/* Botones */
.button-primary, .btn-primary {
    background-color: var(--primary-color); color: white; padding: 12px 24px;
    border: none; border-radius: var(--border-radius); font-weight: bold;
    cursor: pointer; text-decoration: none; display: inline-block;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.button-primary:hover, .btn-primary:hover {
    background-color: #001f4d; transform: translateY(-2px);
}

/* Tablas */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: .8rem; text-align: left; border-bottom: 1px solid var(--border-color); }
.data-table thead th { background-color: #f8f9fa; font-weight: 600; color: var(--primary-color); }
.data-table tbody tr:hover { background-color: #f1f5f9; }
.data-table .actions a { margin: 0 8px; font-size: 1.1rem; }
.data-table .actions a.delete { color: #dc3545; }

/* Mensajes de Alerta */
.message { padding: .75rem 1.25rem; margin-bottom: 1.5rem; border: 1px solid transparent; border-radius: var(--border-radius); }
.message.success { background-color: var(--success-bg); color: var(--success-color); border-color: #c3e6cb; }
.message.error { background-color: var(--error-bg); color: var(--error-color); border-color: #f5c6cb; }
.message.info { background-color: var(--info-bg); color: var(--info-color); border-color: #b8daff; }

/* 5. OVERRIDES DE PLUGINS (Ej: noUiSlider) */
.slider { flex-grow: 1; margin: 0 .5rem; background: #e9ecef; border: 1px solid var(--border-color); box-shadow: none; }
.noUi-connect { background: var(--primary-color); }
.noUi-handle { border: 1px solid #D9D9D9; border-radius: 50%; background: #FFF; box-shadow: var(--card-shadow); }
.value-display { min-width: 80px; text-align: right; font-size:.9em; padding: .375rem .75rem; border:1px solid var(--border-color); border-radius:6px; background-color: #f8f9fa;}
.slider-container { align-items: center; gap: .75rem; }
label {
    min-width: -webkit-fill-available;
}
/* 6. AJUSTES RESPONSIVOS */
@media (max-width: 768px) {
    body { padding-top: 60px; }
    .main-header { height: 60px; }
    .header-title { display: none; }
    .form-group { min-width: 100%; }
}


    /* --- Variables de Estilo Global (como en brios.com.uy) --- */
    :root {
      --primary-color: #004a99; /* Azul oscuro corporativo */
      --secondary-color: #00A8E8; /* Azul brillante para acentos */
      --accent-color: #FFC425; /* Acento cálido (amarillo/dorado) */
      --background-color: #f8f9fa; /* Fondo general muy claro */
      --text-color: #000000; /* Texto principal oscuro */
      --card-bg-color: #ffffff;
      --card-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
      --border-radius: 8px;
    }

    /* --- Reset y Estilos Base --- */
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      background-color: var(--background-color);
      color: var(--text-color);
      line-height: 1.6;
      padding-top: 80px; /* Espacio para el header fijo */
    }

    /* --- Encabezado Principal (Unificado con brios.com.uy) --- */
    .main-header {
      background-color: var(--card-bg-color);
      box-shadow: var(--card-shadow);
      padding: 0 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: 70px;
      position: fixed;
      top: 0;
      width: 100%;
      z-index: 1100;
    }

    .header-logo img {
      height: 45px;
      width: auto;
    }
    
    .header-title h1 {
        font-size: 1.5rem;
        color: var(--primary-color);
        font-weight: 600;
    }

    .header-controls {
      display: flex;
      align-items: center;
      gap: 20px;
    }

    /* --- Menú de Aplicaciones (Estilo Google Waffle) --- */
    .app-launcher-btn {
      background: none;
      border: none;
      cursor: pointer;
      font-size: 1.8rem;
      color: var(--primary-color);
    }
    
    .app-launcher {
      display: none; /* Se muestra con JS */
      position: fixed;
      top: 84px;
      right: 20px;
      background-color: var(--card-bg-color);
      border-radius: var(--border-radius);
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
      padding: 20px;
      width: 320px;
      z-index: 1200;
      display: flex;
      flex-direction: column;
      grid-template-columns: repeat(3, 1fr);
      gap: 15px;
      padding: 20px;
    }

    .app-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      text-decoration: none;
      color: var(--text-color);
      padding: 10px 5px;
      border-radius: var(--border-radius);
      transition: background-color 0.2s ease;
    }
    .app-item:hover {
      background-color: #e9ecef;
    }
    .app-item i {
      font-size: 1.8rem;
      margin-bottom: 8px;
      color: var(--primary-color);
    }
    .app-item span {
      font-size: 0.8rem;
      font-weight: 500;
    }

    .app-section-title {
        /* Títulos de sección */
        font-size: 0.9em;
        font-weight: bold;
        color: #555;
        margin: 0 0 15px 0;
        text-align: left;
    }

    .app-grid {
        /* Grilla que contiene los íconos */
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* Mantiene las 3 columnas */
    }

    .app-separator {
      /* Separador horizontal */
      border: none;
      height: 1px;
      background-color: #2d1ff0;
      margin: 10px 0;
    }

    .app-launcher::-webkit-scrollbar { width: 8px; }
    .app-launcher::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
    .app-launcher::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
    .app-launcher::-webkit-scrollbar-thumb:hover { background: #999; }

    /* --- Login y Perfil de Usuario --- */
    .user-profile {
        position: relative;
    }
    .user-btn {
        background-color: var(--primary-color);
        color: white;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: none;
        cursor: pointer;
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .user-dropdown {
        display: none;
        position: absolute;
        top: 50px;
        right: 0;
        background: white;
        box-shadow: var(--card-shadow);
        border-radius: var(--border-radius);
        overflow: hidden;
        width: 150px;
    }
    .user-dropdown a {
        display: block;
        padding: 10px 15px;
        text-decoration: none;
        color: var(--text-color);
    }
    .user-dropdown a:hover {
        background-color: #f1f1f1;
    }
    .btn-login {
        background-color: var(--secondary-color);
        color: white;
        padding: 8px 20px;
        border-radius: var(--border-radius);
        text-decoration: none;
        font-weight: bold;
        transition: background-color 0.2s ease;
    }
    .btn-login:hover {
        background-color: #0086b3;
    }


    /* --- Contenido Principal --- */
    .content {
      padding: 20px;
      max-width: 1200px;
      margin: 0 auto;
    }
    
    h1, h2 {
        color: var(--primary-color);
        margin-bottom: 20px;
    }
    
    /* --- Sección de Gráfico --- */
    .chart-section {
      background: var(--card-bg-color);
      padding: 20px;
      border-radius: var(--border-radius);
      box-shadow: var(--card-shadow);
      margin-bottom: 40px;
    }

    /* --- Sección de Tarjetas de Aplicaciones --- */
    .app-cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 25px;
    }

    .app-card {
      background: var(--card-bg-color);
      border-radius: var(--border-radius);
      box-shadow: var(--card-shadow);
      padding: 25px;
      display: flex;
      flex-direction: column;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .app-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }
    .app-card h3 {
      color: var(--primary-color);
      margin-top: 0;
    }
    .app-card p {
      flex-grow: 1; /* Empuja el botón hacia abajo */
      margin-bottom: 20px;
    }
    .card-actions {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .card-link {
        background-color: var(--primary-color);
        color: white;
        padding: 10px 18px;
        border-radius: var(--border-radius);
        text-decoration: none;
        font-weight: bold;
        transition: background-color 0.2s ease;
    }
    .card-link:hover {
        background-color: #001f4d;
    }
    .card-info-btn {
        background: none;
        border: 1px solid var(--secondary-color);
        color: var(--secondary-color);
        padding: 8px 15px;
        border-radius: var(--border-radius);
        cursor: pointer;
        font-weight: bold;
    }

    /* --- Modales --- */
    .modal {
      display: none; 
      position: fixed;
      z-index: 2000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
      background-color: rgba(0, 0, 0, 0.6);
    }
    .modal-content {
      background-color: #fefefe;
      margin: 10% auto;
      padding: 30px;
      border: none;
      width: 80%;
      max-width: 600px;
      border-radius: var(--border-radius);
      box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    }
    .close-modal {
      color: #aaa;
      float: right;
      font-size: 28px;
      font-weight: bold;
      cursor: pointer;
    }

    /* --- Pie de Página (Unificado) --- */
    .footer {
        text-align: center;
        padding: 25px;
        margin-top: 40px;
        background-color: var(--primary-color);
        color: rgba(255, 255, 255, 0.8);
    }
    .footer a {
        color: white;
        text-decoration: none;
        font-weight: bold;
    }
    .footer a:hover {
        text-decoration: underline;
    }

    /* --- Ajustes Responsivos para Móvil --- */
    @media (max-width: 768px) {
        body {
            padding-top: 60px; /* Header más pequeño en móvil */
        }
        .main-header {
            height: 60px;
            padding: 0 15px;
        }
        .header-title {
            display: none; /* Ocultar título para dar espacio */
        }
        .app-launcher {
            width: 90%;
            right: 5%;
        }
        .content {
            padding: 15px;
        }
    }