﻿/* ============================================================
   XIREN CONTA - ESTILOS GLOBALES
   ============================================================ */

/* ========== FONDO Y BASE ========== */
.fondoazul {
    background: linear-gradient(135deg, #021a4d 0%, #043a7a 25%, #0051B8 50%, #1a6bc7 75%, #0051B8 100%);
    background-attachment: fixed;
    position: relative;
    overflow: visible;
}

    .fondoazul::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Cdefs%3E%3Cfilter id='glow'%3E%3CfeGaussianBlur stdDeviation='1.5' result='coloredBlur'/%3E%3CfeMerge%3E%3CfeMergeNode in='coloredBlur'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3Cpattern id='rain' x='0' y='0' width='200' height='200' patternUnits='userSpaceOnUse'%3E%3Cline x1='30' y1='0' x2='0' y2='60' stroke='rgba(255,255,255,0.05)' stroke-width='1.5' filter='url(%23glow)'/%3E%3Cline x1='150' y1='80' x2='120' y2='140' stroke='rgba(255,255,255,0.15)' stroke-width='1.5' filter='url(%23glow)'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23rain)'/%3E%3C/svg%3E");
        pointer-events: none;
        z-index: 0;
    }

    .fondoazul > * {
        position: relative;
        z-index: auto;
    }

/* ========== HTML Y BODY BASE ========== */
html {
    font-size: 14px;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    margin: 0 !important;
    padding: 0 0 70px 0 !important; /* ✅ CLAVE: padding-bottom para el footer */
}

@media (max-width: 576px) {
    body {
        padding: 0 0 60px 0 !important; /* ✅ Menos espacio en móviles */
    }
}

/* ========== ENLACES ========== */
a:link {
    color: blue;
}

a:visited {
    color: yellowgreen;
}

a:hover {
    color: hotpink;
}

a:active {
    color: yellow;
}

/* ========== BOTONES ========== */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.btn-error {
    background: linear-gradient(0deg, rgba(255, 15, 15, 1) 0%, rgba(255, 15, 15, 1) 65%, rgba(255, 207, 207, 1) 94%);
    color: white;
    border: none;
}

.btn-rojo {
    background: linear-gradient(0deg, rgba(181, 0, 0, 1) 0%, rgba(181, 0, 0, 1) 69%, rgba(255, 171, 171, 1) 100%);
    color: white;
    border: none;
}

    .btn-rojo:hover {
        color: silver;
    }

.btn-naranja {
    background: linear-gradient(0deg, rgba(181, 0, 0, 1) 0%, rgba(253, 66, 29, 1) 30%, rgba(253, 66, 29, 1) 74%, rgba(255, 248, 232, 1) 100%);
    color: white;
    border: none;
}

    .btn-naranja:hover {
        color: black;
    }

.btn-celeste {
    background: linear-gradient(0deg, rgba(1, 179, 233, 1) 0%, rgba(0, 90, 173, 1) 15%, rgba(1, 179, 233, 1) 75%, rgba(194, 244, 255, 1) 100%);
    border: none;
    font-weight: bold;
}

    .btn-celeste:hover {
        color: lightgray;
    }

.btn-negro {
    background: linear-gradient(0deg, rgba(0, 0, 0, 1) 0%, rgba(38, 38, 38, 1) 69%, rgba(255, 255, 255, 1) 100%);
    border: none;
    color: white;
}

    .btn-negro:hover {
        color: silver;
    }

.btn-plomo {
    background: linear-gradient(0deg, rgba(74, 74, 74, 1) 0%, rgba(131, 131, 131, 1) 41%, rgba(171, 171, 171, 1) 56%, rgba(189, 189, 189, 1) 75%, rgba(232, 232, 232, 1) 100%);
    border: none;
    color: black;
}

    .btn-plomo:hover {
        color: white;
    }

.btn-azul {
    background: linear-gradient(0deg, rgba(0, 63, 209, 1) 0%, rgba(9, 9, 121, 1) 58%, rgba(0, 212, 255, 1) 100%);
    color: white;
    border: none;
}

    .btn-azul:hover {
        color: silver;
    }

/* ========== BACKGROUNDS ========== */
.bg-azul {
    background: linear-gradient(0deg, rgba(2, 0, 36, 1) 0%, rgba(9, 9, 121, 1) 80%, rgba(0, 178, 255, 1) 83%, rgba(9, 9, 121, 1) 100%);
}

.bg-modal-body {
    background: linear-gradient(45deg, rgba(167, 205, 255, 1), #e0eaff);
}

/* ========== FORMS ========== */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ========== INPUTS NUMBER ========== */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button,
.editable-input[type="number"]::-webkit-outer-spin-button,
.editable-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"],
.editable-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ========== TABLAS ========== */
table tbody tr.table-danger td {
    background-color: indianred !important;
    color: black !important;
}

/* ========== CARDS ========== */
.card {
    position: relative;
    z-index: 1;
}

.card-header-size {
    height: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    padding-top: 8px !important;
    padding-bottom: 1px !important;
    box-sizing: border-box;
}

@media (max-width: 576px) {
    .card-header-size {
        height: auto;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }
}

/* ========== SCROLL ========== */
.table-scroll-y {
    max-height: 60vh;
    overflow-y: auto;
    background-color: transparent;
    scrollbar-color: rgba(0,0,0,.35) transparent;
    scrollbar-width: thin;
}

    .table-scroll-y::-webkit-scrollbar {
        width: 8px;
        height: 8px;
        background: transparent;
    }

    .table-scroll-y::-webkit-scrollbar-track {
        background: transparent;
    }

    .table-scroll-y::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.35);
        border-radius: 8px;
        border: 2px solid transparent;
        background-clip: content-box;
    }

        .table-scroll-y::-webkit-scrollbar-thumb:hover {
            background-color: rgba(0, 0, 0, 0.5);
        }

/* ========== DATATABLES ========== */
#tblData tbody tr.table-general > td {
    background-color: white !important;
    color: black !important;
}

#tblData tbody tr.table-general:hover > td {
    background-color: #faf4dd !important;
}

#tblData,
#tblData thead th,
#tblData tbody td {
    border: none !important;
}

    #tblData.dataTable.no-footer {
        border-bottom: none !important;
    }

    #tblData tbody tr,
    #tblData tbody tr td {
        border-top: 0 !important;
        border-bottom: 0 !important;
    }

        #tblData.dataTable.display tbody tr.odd,
        #tblData.dataTable.display tbody tr.even,
        #tblData.dataTable.stripe tbody tr.odd,
        #tblData.dataTable.stripe tbody tr.even,
        #tblData tbody tr.odd,
        #tblData tbody tr.even {
            background-color: transparent !important;
        }

        #tblData tbody tr:hover > td {
            border: none !important;
        }

    #tblData tbody td {
        font-size: 0.85rem !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
        line-height: 1.2 !important;
    }

    #tblData tbody tr.table-general.no-hover:hover > td {
        background-color: inherit !important;
        pointer-events: none;
    }

    #tblData tbody tr.table-success.no-hover > td {
        background-color: #d1e7dd !important;
    }

    /* ========== RESALTADO DE FILAS ========== */
    table.dataTable tbody tr.row-highlight,
    table.dataTable tbody tr.row-highlight td,
    .table tbody tr.row-highlight,
    .table tbody tr.row-highlight td,
    #tblData tbody tr.row-highlight,
    #tblData tbody tr.row-highlight td {
        background-color: #ffc107 !important;
        border-color: #ffc107 !important;
        color: #000 !important;
        font-weight: bold !important;
        transition: background-color 0.3s ease-in-out;
    }

        table.dataTable tbody tr.row-highlight:hover,
        table.dataTable tbody tr.row-highlight:hover td {
            background-color: #ffb300 !important;
        }

@keyframes highlight-pulse {
    0%, 100% {
        background-color: #ffc107;
    }

    50% {
        background-color: #ffeb3b;
    }
}

table.dataTable tbody tr.row-highlight.animated {
    animation: highlight-pulse 1s ease-in-out 3;
}

/* ========== ANIMACIONES DE CONTADORES ========== */
#count-diarios,
#count-ingresos,
#count-egresos,
#count-traspasos,
#count-notas {
    display: inline-block;
    transition: transform 0.3s ease-in-out, color 0.3s ease-in-out;
}

@keyframes count-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
        color: #ffd700;
    }

    100% {
        transform: scale(1);
    }
}

/* ========== NAVBAR ========== */
header {
    position: relative;
    z-index: 1030;
    flex-shrink: 0;
    overflow: visible;
}

    header .navbar {
        overflow: visible;
        margin-bottom: 0;
    }

    header .container-fluid {
        overflow: visible;
    }

.navbar {
    position: relative;
    z-index: 1030;
    overflow: visible;
}

.navbar-collapse {
    position: relative;
    z-index: 1030;
    overflow: visible;
}

.navbar-nav {
    overflow: visible;
}

    .navbar-nav .nav-item {
        position: static;
    }

@media (min-width: 576px) {
    .navbar-nav .nav-item {
        position: relative;
    }
}

.navbar-transparent {
    background-color: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

    .navbar-transparent .nav-link {
        font-weight: 500;
        transition: all 0.3s ease;
    }

        .navbar-transparent .nav-link:hover {
            color: #ffffff !important;
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
        }

.navbar-toggler-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-toggler-light {
    border-color: rgba(255, 255, 255, 0.3);
}

/* ========== DROPDOWN MENUS ========== */
.dropdown-hover {
    position: relative;
}

.dropdown-menu-hover {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1040;
    min-width: 220px;
    padding: 0.5rem 0;
    margin: 0;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-hover:hover .dropdown-menu-hover {
    display: block;
}

.dropdown-menu-hover .dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    transition: background-color 0.15s ease-in-out;
}

    .dropdown-menu-hover .dropdown-item:hover {
        background-color: #f8f9fa;
        color: #16181b;
    }

.dropdown-menu-hover .dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.dropdown-menu-hover .dropdown-header {
    display: block;
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    font-size: 0.875rem;
    color: #6c757d;
    white-space: nowrap;
}

.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu > a {
        cursor: pointer;
    }

    .dropdown-submenu .submenu {
        display: none;
        position: absolute;
        left: 100%;
        top: 0;
        margin-left: 0.125rem;
        min-width: 220px;
        padding: 0.5rem 0;
        background-color: #fff;
        border: 1px solid rgba(0, 0, 0, 0.15);
        border-radius: 0.375rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
        z-index: 1041;
    }

    .dropdown-submenu:hover > .submenu {
        display: block;
    }

    .dropdown-submenu > a .bi-chevron-right {
        font-size: 0.875rem;
        transition: transform 0.2s ease;
    }

    .dropdown-submenu:hover > a .bi-chevron-right {
        transform: translateX(3px);
    }

/* ========== CONTENIDO PRINCIPAL ========== */
.container-fluid > main,
main[role="main"] {
    position: relative;
    z-index: 1;
}

.container-fluid {
    max-width: 100%;
    overflow-x: hidden;
    flex: 1 1 auto;
    position: relative;
    z-index: 1;
}

.container,
.container-fluid {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

@media (min-width: 768px) {
    .container,
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ========== FOOTER - FIJO EN LA PARTE INFERIOR ========== */
.footer {
    /* ✅ POSICIÓN FIJA EN LA PARTE INFERIOR */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    /* Estilos visuales */
    padding: 0.75rem 0;
    flex-shrink: 0;
    z-index: 1020;
    /* ✅ El footer en sí no captura eventos */
    pointer-events: none;
}

    /* ✅ Los elementos DENTRO del footer SÍ deben ser clickeables */
    .footer * {
        pointer-events: auto;
    }

@media (max-width: 576px) {
    .footer {
        padding: 0.5rem 0;
    }
}

.footer-transparent {
    background-color: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

    .footer-transparent .text-muted {
        color: rgba(255, 255, 255, 0.8) !important;
    }

    .footer-transparent .badge {
        background-color: rgba(255, 255, 255, 0.2) !important;
        backdrop-filter: blur(5px);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

.fs-mobile {
    font-size: 0.85rem !important;
}

@media (max-width: 576px) {
    .fs-mobile {
        font-size: 0.7rem !important;
        padding: 0.35rem 0.5rem !important;
    }
}

#asientos-count-container {
    margin: 0;
    padding: 0;
}

@media (max-width: 576px) {
    #asientos-count-container {
        gap: 0.25rem !important;
    }
}




/* ========== MODALES - HEADERS ========== */
#modalHeader,
.modal-header.bg-azul {
    padding: 0.35rem 1rem;
    min-height: 40px;
    height: auto;
    color: white;
}

#modalHeader {
    display: flex;
    align-items: center;
}

    #modalHeader .modal-title {
        margin: 0;
        font-size: 1rem;
        line-height: 1.15;
        flex: 1 1 auto;
        text-align: center;
    }

    #modalHeader .btn-close {
        padding: 0.25rem 0.45rem;
        margin-top: 0;
        height: auto;
    }




/* ========== MODALES - Z-INDEX Y STACKING ========== */

/* Backdrop - Debe estar DETRÁS y NO capturar clicks */
.modal-backdrop,
.modal-backdrop.fade,
.modal-backdrop.show {
    z-index: 1040 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: transparent !important;
    pointer-events: none !important;
}


/* Modal contenedor - Por encima del backdrop pero NO captura clicks */
.modal,
.modal.fade,
.modal.show {
    z-index: 1055 !important;
    position: fixed !important;
    pointer-events: none !important;
}

/* Modal dialog - AQUÍ SÍ capturamos clicks */
.modal-dialog {
    z-index: 1056 !important;
    position: relative !important;
    pointer-events: auto !important;
}

/* Modal content - AQUÍ SÍ capturamos clicks */
.modal-content {
    position: relative !important;
    z-index: 1057 !important;
    pointer-events: auto !important;
    background-color: #fff !important;
    opacity: 1 !important;
}

    /* Todos los elementos dentro del modal deben ser clickeables */
    .modal-content * {
        pointer-events: auto !important;
    }

/* Body cuando hay modal abierto */
body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
}

    /* Bajar z-index de navbar cuando hay modal */
    body.modal-open header,
    body.modal-open .navbar,
    body.modal-open .navbar-collapse {
        z-index: 1 !important;
    }

    /* Ocultar dropdowns cuando hay modal activo */
    body.modal-open .dropdown-menu-hover,
    body.modal-open .dropdown-submenu .submenu {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    body.modal-open .dropdown-hover:hover .dropdown-menu-hover,
    body.modal-open .dropdown-submenu:hover > .submenu {
        display: none !important;
    }

/* ========== ELEMENTOS DENTRO DE MODALES ========== */
.modal .ui-autocomplete,
.ui-autocomplete {
    z-index: 1080 !important;
}

.modal .select2-container,
.select2-container {
    z-index: auto !important;
}

.modal .select2-dropdown,
.select2-dropdown {
    z-index: 1090 !important;
    pointer-events: auto !important;
    opacity: 1 !important;
}

.choices {
    z-index: 1080 !important;
}






/* ========== SWEETALERT2 ========== */
.swal2-container {
    z-index: 10000 !important;
    position: fixed !important;
}

.swal2-popup {
    position: relative !important;
    z-index: 10001 !important;
}

.swal2-backdrop-show,
div:where(.swal2-container).swal2-backdrop-show {
    z-index: 9999 !important;
    background: rgba(0, 0, 0, 0.4) !important;
}

body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
    overflow: hidden !important;
}

    body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) > :not(.swal2-container) {
        filter: blur(3px);
        transition: filter 0.15s;
    }

body.modal-open .swal2-container {
    z-index: 10000 !important;
}

body.modal-open .swal2-popup {
    z-index: 10001 !important;
}

.swal2-toast {
    z-index: 10002 !important;
}

/* ========== TOASTR ========== */
#toast-container {
    z-index: 10002 !important;
}

    #toast-container > div {
        opacity: 0.95 !important;
        box-shadow: 0 0 12px rgba(0, 0, 0, 0.5) !important;
    }

body.modal-open #toast-container {
    z-index: 10003 !important;
}

/* ✅ Control de Modo EnLinea para SuperAdmin */
#modoEnLineaContainer {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

    #modoEnLineaContainer .form-check-input:checked {
        background-color: #28a745;
        border-color: #28a745;
    }

    #modoEnLineaContainer .form-check-input:not(:checked) {
        background-color: #dc3545;
        border-color: #dc3545;
    }

    #modoEnLineaContainer #btnResetEnLinea {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

        #modoEnLineaContainer #btnResetEnLinea:hover {
            background-color: rgba(255, 255, 255, 0.2);
        }
