* { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: 'Segoe UI', sans-serif;
      background: #f9f9f9;
      color: #333;
      box-shadow: -2px 0 6px rgba(0, 0, 0, 0.08);
      border-left: 1px solid #ccc;
      padding-top: 0px;
    }
    .container {
      display: flex;
      min-height: 100vh;
      flex-direction: row;
    }
    .sidebar {
      width: 200px;
      background-color: #fff;
      border-right: 1px solid #eee;
      padding: 20px 0;
      box-shadow: 2px 0 6px rgba(0, 0, 0, 0.08);
    }
    .logo {
      text-align: center;
      margin-bottom: 30px;
    }
    .logo img {
      width: 120px;
    }
    .menu {
      padding-left: 0;
      list-style: none;
    }
    .menu-item {
      padding: 14px 24px;
      cursor: pointer;
      color: #004080;
      font-size: 0.9rem;
      font-weight: 500;
      display: flex;
      justify-content: space-between;
      align-items: center;
      transition: background 0.2s ease, color 0.2s ease;
    }
    .menu-item:hover {
      background-color: #e0f0ff;
      color: #002244;
      font-weight: 600;
    }
    .menu-item.active {
      background-color: #d0e8fc;
      font-weight: bold;
      color: #002244;
      border-left: 4px solid #007bff;
    }
    .submenu {
      list-style: none;
      padding-left: 40px;
      font-size: 0.9em;
      color: #555;
      margin-top: 0;
      margin-bottom: 10px;
      display: none;
    }
    .submenu li {
      padding: 8px 0;
      cursor: pointer;
      transition: color 0.2s;
    }
    .submenu li:hover {
      color: #004080;
      text-decoration: underline;
    }
    .main {
      flex: 1;
      padding: 5px;
    }
    .topbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
    }
    .container-fluid {
      margin-left: 15px;
      margin-right: 15px;
      margin-top: 15px;
      border: none;
      box-shadow: none;
    }
    .metrics, .quick-actions, .opportunities, .messages {
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
      margin-bottom: 30px;
    }
    .card {
      background: #fff;
      padding: 16px;
      border-radius: 8px;
      box-shadow: 0 0 4px rgba(0,0,0,0.05);
      flex: 1;
      min-width: 180px;
    }
    .quick-button {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 60px;
      background: #e0f0ff; 
      color: #004080;
      border-radius: 6px;
      font-weight: bold;
      cursor: pointer;
      transition: background 0.3s ease;
      box-shadow: 0 4px 8px rgba(0, 64, 128, 0.1); 
    }
    .messages {
      flex-direction: column;
      flex: 1;
    }
    .message {
      background: #fff;
      padding: 12px;
      border-radius: 6px;
      margin-bottom: 10px;
      box-shadow: 0 0 4px rgba(0,0,0,0.05);
    }
    .message strong {
      display: block;
      margin-bottom: 4px;
    }
    .topbar h2 {
      font-size: 2rem;
      color: #004080;
      font-weight: 600;
      font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
      letter-spacing: 0.5px;
      margin: 0;
    }
    table {
      width: 100%;
      background: #fff;
      border-collapse: collapse;
      border-radius: 8px;
      overflow: hidden;
    }
    th, td {
      text-align: left;
      padding: 12px 16px;
      /*border-bottom: 1px solid #eee;*/
    }    
    th {
      background: #f5f5f5;
    }
    /* complemento a f() JS "bloquearBoton()" cuando se bloquee un botón (funciones-globales.js) */
    .bloqueado {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .header-info {
      display: flex;
      align-items: center;
      gap: 12px;          /* espacio entre bloques */
      flex-wrap: wrap;    /* por si se hace largo en móviles */
    }

    .logout-link {
      text-decoration: none;
      margin-left: 12px;  /* espacio extra desde el nombre */
      color: #17609B;     /* opcional: color del enlace */
      font-weight: 600;   /* opcional: un poco más visible */
    }
    .logout-link:hover { text-decoration: underline; }
    
    .container-fluid{
      --metrics-h-mobile: 110px;  /* altura para .metrics .card */
      --quick-h-mobile:   64px;   /* altura para .quick-actions .btnAccesoRapido */
    }
    /*@media*/
    /* ——— Apilar también las cards de .metrics en pantallas chicas ——— */
    @media (max-width: 860px) {
      .metrics {                /* asegúrate de que .metrics sea flex-wrap */
        display: flex;
        flex-wrap: wrap;
        gap: 20px;              /* usa tu gap actual si es otro */
      }
      .metrics .card {
        flex: 1 0 100% !important; /* 1 por fila */
        min-width: 0 !important;    /* neutraliza min-width global */
        
      }
      .container-fluid{
        font-size: 0.7em;
      }

      /* Tarjetas de métricas */
      .metrics .card{
        /*min-height: var(--metrics-h-mobile);*/
        /*height:60px;*/
        /* opcional, por si necesitas espacio interno */
        border-radius: 4px;
        padding: 2px 2px;
      }

      /* Botones de acceso rápido */
      .quick-actions .btnAccesoRapido{
        /*min-height: var(--quick-h-mobile);*/
        display: flex;                 /* centrado vertical del contenido */
        align-items: center;
        justify-content: flex-start;   /* o center si los quieres centrados */
        gap: 10px;
        /* opcional: tamaño de fuente un poco menor en móvil */
        font-size: 1rem;
        height:40px;
      }

      /* Neutraliza márgenes internos si tus quick-buttons llevan etiquetas */
      .quick-actions .btnAccesoRapido h3,
      .quick-actions .btnAccesoRapido p,
      .quick-actions .btnAccesoRapido small{
        margin: 0;
      }
    }

    /**/
