/* ================= UNHEVAL Palette ================= */
:root {
    --uhe-blue: #1976D2;
    /* azul institucional */
    --uhe-blue-dark: #0D47A1;
    /* azul profundo */
    --uhe-blue-100: #E3F2FD;
    /* azul muy claro (fondos sutiles) */
    --uhe-green: #2E7D32;
    --uhe-green-dark: #1B5E20;
    --uhe-gold: #FFCA28;
    --uhe-gold-200: #FFE082;
    --uhe-text: #263238;
    --uhe-muted: #607D8B;
    --uhe-surface: #F8FAFC;
    /* fondo app */
    --uhe-elev: #FFFFFF;
    /* tarjetas/nav */
    --uhe-border: rgba(13, 71, 161, .12);
    --shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

/* ============ Base ============ */
html,
body {
    height: 100%
}

html,
body {
    overflow-x: hidden !important;
}

/* nunca ensanchar la página */
body {
    background: var(--uhe-surface);
    font-family: 'Poppins', sans-serif;
    color: var(--uhe-text);
    margin: 0;
}

/* layout principal: navbar + sidebar + main (flex) */
.d-flex>main {
    min-width: 0;
    /* CLAVE: permite encoger dentro de flex */
    overflow-x: clip;
    /* evita sangrados laterales */
}

/* ============ Hero (portada) ============ */
.masthead {
    background: linear-gradient(180deg, var(--uhe-blue) 0%, var(--uhe-blue-dark) 100%);
    color: #fff !important;
    min-height: 30rem;
    padding-top: 1rem;
}

.masthead h1 {
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, .35);
    color: var(--uhe-gold);
}

@media (min-width:992px) {
    .masthead h1 {
        font-size: 3.5rem
    }
}

.masthead .logo-app,
.masthead .logo-uheval {
    height: 250px;
    width: auto
}

.masthead .logo-uheval {
    opacity: .95
}

@media (max-width:576px) {

    .masthead .logo-app,
    .masthead .logo-uheval {
        height: 96px
    }
}

.masthead .gap-4 {
    gap: 1.25rem !important
}

/* ============ Navbar ============ */
.navbar-uhe {
    background-color: var(--uhe-blue) !important;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--uhe-border);
    --bs-navbar-color: #fff;
    --bs-navbar-hover-color: var(--uhe-gold);
    --bs-navbar-active-color: var(--uhe-gold);
    --bs-navbar-brand-color: #fff;
    --bs-navbar-brand-hover-color: var(--uhe-gold);
    --bs-navbar-toggler-border-color: var(--uhe-gold);
}

.navbar-uhe .navbar-toggler-icon {
    filter: invert(1) opacity(.9)
}

.navbar,
.navbar .nav-link {
    color: var(--uhe-text)
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--uhe-blue)
}

.navbar.is-scrolled {
    padding-top: .25rem;
    padding-bottom: .25rem;
    box-shadow: var(--shadow)
}

.navbar-toggler {
    padding: .25rem .35rem;
    border-color: var(--uhe-gold) !important
}

.navbar-uhe .text-end,
.navbar-uhe .text-end strong {
    color: #fff !important
}

.navbar-uhe .text-end small {
    color: rgba(255, 255, 255, .75) !important
}

/* Marca e iconos */
.brand-img {
    display: block;
    height: 40px;
    width: auto;
    object-fit: contain
}

@media (min-width:576px) {
    .brand-img {
        height: 44px
    }
}

@media (min-width:992px) {
    .brand-img {
        height: 54px
    }
}

.nav-icon-link {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    line-height: 1
}

.nav-icon-link:hover,
.nav-icon-link:focus {
    color: var(--uhe-gold)
}

.avatar-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border: 2px solid var(--uhe-blue-100)
}

@media (max-width:575.98px) {
    .avatar-img {
        width: 40px;
        height: 40px
    }
}

/* ============ Sidebar (modo claro) ============ */
.sidebar-uhe-light {
    background: #fff !important;
    color: var(--uhe-blue-dark)
}

.sidebar-uhe-light .p-3 {
    background: #fff;
    border-bottom: 1px solid var(--uhe-border)
}

.sidebar-uhe-light .sidebar-title {
    color: var(--uhe-blue-dark)
}

.sidebar-uhe-light #toggle-btn {
    border-color: var(--uhe-blue);
    color: var(--uhe-blue)
}

.sidebar-uhe-light #toggle-btn:hover {
    background: var(--uhe-blue);
    color: #fff
}

.sidebar-uhe-light #toggle-btn i {
    color: var(--uhe-blue)
}

.sidebar-uhe-light .sidebar-section {
    color: var(--uhe-blue-dark) !important;
    letter-spacing: .06em
}

.sidebar-uhe-light .nav-link {
    color: var(--uhe-blue) !important;
    border-radius: .5rem;
    padding: .55rem .75rem
}

.sidebar-uhe-light .nav-link i {
    color: var(--uhe-blue) !important
}

.sidebar-uhe-light .nav-link:hover {
    background: var(--uhe-blue-100);
    color: var(--uhe-blue-dark) !important
}

.sidebar-uhe-light .nav-link:hover i {
    color: var(--uhe-blue-dark) !important
}

.sidebar-uhe-light .nav-link.active {
    position: relative;
    background: var(--uhe-blue-100);
    color: var(--uhe-blue-dark) !important;
    font-weight: 600
}

.sidebar-uhe-light .nav-link.active i {
    color: var(--uhe-blue-dark) !important
}

.sidebar-uhe-light .nav-link.active::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 3px;
    background: var(--uhe-blue)
}

.sidebar-uhe-light .logout-link {
    color: #dc3545 !important
}

.sidebar-uhe-light .logout-link:hover {
    background: rgba(220, 53, 69, .08);
    color: #b02a37 !important
}

.sidebar-uhe-light.sidebar {
    position: sticky;
    top: 56px;
    height: calc(100dvh - 56px)
}

.sidebar-uhe-light.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: .65rem 0
}

.sidebar-uhe-light.sidebar.collapsed .nav-link i {
    margin-right: 0 !important
}

.sidebar-uhe-light.sidebar.collapsed .sidebar-section,
.sidebar-uhe-light.sidebar.collapsed .label,
.sidebar-uhe-light.sidebar.collapsed .sidebar-title {
    display: none !important
}

#sidebarMobile.sidebar-uhe-light .offcanvas-header {
    background: #fff;
    border-bottom: 1px solid var(--uhe-border)
}

#sidebarMobile.sidebar-uhe-light .btn-close {
    filter: none
}

/* ============ Botones ============ */
.btn {
    border-radius: 10px;
    font-weight: 600;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
    position: relative;
    overflow: hidden;
    font-size: 14px;
    padding: 8px 16px
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
    transition: left .5s
}

.btn:hover::before {
    left: 100%
}

.btn-outline-secondary {
    background: rgba(148, 163, 184, .1);
    border: 2px solid rgba(148, 163, 184, .3);
    color: #475569;
    backdrop-filter: blur(10px)
}

.btn-outline-secondary:hover {
    background: #475569;
    border-color: #475569;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(71, 85, 105, .3)
}

.btn-outline-success {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: #fff
}

.btn-outline-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669, #047857);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(16, 185, 129, .4)
}

.btn-outline-success:disabled {
    background: rgba(148, 163, 184, .3);
    color: rgba(100, 116, 139, .5);
    border: 1px solid rgba(148, 163, 184, .3)
}

.btn-outline-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    color: #fff
}

.btn-outline-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(239, 68, 68, .4)
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border: none;
    color: #fff
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a)
}

.btn-info {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border: none;
    color: #fff
}

.btn-info:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1)
}

/* ============ Hero compacto vistas internas (equipos-hero) ============ */
.equipos-hero {
    background: linear-gradient(135deg, #e0f0ff, #cfe4ff);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 3px 6px rgba(37, 99, 235, .08);
    flex-wrap: wrap;
    gap: .75rem;
}

.equipos-hero h1 {
    margin: 0;
    font-weight: 800;
    font-size: 1.4rem;
    color: #1d4ed8
}

.equipos-hero small {
    display: block;
    margin-top: .25rem;
    font-size: .9rem;
    color: #475569
}

.equipos-hero .btn {
    border-radius: 10px;
    font-weight: 600;
    padding: .5rem 1rem;
    background: #2563eb;
    border: none;
    box-shadow: 0 2px 4px rgba(37, 99, 235, .25);
    transition: transform .12s ease, box-shadow .12s ease
}

.equipos-hero .btn:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(37, 99, 235, .3)
}

@media (max-width:576px) {
    .equipos-hero>div {
        width: 100%
    }

    .equipos-hero .btn {
        width: 100%
    }
}

/* ============ TABLAS (con DataTables scrollX) ============ */
/* Estética base de la tabla */
.table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px
}

.table th {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e3a8a;
    font-weight: 600;
    border: none;
    padding: 14px 12px;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
    /* cabeceras compactas */
}

.table td {
    border: none;
    padding: 14px 12px;
    vertical-align: middle;
    transition: background .2s ease;
    white-space: normal;
    word-break: break-word;
    /* texto largo se parte */
}

.table th.text-center,
.table td.text-center,
.table th.text-end,
.table td.text-end {
    white-space: nowrap
}

.table tbody tr:hover {
    background: #eff6ff
}

@media (max-width:576px) {
    .table tbody tr:hover {
        transform: none !important
    }

    .table .btn {
        padding: 6px 10px;
        font-size: .8rem
    }
}

/* ---- DataTables: scroll horizontal confiable ---- */
.dataTables_wrapper .dataTables_scrollHead {
    overflow: hidden
}

.dataTables_wrapper .dataTables_scrollHead table {
    margin: 0 !important
}

.dataTables_wrapper .dataTables_scrollBody {
    overflow-x: auto !important;
    /* barra horizontal vive aquí */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.dataTables_wrapper .dataTables_scrollBody table {
    margin: 0 !important
}

/* Opcional: mantener cabecera siempre visible con FixedHeader */
.fixedHeader-floating {
    z-index: 1030;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08)
}

/* Si usas clase .nowrap en la tabla, fuerza no cortar contenido horizontal */
table.nowrap td,
table.nowrap th {
    white-space: nowrap
}

/* ============ Modales ============ */
.modal,
.modal-dialog,
.modal-content,
.modal * {
    pointer-events: auto !important
}

.modal-content {
    border: none;
    border-radius: 16px;
    background: rgba(255, 255, 255, .98);
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, .15)
}

.modal-header {
    background: linear-gradient(135deg, #eef4ff, #e6efff);
    border: none;
    border-radius: 16px 16px 0 0
}

.modal-title {
    width: 100%;
    text-align: center;
    color: #2563eb;
    font-weight: 800
}

.modal-footer {
    border: none;
    background: #f3f7ff;
    border-radius: 0 0 16px 16px
}

.modal-footer .btn-secondary {
    background: #eef2f7;
    color: #334155;
    border: 1px solid #cbd5e1;
    font-weight: 600
}

.modal-footer .btn-secondary:hover {
    background: #334155;
    color: #fff;
    border-color: #334155
}

.modal-footer .btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    font-weight: 700
}

.modal-footer .btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857)
}

.modal-body .form-label {
    color: #1e3a8a;
    font-weight: 700
}

.modal-body .form-control {
    border: 2px solid rgba(148, 163, 184, .32);
    border-radius: 10px;
    padding: 12px 14px;
    transition: box-shadow .2s, border-color .2s
}

.modal-body .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12)
}

.modal-body .input-group .btn.btn-outline-secondary {
    border-left: none
}

/* ============ Footer ============ */
.footer-uheval,
.footer-greenlinks {
    background: linear-gradient(180deg, var(--uhe-blue-dark) 0%, #0A2E6E 100%);
    color: #F5F5F5;
    width: 100%;
    padding-top: 3rem;
    padding-bottom: 2rem;
    font-family: 'Poppins', sans-serif;
}

.footer-uheval h4,
.footer-greenlinks h4 {
    color: var(--uhe-gold) !important;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    text-transform: uppercase
}

.footer-uheval p,
.footer-uheval a,
.footer-uheval i,
.footer-uheval span,
.footer-greenlinks p,
.footer-greenlinks a,
.footer-greenlinks i,
.footer-greenlinks span {
    color: #E0E0E0 !important;
    opacity: 1 !important;
    font-size: .95rem;
    transition: color .3s ease, opacity .3s ease
}

.footer-uheval a:hover,
.footer-greenlinks a:hover {
    color: var(--uhe-gold) !important;
    text-decoration: none
}

.footer-uheval .btn-outline-light,
.footer-greenlinks .btn-outline-light {
    border-color: var(--uhe-gold) !important;
    color: var(--uhe-gold) !important;
    margin-right: .5rem;
    transition: all .3s ease-in-out
}

.footer-uheval .btn-outline-light:hover,
.footer-greenlinks .btn-outline-light:hover {
    background-color: var(--uhe-gold) !important;
    color: var(--uhe-blue-dark) !important
}

.footer-uheval .border-top,
.footer-greenlinks .border-top {
    border-top: 1px solid rgba(255, 255, 255, .15);
    font-size: .85rem;
    color: #B0BEC5
}

.footer-uheval .link-item,
.footer-greenlinks .link-item {
    color: var(--uhe-gold) !important;
    font-weight: 600
}

.footer-uheval .link-item:hover,
.footer-greenlinks .link-item:hover {
    color: var(--uhe-gold-200) !important
}

.footer-uheval i,
.footer-greenlinks i {
    width: 1.25rem;
    text-align: center
}

@media (max-width:576px) {

    .footer-uheval h4,
    .footer-greenlinks h4 {
        font-size: 1rem
    }

    .footer-uheval p,
    .footer-uheval a,
    .footer-uheval span,
    .footer-greenlinks p,
    .footer-greenlinks a,
    .footer-greenlinks span {
        font-size: .9rem
    }
}

/* ====== Team Members (scoped) ====== */
.tm-scope {
    --tm-blue: var(--uhe-blue, #2563eb);
    --tm-blue-dark: var(--uhe-blue-dark, #1e40af);
    --tm-blue-100: var(--uhe-blue-100, #dbeafe);
    --tm-blue-50: #eff6ff;
    --tm-accent: #0ea5e9;

    --tm-grad-primary: linear-gradient(135deg, var(--tm-blue) 0%, var(--tm-blue-dark) 100%);
    --tm-grad-light: linear-gradient(135deg, var(--tm-blue-100) 0%, #bfdbfe 100%);

    --tm-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
    --tm-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);
    --tm-radius: 12px;
    --tm-transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

/* Header compacto de la vista */
.tm-scope .tm-header {
    background: var(--tm-grad-light);
    padding: 20px;
    border-radius: var(--tm-radius);
    margin-bottom: 20px;
    border: 1px solid rgba(37, 99, 235, .1);
    transition: var(--tm-transition);
}

.tm-scope .tm-header:hover {
    transform: translateY(-2px);
    box-shadow: var(--tm-hover-shadow);
}

.tm-scope .tm-title {
    background: var(--tm-grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 6px;
}

/* Tarjetas */
.tm-scope .card {
    border: none;
    border-radius: var(--tm-radius);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(16px);
    transition: var(--tm-transition);
    overflow: hidden;
    box-shadow: var(--tm-card-shadow);
}

.tm-scope .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--tm-hover-shadow);
}

.tm-scope .card-header {
    background: var(--tm-grad-primary);
    color: #fff;
    border: none;
    font-weight: 600;
    padding: 14px 18px;
}

.tm-scope .card-body {
    padding: 16px;
}

.tm-scope .card-footer {
    background: var(--tm-blue-50);
    border: none;
    padding: 12px 16px;
}

/* Formularios breves dentro de la tarjeta */
.tm-scope .tm-inline-form .form-label {
    font-weight: 600;
    color: var(--tm-blue-dark);
    margin-bottom: 6px;
    font-size: 14px;
}

.tm-scope .tm-inline-form .form-control {
    border: 2px solid rgba(148, 163, 184, .3);
    border-radius: 10px;
    padding: 10px 12px;
    transition: var(--tm-transition);
    background: #fff;
    font-size: 14px;
}

.tm-scope .tm-inline-form .form-control:focus {
    border-color: var(--tm-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

/* DataTables: contenedores con scroll horizontal fiable */
.tm-scope .dt-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tm-scope table.dataTable.no-footer {
    border-bottom: none;
}

/* Responsive tweaks */
@media (min-width: 768px) {
    .tm-scope .tm-header {
        padding: 22px;
    }

    .tm-scope .tm-title {
        font-size: 1.8rem;
    }

    .tm-scope .card-body {
        padding: 18px;
    }
}

/* evita saltos cuando DataTables aplica scrollX */
.dataTables_wrapper .dataTables_scroll {
    overflow: auto;
}


  .integrantes-header {
  background: linear-gradient(90deg, #004aad, #1976d2); /* azul degradado */
  color: #fff; /* texto blanco */
  font-size: 0.95rem;
  font-weight: 600;
  border-top-left-radius: .5rem;
  border-top-right-radius: .5rem;
  padding: .75rem 1rem;
}

.integrantes-header .badge {
  font-weight: 600;
  padding: 0.4em 0.75em;
}
