/*=========================================================
  RESET
=========================================================*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f0f2f5;
}

html {
    overflow-x: hidden;
}

body {
    min-width: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

/*=========================================================
  BARRA SUPERIOR
=========================================================*/

.barra-superior {
    height: 90px;
    background: #000000;
    display: flex;
    align-items: center;
    padding: 0 35px;
    border-bottom: 4px solid #b40000;
}

.logo-header {
    height: 62px;
    margin-right: 18px;
}

.logo-header img {
    height: 100%;
    width: auto;
    display: block;
}

.texto-header {
    min-width: 0;
}

.texto-header h1 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.texto-header p {
    color: #cfcfcf;
    font-size: 15px;
}

.barra-superior .info-usuario {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    color: #cfcfcf;
    font-size: 14px;
}

.barra-superior .info-usuario .nombre {
    color: #ffffff;
    font-weight: 600;
}

.barra-superior .info-usuario .organizacion {
    color: #d9d9d9;
    font-size: 13px;
}

.barra-superior .info-usuario .btn-cerrar {
    background: #b40000;
    color: #ffffff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
}

.barra-superior .info-usuario .btn-cerrar:hover {
    background: #8a0000;
}

/*=========================================================
  PIE DE PÁGINA
=========================================================*/

.barra-inferior {
    height: 50px;
    background: #000000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 4px solid #b40000;
    font-size: 14px;
    letter-spacing: 0.3px;
}

/*=========================================================
  LOGIN
=========================================================*/

.contenido-principal {
    display: flex;
    height: calc(100vh - 140px);
    min-height: 400px;
}

.panel-izquierdo {
    flex: 0 0 72%;
    background: #ececec;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.fondo-institucional {
    width: 100%;
    height: 100%;
    background-image: url("../img/fondo.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.panel-derecho {
    flex: 1;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-width: 0;
}

.login-card {
    width: 100%;
    max-width: 300px;
    background: #ffffff;
    border-radius: 14px;
    padding: 28px 24px 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.login-titulo {
    text-align: center;
    margin-bottom: 20px;
}

.login-titulo h2 {
    font-size: 24px;
    font-weight: 600;
    color: #143f8f;
    letter-spacing: 0.3px;
}

.login-titulo h3 {
    font-size: 18px;
    font-weight: 400;
    color: #444;
    margin-top: -2px;
    margin-bottom: 8px;
}

.login-titulo p {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    max-width: 240px;
    margin: 0 auto;
}

.login-card .campo {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.login-card .campo label {
    flex: 0 0 90px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
    text-align: right;
}

.login-card .campo input {
    flex: 1;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 14px;
    background: #fafbfc;
    height: 42px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-card .campo input:focus {
    border-color: #143f8f;
    box-shadow: 0 0 0 3px rgba(20, 63, 143, 0.1);
    outline: none;
}

.login-card button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #143f8f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 4px;
}

.login-card button[type="submit"]:hover {
    background: #0d2f6b;
}

.mensaje-error {
    color: #dc3545;
    font-size: 14px;
    margin-bottom: 12px;
    text-align: center;
}

.mensaje-ok {
    color: #28a745;
    font-size: 14px;
    margin-bottom: 12px;
    text-align: center;
}

.login-footer {
    margin-top: 22px;
    background: #0d4fb5;
    border-radius: 10px;
    padding: 12px 10px 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.login-footer span {
    font-size: 13px;
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.login-footer img {
    height: 36px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

/*=========================================================
  ESTRUCTURA GENERAL DEL DASHBOARD
=========================================================*/

.contenido-dashboard {
    padding: 30px 35px 25px;
    background: #f7f7f7;
    flex: 1;
    overflow-y: auto;
    min-width: 0;
}

.cabecera-modulo {
    margin-bottom: 28px;
}

.cabecera-modulo h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.cabecera-modulo .subtitulo {
    font-size: 16px;
    color: #666;
    margin: 2px 0 4px;
}

.cabecera-modulo .descripcion-modulo {
    font-size: 13px;
    color: #888;
}

.estadistica-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #143f8f;
    text-align: center;
}

.estadistica-card .numero {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}

.estadistica-card .etiqueta {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

/*=========================================================
  BARRA DE ACCIONES Y BÚSQUEDA
=========================================================*/

.barra-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.barra-acciones .grupo-busqueda {
    display: flex;
    flex: 1;
    min-width: 200px;
}

.barra-acciones .grupo-busqueda input {
    flex: 1;
    min-width: 0;
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
}

.barra-acciones .grupo-busqueda button {
    padding: 8px 16px;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 6px 6px 0;
    background: #143f8f;
    color: #fff;
    cursor: pointer;
}

.barra-acciones .grupo-busqueda button:hover {
    background: #0d2f6b;
}

/*=========================================================
  FILTROS MODERNOS
=========================================================*/

.filtros-modernos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 28px;
    padding: 12px 16px;
    background: #f7f7f7;
    border-radius: 8px;
}

.filtros-modernos label {
    font-weight: 500;
    font-size: 13px;
    color: #333;
}

.filtros-modernos select,
.filtros-modernos input {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    max-width: 100%;
}

.filtros-modernos .btn-filtrar {
    padding: 6px 18px;
    border: none;
    border-radius: 6px;
    background: #143f8f;
    color: #fff;
    cursor: pointer;
    font-weight: 500;
}

.filtros-modernos .btn-filtrar:hover {
    background: #0d2f6b;
}

.filtros-modernos .btn-limpiar {
    padding: 6px 18px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.filtros-modernos .btn-limpiar:hover {
    background: #f0f0f0;
}

/*=========================================================
  TABLA PROFESIONAL
=========================================================*/

.tabla-profesional {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    overflow: auto;
    padding: 4px 0;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.tabla-zebra {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 600px;
}

.tabla-zebra thead {
    background: #1a1a1a;
}

.tabla-zebra thead th {
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    padding: 16px 20px;
    text-align: left;
    border-bottom: 2px solid #b40000;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tabla-zebra thead th:first-child {
    border-top-left-radius: 12px;
}

.tabla-zebra thead th:last-child {
    border-top-right-radius: 12px;
}

.tabla-zebra tbody tr {
    transition: all 0.15s ease;
}

.tabla-zebra tbody tr:nth-child(odd) {
    background: #ffffff;
}

.tabla-zebra tbody tr:nth-child(even) {
    background: #fafbfc;
}

.tabla-zebra tbody tr:hover {
    background: #f0f3f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    cursor: default;
}

.tabla-zebra tbody td {
    padding: 16px 20px;
    border-bottom: 1px solid #eaeef2;
    vertical-align: middle;
}

.tabla-zebra tbody tr:last-child td {
    border-bottom: none;
}

.badge-estado {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.badge-estado.activo {
    background: #e6f7e6;
    color: #1a7a3a;
}

.badge-estado.inactivo {
    background: #f8e8e8;
    color: #a13d3d;
}

.badge-estado::before {
    content: "● ";
    font-size: 10px;
}

.badge-estado.activo::before {
    color: #28a745;
}

.badge-estado.inactivo::before {
    color: #dc3545;
}

/*=========================================================
  BOTONES
=========================================================*/

.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    text-align: center;
}

.btn-primario {
    background: #143f8f;
    color: #ffffff;
}

.btn-primario:hover {
    background: #0d2f6b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 63, 143, 0.2);
}

.btn-secundario {
    background: #f0f2f5;
    color: #333;
}

.btn-secundario:hover {
    background: #e2e6ea;
}

.btn-cerrar {
    background: #b40000;
    color: #ffffff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-cerrar:hover {
    background: #8a0000;
}

/*=========================================================
  ACCIONES UNIFORMES
=========================================================*/

.grupo-acciones {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: nowrap;
}

.btn-accion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f5f6f8;
    color: #444;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    flex-shrink: 0;
}

.btn-accion:hover {
    background: #143f8f;
    color: #ffffff;
    border-color: #143f8f;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.btn-accion:active {
    transform: translateY(0);
}

/*=========================================================
  MENSAJES FLASH
=========================================================*/

.mensaje-flash {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    border-left: 4px solid transparent;
}

.mensaje-exito {
    background: #e6f7e6;
    border-color: #28a745;
    color: #1a7a3a;
}

.mensaje-error {
    background: #f8e8e8;
    border-color: #dc3545;
    color: #a13d3d;
}

.cerrar-mensaje {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    padding: 0 4px;
}

.cerrar-mensaje:hover {
    opacity: 0.7;
}

/*=========================================================
  SIN DATOS
=========================================================*/

.sin-datos {
    text-align: center;
    padding: 40px 0 !important;
    color: #888;
    font-style: italic;
}

/*=========================================================
  AVATAR CON INICIALES
=========================================================*/

.avatar-iniciales {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #143f8f;
    color: #ffffff;
    font-weight: 600;
    font-size: 15px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.nombre-principal {
    font-weight: 600;
    font-size: 16px;
    color: #222222;
}

.nombre-secundario {
    font-size: 12px;
    color: #888888;
    font-weight: 400;
    margin-top: 1px;
}

/*=========================================================
  FORMULARIOS MODERNOS
=========================================================*/

.formulario-moderno {
    background: #ffffff;
    padding: 28px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    min-width: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 30px;
}

.form-grid .campo {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.form-grid .campo label {
    font-weight: 500;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.form-grid .campo input,
.form-grid .campo select,
.form-grid .campo textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 14px;
    background: #fafbfc;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-grid .campo input:focus,
.form-grid .campo select:focus,
.form-grid .campo textarea:focus {
    border-color: #143f8f;
    box-shadow: 0 0 0 3px rgba(20, 63, 143, 0.1);
    outline: none;
    background: #ffffff;
}

.form-grid .campo textarea {
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.acciones-form {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.acciones-form .btn {
    min-width: 140px;
    text-align: center;
}

/*=========================================================
  EMAIL TRUNCADO
=========================================================*/

.col-email span[title] {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-email .vacio {
    color: #aaa;
}

/*=========================================================
  MENÚ PRINCIPAL
=========================================================*/

.menu-principal {
    background: #1a1a1a;
    border-bottom: 2px solid #b40000;
    padding: 0 35px;
    display: flex;
    align-items: center;
    height: 50px;
    min-width: 0;
}

.menu-principal ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    height: 100%;
}

.menu-principal ul li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.menu-principal ul li a {
    color: #ffffff;
    text-decoration: none;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 500;
    height: 100%;
    display: flex;
    align-items: center;
    transition: background 0.2s, color 0.2s;
    border-radius: 4px 4px 0 0;
    white-space: nowrap;
}

.menu-principal ul li a:hover {
    background: #b40000;
    color: #ffffff;
}

.menu-principal ul li a.activo {
    background: #b40000;
    color: #ffffff;
}

/*=========================================================
  TARJETAS DE DASHBOARD
=========================================================*/

.tarjetas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.tarjeta {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px 20px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: #1a1a1a;
    border: 1px solid #eaeaea;
    min-width: 0;
}

.tarjeta:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

.tarjeta .icono {
    font-size: 36px;
    margin-bottom: 8px;
    display: block;
}

.tarjeta .titulo-tarjeta {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.tarjeta .descripcion {
    font-size: 13px;
    color: #888;
}

.tarjeta.azul {
    border-top: 4px solid #143f8f;
}

.tarjeta.verde {
    border-top: 4px solid #28a745;
}

.tarjeta.naranja {
    border-top: 4px solid #fd7e14;
}

.tarjeta.roja {
    border-top: 4px solid #b40000;
}

.tarjeta.gris {
    border-top: 4px solid #6c757d;
}

/*=========================================================
  MENÚ DESPLEGABLE
=========================================================*/

.menu-principal ul li.dropdown {
    position: relative;
}

.menu-principal ul li.dropdown > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-top: 2px solid #b40000;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    padding: 4px 0;
    height: auto !important;
    align-items: stretch !important;
    gap: 0 !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    flex-direction: column;
}

.menu-principal ul li.dropdown:hover > ul {
    display: flex !important;
}

.menu-principal ul li.dropdown ul li {
    height: auto !important;
    display: block !important;
    width: 100%;
}

.menu-principal ul li.dropdown ul li a {
    display: block !important;
    padding: 10px 20px !important;
    height: auto !important;
    font-size: 13px;
    border-radius: 0 !important;
    white-space: nowrap;
}

.menu-principal ul li.dropdown ul li a:hover {
    background: #b40000;
}

/*=========================================================
  SUBMENÚ ANIDADO
=========================================================*/

.menu-principal ul li.dropdown ul li.dropdown-sub {
    position: relative;
}

.menu-principal ul li.dropdown ul li.dropdown-sub > ul {
    display: none !important;
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 200px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-left: 2px solid #b40000;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    padding: 4px 0;
    flex-direction: column;
}

.menu-principal ul li.dropdown ul li.dropdown-sub:hover > ul {
    display: flex !important;
}

.menu-principal ul li.dropdown ul li.dropdown-sub > ul li {
    height: auto !important;
    display: block !important;
    width: 100%;
}

.menu-principal ul li.dropdown ul li.dropdown-sub > ul li a {
    display: block !important;
    padding: 10px 20px !important;
    height: auto !important;
    font-size: 13px;
    border-radius: 0 !important;
    white-space: nowrap;
    color: #ffffff !important;
}

.menu-principal ul li.dropdown ul li.dropdown-sub > ul li a:hover {
    background: #b40000 !important;
}

.menu-principal ul li.dropdown ul li.dropdown-sub > ul li a.activo {
    background: #b40000 !important;
    color: #ffffff !important;
}

/*=========================================================
  MENÚ DE EVENTOS
=========================================================*/

.menu-eventos {
    background: #1a1a1a;
    padding: 0 20px;
    border-bottom: 3px solid #c0392b;
}

.menu-eventos ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
}

.menu-eventos ul li {
    display: inline-block;
    margin: 0;
}

.menu-eventos ul li a {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
    border-right: 1px solid #333;
}

.menu-eventos ul li a:hover {
    background: #c0392b;
}

.menu-eventos ul li a.activo {
    background: #c0392b;
}

.menu-eventos ul li:first-child a {
    border-left: 1px solid #333;
}

/*=========================================================
  RESPONSIVE — 1100 PX
=========================================================*/

@media (max-width: 1100px) {

    .barra-superior {
        padding: 0 24px;
    }

    .texto-header h1 {
        font-size: 20px;
    }

    .texto-header p {
        font-size: 14px;
    }

    .panel-izquierdo {
        flex-basis: 65%;
    }

    .panel-derecho {
        padding: 18px;
    }

    .contenido-dashboard {
        padding-left: 24px;
        padding-right: 24px;
    }

    .menu-principal {
        padding-left: 20px;
        padding-right: 20px;
    }

    .menu-principal ul li a {
        padding-left: 13px;
        padding-right: 13px;
    }
}

/*=========================================================
  RESPONSIVE — 820 PX / TABLET
=========================================================*/

@media (max-width: 820px) {

    .barra-superior {
        min-height: 78px;
        height: auto;
        padding: 10px 18px;
        gap: 12px;
        align-items: center;
    }

    .logo-header {
        height: 52px;
        margin-right: 0;
        flex: 0 0 auto;
    }

    .texto-header {
        min-width: 0;
    }

    .texto-header h1 {
        font-size: 18px;
        line-height: 1.15;
    }

    .texto-header p {
        font-size: 13px;
        line-height: 1.2;
    }

    .barra-superior .info-usuario {
        gap: 10px;
        font-size: 13px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .barra-superior .info-usuario .organizacion {
        display: none;
    }

    /* Login: una columna */
    .contenido-principal {
        height: auto;
        min-height: calc(100vh - 128px);
        flex-direction: column;
    }

    .panel-izquierdo {
        flex: none;
        width: 100%;
        height: 48vw;
        min-height: 260px;
        max-height: 430px;
    }

    .fondo-institucional {
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center center;
    }

    .panel-derecho {
        width: 100%;
        flex: none;
        min-height: 430px;
        padding: 30px 20px;
    }

    .login-card {
        max-width: 420px;
    }

    /* Menú */
    .menu-principal {
        height: auto;
        min-height: 50px;
        padding: 0 12px;
    }

    .menu-principal > ul {
        width: 100%;
        height: auto;
        min-height: 50px;
        flex-wrap: wrap;
        gap: 0;
    }

    .menu-principal > ul > li {
        height: 50px;
    }

    .menu-principal ul li a {
        padding: 0 12px;
        font-size: 13px;
    }

    /* Dashboard */
    .cabecera-modulo h2 {
        font-size: 24px;
    }

    .cabecera-modulo .subtitulo {
        font-size: 15px;
    }

    .tarjetas {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .tarjeta {
        padding: 20px 14px;
    }

    .form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .tabla-profesional {
        border-radius: 12px;
    }

    .tabla-zebra {
        font-size: 13px;
    }

    .tabla-zebra thead th,
    .tabla-zebra tbody td {
        padding: 12px 16px;
    }

    .tabla-zebra .col-fecha {
        width: 100px;
    }

    .tabla-zebra .col-telefono {
        width: 110px;
    }

    .tabla-zebra .col-email {
        width: 180px;
    }

    .tabla-zebra .col-acciones {
        width: 110px;
    }

    .avatar-iniciales {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .btn-accion {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/*=========================================================
  RESPONSIVE — 768 PX
=========================================================*/

@media (max-width: 768px) {

    .menu-principal ul li.dropdown ul li.dropdown-sub > ul {
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        padding-left: 20px !important;
        border-left: 2px solid #b40000 !important;
        margin-left: 10px !important;
        width: auto !important;
        display: flex !important;
        flex-direction: column;
    }

    .menu-principal ul li.dropdown ul li.dropdown-sub > ul li a {
        color: #cccccc !important;
        padding: 6px 14px !important;
        font-size: 13px;
    }

    .menu-principal ul li.dropdown ul li.dropdown-sub > ul li a:hover {
        background: transparent !important;
        color: #ffffff !important;
    }

    .menu-principal ul li.dropdown ul li.dropdown-sub > ul li a.activo {
        background: transparent !important;
        color: #ffffff !important;
        border-left: 2px solid #b40000;
        padding-left: 12px !important;
    }
}

/*=========================================================
  RESPONSIVE — 640 PX / CELULAR
=========================================================*/

@media (max-width: 640px) {

    .barra-superior {
        min-height: 70px;
        padding: 9px 12px;
        gap: 9px;
    }

    .logo-header {
        height: 44px;
    }

    .texto-header h1 {
        font-size: 15px;
        line-height: 1.12;
    }

    .texto-header p {
        font-size: 11px;
        margin-top: 2px;
    }

    .barra-superior .info-usuario {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
        gap: 8px;
    }

    .barra-superior:has(.info-usuario) {
        flex-wrap: wrap;
    }

    .contenido-principal {
        min-height: 0;
    }

    .panel-izquierdo {
        height: 52vw;
        min-height: 190px;
        max-height: 300px;
    }

    .fondo-institucional {
        background-size: cover;
        background-position: center center;
    }

    .panel-derecho {
        min-height: 0;
        padding: 22px 12px 28px;
    }

    .login-card {
        width: 100%;
        max-width: 100%;
        padding: 24px 18px 18px;
        border-radius: 12px;
    }

    .login-titulo {
        margin-bottom: 18px;
    }

    .login-titulo h2 {
        font-size: 21px;
    }

    .login-titulo h3 {
        font-size: 16px;
    }

    .login-titulo p {
        max-width: 100%;
        font-size: 12px;
    }

    .login-card .campo {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin-bottom: 14px;
    }

    .login-card .campo label {
        flex: none;
        text-align: left;
        font-size: 13px;
    }

    .login-card .campo input {
        width: 100%;
        min-height: 44px;
        font-size: 16px;
    }

    .login-card button[type="submit"] {
        min-height: 44px;
    }

    .login-footer {
        margin-top: 18px;
        padding: 10px;
    }

    /* Menú móvil */
    .menu-principal {
        padding: 0;
        min-height: 0;
    }

    .menu-principal > ul {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
    }

    .menu-principal > ul > li {
        width: 100%;
        height: auto;
        min-height: 44px;
        border-bottom: 1px solid #333;
    }

    .menu-principal ul li a {
        width: 100%;
        min-height: 44px;
        height: auto;
        padding: 11px 14px;
        font-size: 14px;
        border-radius: 0;
    }

    .menu-principal ul li.dropdown > ul {
        position: static !important;
        width: 100% !important;
        min-width: 0 !important;
        box-shadow: none !important;
        border: none !important;
        border-top: 1px solid #333 !important;
        background: #111 !important;
        padding: 0 !important;
        display: none !important;
    }

    .menu-principal ul li.dropdown:hover > ul {
        display: flex !important;
    }

    .menu-principal ul li.dropdown ul li {
        width: 100%;
    }

    .menu-principal ul li.dropdown ul li a {
        white-space: normal;
        padding: 10px 20px !important;
        min-height: 40px;
        font-size: 13px;
    }

    .menu-principal ul li.dropdown ul li.dropdown-sub > ul {
        position: static !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 0 0 18px !important;
        border-left: 2px solid #b40000 !important;
        border-top: none !important;
    }

    /* Dashboard */
    .contenido-dashboard {
        padding: 18px 12px 20px;
        overflow-x: hidden;
    }

    .cabecera-modulo {
        margin-bottom: 20px;
    }

    .cabecera-modulo h2 {
        font-size: 21px;
        line-height: 1.2;
    }

    .cabecera-modulo .subtitulo {
        font-size: 14px;
    }

    .cabecera-modulo .descripcion-modulo {
        font-size: 12px;
    }

    .barra-acciones {
        width: 100%;
        gap: 8px;
    }

    .barra-acciones .grupo-busqueda {
        width: 100%;
        min-width: 0;
    }

    .barra-acciones .grupo-busqueda input {
        min-width: 0;
        width: 100%;
    }

    .barra-acciones .grupo-busqueda button {
        flex: 0 0 auto;
    }

    .filtros-modernos {
        padding: 12px;
        gap: 9px;
        margin-bottom: 18px;
    }

    .filtros-modernos select,
    .filtros-modernos input,
    .filtros-modernos .btn-filtrar,
    .filtros-modernos .btn-limpiar {
        width: 100%;
        min-height: 40px;
    }

    .tarjetas {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tarjeta {
        padding: 18px 14px;
    }

    .tarjeta .icono {
        font-size: 30px;
    }

    .formulario-moderno {
        padding: 18px 14px;
        border-radius: 12px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .acciones-form {
        flex-direction: column;
        width: 100%;
    }

    .acciones-form .btn {
        width: 100%;
        min-width: 0;
    }

    .mensaje-flash {
        padding: 12px 14px;
        align-items: flex-start;
        gap: 10px;
        font-size: 13px;
    }

    .barra-inferior {
        min-height: 50px;
        height: auto;
        padding: 10px 12px;
        text-align: center;
        font-size: 11px;
        line-height: 1.35;
    }

    .menu-eventos {
        padding: 0;
    }

    .menu-eventos ul {
        flex-direction: column;
        width: 100%;
    }

    .menu-eventos ul li {
        display: block;
        width: 100%;
    }

    .menu-eventos ul li a {
        width: 100%;
        padding: 11px 14px;
        font-size: 13px;
        border-right: none;
        border-bottom: 1px solid #333;
    }

    .tabla-profesional {
        border-radius: 10px;
    }

    .tabla-zebra {
        min-width: 0;
        width: 100%;
        font-size: 12px;
    }

    .tabla-zebra thead th,
    .tabla-zebra tbody td {
        padding: 10px 10px;
        font-size: 11px;
    }

    .tabla-zebra .col-fecha,
    .tabla-zebra .col-telefono,
    .tabla-zebra .col-email {
        display: none;
    }

    .tabla-zebra thead th.col-fecha,
    .tabla-zebra thead th.col-telefono,
    .tabla-zebra thead th.col-email {
        display: none;
    }

    .tabla-zebra tbody td.col-fecha,
    .tabla-zebra tbody td.col-telefono,
    .tabla-zebra tbody td.col-email {
        display: none;
    }

    .tabla-zebra .col-nombre {
        min-width: 100px;
    }

    .tabla-zebra .col-acciones {
        width: 80px;
    }

    .avatar-iniciales {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }

    .btn-accion {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .nombre-principal {
        font-size: 13px;
    }

    .nombre-secundario {
        font-size: 10px;
    }

    .badge-estado {
        padding: 2px 8px;
        font-size: 10px;
    }
}

/*=========================================================
  RESPONSIVE — 480 PX
=========================================================*/

@media (max-width: 480px) {

    .contenido-dashboard {
        padding: 15px 12px;
    }

    .barra-acciones {
        flex-direction: column;
        align-items: stretch;
    }

    .barra-acciones .grupo-busqueda {
        min-width: auto;
    }

    .filtros-modernos {
        flex-direction: column;
        align-items: stretch;
    }
}

/*=========================================================
  RESPONSIVE — 380 PX / CELULARES MUY PEQUEÑOS
=========================================================*/

@media (max-width: 380px) {

    .barra-superior {
        padding-left: 9px;
        padding-right: 9px;
    }

    .logo-header {
        height: 38px;
    }

    .texto-header h1 {
        font-size: 13px;
    }

    .texto-header p {
        font-size: 10px;
    }

    .panel-izquierdo {
        min-height: 165px;
    }

    .panel-derecho {
        padding-left: 8px;
        padding-right: 8px;
    }

    .login-card {
        padding-left: 14px;
        padding-right: 14px;
    }

    .login-titulo h2 {
        font-size: 19px;
    }

    .login-titulo h3 {
        font-size: 15px;
    }

    .login-titulo p {
        font-size: 11px;
    }

    .contenido-dashboard {
        padding-left: 9px;
        padding-right: 9px;
    }

    .tabla-profesional {
        border-radius: 9px;
    }
}

/*=========================================================
  CONTENIDO LARGO / ACCESIBILIDAD
=========================================================*/

.texto-header,
.cabecera-modulo,
.tarjeta,
.formulario-moderno,
.login-card {
    overflow-wrap: anywhere;
}

/*=========================================================
  PANTALLAS CON POCA ALTURA
=========================================================*/

@media (max-height: 650px) and (min-width: 641px) {

    .contenido-principal {
        height: auto;
        min-height: calc(100vh - 140px);
    }

    .panel-derecho {
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .login-card {
        padding-top: 20px;
        padding-bottom: 18px;
    }

    .login-titulo {
        margin-bottom: 14px;
    }
}
