/* =========================================================
   BASE
========================================================= */

html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}

html,
body {
    height: 100%;
}

body {
    margin: 0 0 60px;
    padding-top: 64px;
    background: #f4f6f9;
    color: #212529;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

#graficoVentas {
    min-height: 260px;
}

/* =========================================================
   LAYOUT APP
========================================================= */

body.layout-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fc;
}

    body.layout-app main {
        padding-top: 80px;
    }

.flex-fill {
    flex: 1 1 auto;
}

/* =========================================================
   NAVBAR
========================================================= */

.app-navbar {
    height: 64px;
    min-height: 64px;
    padding: 0 !important;
    z-index: 1030;
}

    .app-navbar > .container-fluid {
        height: 64px;
        display: flex;
        align-items: center;
    }

.navbar-brand {
    height: 64px;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 0 !important;
    margin: 0;
    overflow: visible !important;
    font-weight: 700;
}

.brand-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    display: block;
    flex: 0 0 auto;
}

.navbar-brand span {
    white-space: nowrap;
}

.navbar-toggler {
    width: 44px;
    height: 44px;
    padding: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-collapse {
    background: #fff;
}

.avatar-user {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #eef2f6;
    color: #c85a7c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.menu-icon {
    color: #c85a7c;
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

.menu-icon-muted {
    color: #6c757d;
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

.nav-link:hover .menu-icon,
.dropdown-item:hover .menu-icon,
.dropdown-item:hover .menu-icon-muted {
    color: #a94667;
}

/* =========================================================
   FOCUS
========================================================= */

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 .1rem #fff, 0 0 0 .25rem rgba(200, 90, 124, .20);
}

/* =========================================================
   TARJETAS
========================================================= */

.card,
.categoria-card {
    border: 0 !important;
    border-radius: 18px !important;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.05);
    transition: box-shadow .2s ease, transform .2s ease;
}

    .card:hover,
    .categoria-card:hover {
        box-shadow: 0 8px 24px rgba(0,0,0,.08);
    }

    .categoria-card:hover {
        transform: translateY(-2px);
    }

.card-header {
    background: transparent !important;
    border-bottom: 1px solid #eef1f4 !important;
}

/* =========================================================
   INPUTS
========================================================= */

.form-control,
.form-select,
.input-group-text {
    border-radius: 12px !important;
}

.form-control,
.form-select {
    border: 1px solid #dfe3e8;
    background: #fff;
}

    .form-control:focus,
    .form-select:focus {
        border-color: #c85a7c;
        box-shadow: 0 0 0 .15rem rgba(200, 90, 124, .12);
    }

/* =========================================================
   BOTONES
========================================================= */

.btn {
    border-radius: 12px !important;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    line-height: 1.5;
}

.btn-primary {
    box-shadow: 0 4px 10px rgba(13,110,253,.18);
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    flex: 0 0 32px;
}

.btn-brand {
    background: #c85a7c;
    border-color: #c85a7c;
    color: #fff;
}

    .btn-brand:hover,
    .btn-brand:focus {
        background: #ad4869;
        border-color: #ad4869;
        color: #fff;
    }

/* =========================================================
   TEXTOS / FONDOS
========================================================= */

.text-brand {
    color: #c85a7c !important;
}

.bg-light {
    background: #f8f9fb !important;
}

/* =========================================================
   SELECTOR CATEGORĶAS
========================================================= */

.categoria-opcion {
    width: 100%;
    border: 1px solid #dfe3e8;
    background: #fff;
    border-radius: 14px;
    padding: .65rem .8rem;
    font-size: .9rem;
    color: #333;
    text-align: left;
    transition: all .2s ease;
}

    .categoria-opcion:hover {
        background: #fff5f8;
        border-color: rgba(200, 90, 124, .35);
    }

    .categoria-opcion.seleccionada {
        background: #fff0f5;
        border-color: #c85a7c;
        color: #c85a7c;
        font-weight: 600;
    }

/* =========================================================
   SELECT2
========================================================= */

.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 38px !important;
    border: 1px solid #dfe3e8 !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    background: #fff !important;
}

    .select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
        line-height: normal !important;
        padding-left: 12px !important;
        color: #212529 !important;
        font-size: .95rem;
    }

    .select2-container--default
    .select2-selection--single
    .select2-selection__placeholder {
        color: #6c757d !important;
    }

    .select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
        height: 38px !important;
        right: 8px !important;
    }

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #c85a7c !important;
    box-shadow: 0 0 0 .15rem rgba(200, 90, 124, .12) !important;
}

.select2-dropdown {
    border: 1px solid #dfe3e8 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.select2-search--dropdown {
    padding: 8px !important;
}

    .select2-search--dropdown .select2-search__field {
        border: 1px solid #dfe3e8 !important;
        border-radius: 10px !important;
        padding: 7px 10px !important;
        outline: none !important;
    }

.select2-results__option {
    padding: 9px 12px !important;
    font-size: .92rem;
}

/* =========================================================
   FOOTER
========================================================= */

.footer {
    padding: 12px 0;
}

.footer-custom {
    background: linear-gradient(135deg, #1f1f1f 0%, #2b2b2b 100%);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 18px 24px;
    margin-top: 40px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.06);
}

    .footer-custom .text-white-50 {
        color: rgba(255,255,255,0.72) !important;
    }

    .footer-custom i {
        color: #d96b92;
        font-size: 0.95rem;
    }

    .footer-custom .fw-semibold {
        letter-spacing: 0.3px;
    }

/* =========================================================
   MODALES
========================================================= */

.modal-backdrop {
    --bs-backdrop-zindex: 1040;
    --bs-backdrop-bg: transparent !important;
    --bs-backdrop-opacity: 1 !important;
    background: rgba(15, 23, 42, 0.04) !important;
    backdrop-filter: blur(5px) saturate(110%) brightness(1);
    -webkit-backdrop-filter: blur(5px) saturate(110%) brightness(1);
    opacity: 1 !important;
}

    .modal-backdrop.show {
        opacity: 1 !important;
    }

.modal-content {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0,0,0,.15);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal-header,
.modal-footer {
    background: rgba(255,255,255,.92);
}

.modal-header {
    border-bottom: 1px solid #eef1f4;
}

.modal-footer {
    border-top: 1px solid #eef1f4;
}

.modal-body {
    background: rgba(255,255,255,.96);
}

/* =========================================================
   MODAL PRODUCTOS
========================================================= */

#modalBuscarProductos .modal-content {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0,0,0,.15);
}

#modalBuscarProductos .modal-header {
    background: #fff;
    border-bottom: 1px solid #eef1f4;
}

#modalBuscarProductos .modal-body {
    background: #fff;
}

#modalBuscarProductos .table-responsive {
    height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
}

#modalBuscarProductos thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8f9fa;
}

#tbodyProductosModal tr {
    transition: all .15s ease;
}

    #tbodyProductosModal tr:hover {
        background: #f8fafc;
        transform: scale(1.002);
    }

#modalBuscarProductos .table-responsive::-webkit-scrollbar {
    width: 8px;
}

#modalBuscarProductos .table-responsive::-webkit-scrollbar-thumb {
    background: #d0d7de;
    border-radius: 20px;
}

    #modalBuscarProductos .table-responsive::-webkit-scrollbar-thumb:hover {
        background: #adb5bd;
    }

/* =========================================================
   LOGIN
========================================================= */

/* =========================================================
   LOGIN
========================================================= */

body.login-page {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #f8f9fc;
}

/* Fondo */

.login-bg {
    position: fixed;
    inset: 0;
    z-index: 1;
    background-image: url('../img/yaritzalogo.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 850px;
    opacity: .40;
    filter: blur(8px) saturate(120%);
    -webkit-filter: blur(8px) saturate(120%);
    transform: scale(1.03);
}

/* Capa superior suave */

.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 2;
    background: linear-gradient( 135deg, rgba(255,255,255,.25), rgba(255,255,255,.45) );
}

/* Contenedor */

.login-wrapper {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tarjeta */

.login-card {
    width: 100%;
    max-width: 460px;
    border: 0 !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 35px rgba(0,0,0,.10), 0 2px 10px rgba(0,0,0,.05);
}

.login-logo {
    max-height: 180px;
}

/* Inputs */

.login-card .input-group {
    border-radius: 12px;
    overflow: hidden;
}

.login-card .input-group-text {
    background: #fff;
    border-right: 0;
    color: #6c757d;
    padding-left: 16px;
    padding-right: 14px;
    min-width: 52px;
    justify-content: center;
}

    .login-card .input-group-text i {
        font-size: 1rem;
        width: 18px;
        text-align: center;
    }

.login-card .form-control {
    border-left: 0;
    min-height: 48px;
    padding-left: 8px;
}

.login-card .btn-password {
    border-left: 0;
    background: #fff;
    color: #6c757d;
    min-width: 48px;
    padding-left: 14px;
    padding-right: 14px;
}

    .login-card .btn-password:hover {
        background: #f8f9fa;
    }

/* Focus */

.login-card .input-group:focus-within {
    box-shadow: 0 0 0 .15rem rgba(200, 90, 124, .15);
}

    .login-card .input-group:focus-within .input-group-text,
    .login-card .input-group:focus-within .form-control,
    .login-card .input-group:focus-within .btn-password {
        border-color: #c85a7c;
    }

/* Marca */

.text-brand {
    color: #c85a7c;
}

.btn-brand {
    background: #c85a7c;
    border-color: #c85a7c;
    color: #fff;
}

    .btn-brand:hover,
    .btn-brand:focus {
        background: #b14c6f;
        border-color: #b14c6f;
        color: #fff;
    }

/* Footer */

.login-footer {
    color: #6c757d;
    font-size: .85rem;
}

/* Responsive */

@media (max-width: 576px) {

    .login-wrapper {
        padding: 1rem;
    }

    .login-card {
        max-width: 100%;
    }

    .login-bg {
        background-size: 600px;
        opacity: .35;
    }

    .login-logo {
        max-height: 120px;
    }
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 576px) {
    body {
        padding-top: 64px;
        background: #eef2f6;
    }

        body.login-page {
            padding: 0;
        }

    .app-navbar,
    .app-navbar > .container-fluid,
    .navbar-brand {
        height: 64px;
        min-height: 64px;
    }

    .brand-logo {
        width: 50px;
        height: 50px;
        transform: none !important;
        margin: 0 !important;
    }

    .navbar-brand span {
        font-size: .95rem;
    }

    .navbar-collapse {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        padding: .75rem 1rem;
        border-bottom: 1px solid #e9ecef;
        box-shadow: 0 10px 24px rgba(0,0,0,.08);
        z-index: 1029;
    }

    .card,
    .categoria-card {
        border-radius: 16px !important;
    }

        .categoria-card .card-body {
            padding: .85rem !important;
        }

    .btn-icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        font-size: .85rem;
    }

    .dropdown-menu {
        font-size: .9rem;
    }

    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    .login-wrapper {
        padding: 1rem;
    }

    .login-bg {
        background-size: 520px;
        opacity: .22;
    }

    .login-card {
        max-width: 100%;
        border-radius: 16px !important;
    }

    .login-logo {
        max-height: 120px;
    }
}