﻿/* ==========================================================
   DriveOrden / La Esquina del Buen Comer
   site.css optimizado
   ========================================================== */

/* =======================
   NAVBAR BRAND (SAFE SNEAT)
   ======================= */

/* 🔥 SOLO estilo visual, NO layout */
.layout-navbar.navbar-detached {
    background: linear-gradient( 135deg, rgba(120, 20, 10, 0.85), rgba(160, 40, 20, 0.80) ) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

    /* 🔥 overlay ligero sin romper estructura */
    .layout-navbar.navbar-detached::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: linear-gradient( to bottom, rgba(255,140,0,0.15), transparent 60% );
        pointer-events: none;
    }

/* =======================
   TEXTO / ICONOS
   ======================= */

.layout-navbar .nav-link,
.layout-navbar i {
    color: #fff !important;
}

    /* =======================
   HOVER
   ======================= */

    .layout-navbar .nav-link:hover {
        background: rgba(255,140,0,0.2);
        border-radius: 6px;
    }



/* =======================
   INDEX BACKGROUND (SOLO INDEX)
   ======================= */

body.bg-index {
    background-image: url('/images/index_final.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* =======================
   SIDEBAR BACKGROUND (SIN ROMPER SNEAT)
   ======================= */

/* =======================
   SIDEBAR LEGIBLE PRO
   ======================= */

#layout-menu.menu-con-fondo {
    position: relative;
    background-image: url('/images/menu_aside.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

    /* 🔥 Overlay MÁS FUERTE */
    #layout-menu.menu-con-fondo::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.75); /* 🔥 subimos contraste */
        z-index: 1;
        pointer-events: none;
    }

    /* 🔥 contenido arriba */
    #layout-menu.menu-con-fondo .menu-inner,
    #layout-menu.menu-con-fondo .app-brand {
        position: relative;
        z-index: 2;
    }

    /* =======================
   LINKS DEL MENU (CLAROS)
   ======================= */

    #layout-menu.menu-con-fondo .menu-link {
        color: #ffffff;
    }

        #layout-menu.menu-con-fondo .menu-link:hover {
            background: rgba(255,255,255,0.1);
            border-radius: 6px;
        }

    /* ACTIVO */
    #layout-menu.menu-con-fondo .menu-item.active > .menu-link {
        background: rgba(255,255,255,0.2);
        color: #fff;
        font-weight: 600;
    }




/* =======================
   BOTÓN TOGGLE (SIN ROMPER FUNCIONAMIENTO)
   ======================= */

.menu .app-brand .layout-menu-toggle {
    z-index: 3;
    background-color: rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
}



/* ==========================================================
   VARIABLES
   ========================================================== */

:root {
    --layout-navbar-height: 70px;
    --layout-footer-height: 60px;
    --divider-color: #999;
}

[data-theme="dark"] {
    --divider-color: #555;
}

/* ==========================================================
   BASE GLOBAL
   ========================================================== */

body {
    font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background-image: url('/images/Fondo1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(255,255,255,0.75);
        z-index: -1;
    }

/* ==========================================================
   UTILIDADES
   ========================================================== */

.cursor-pointer {
    cursor: pointer;
}

.d-none {
    display: none !important;
}

.w-100 {
    width: 100% !important;
}

.img-responsive {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    margin: auto;
}

/* ==========================================================
   LAYOUT
   ========================================================== */

.layout {
    padding-top: var(--layout-navbar-height);
    padding-bottom: var(--layout-footer-height);
}

.layout-navbar .navbar-nav-right {
    flex-basis: 60% !important;
}

.navbar-nav-right {
    flex-basis: auto !important;
}

/* ==========================================================
   LOGOS
   ========================================================== */

.logo-wrapper {
    max-width: 120px;
}

.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}

html[data-theme='dark'] .logo-light,
html[data-bs-theme='dark'] .logo-light {
    display: none !important;
}

html[data-theme='dark'] .logo-dark,
html[data-bs-theme='dark'] .logo-dark {
    display: block !important;
}

/* ==========================================================
   DIVIDER
   ========================================================== */

.divider-line {
    border-bottom: 2px solid var(--divider-color);
    opacity: .8;
    margin: .5rem 1rem;
}

/* ==========================================================
   SWEETALERT
   ========================================================== */

.swal2-container {
    z-index: 9999 !important;
}

.swal2-popup.custom-alert {
    max-width: 90% !important;
    padding: 1.2rem !important;
    font-size: 14px !important;
}

    .swal2-popup.custom-alert .swal2-icon {
        width: 60px !important;
        height: 60px !important;
        margin: 0 auto 10px auto !important;
    }

    .swal2-popup.custom-alert .swal2-title {
        font-size: 18px !important;
        margin-bottom: .5rem !important;
    }

    .swal2-popup.custom-alert .swal2-html-container {
        font-size: 14px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

/* ==========================================================
   ALERTAS
   ========================================================== */

.fade-alert {
    opacity: 0;
    transition: opacity .5s ease;
    display: none;
}

    .fade-alert.show {
        display: block;
        opacity: 1;
    }

.alert-slide {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all .5s ease;
}

    .alert-slide.show {
        opacity: 1;
        max-height: 200px;
        margin: .5rem 0;
    }

/* ==========================================================
   TABLAS
   ========================================================== */

.table-scrollable {
    max-height: 400px;
    overflow: auto;
}

.tabla-scroll {
    max-height: 500px;
    overflow-y: auto;
}

.tabla-ancha,
.tabla-ancho-total {
    width: 100%;
}

.tabla-min-1000 {
    min-width: 1000px;
}

.col-acciones {
    width: 50px;
}

table.dataTable th,
table.dataTable td {
    white-space: nowrap;
}

.table > :not(caption) > * > * {
    padding: .25rem .5rem;
}

/* ==========================================================
   COLUMN WIDTH HELPERS
   ========================================================== */

.col-w-5 {
    width: 5% !important;
}

.col-w-10 {
    width: 10% !important;
}

.col-w-15 {
    width: 15% !important;
}

.col-w-20 {
    width: 20% !important;
}

.col-w-25 {
    width: 25% !important;
}

.col-w-30 {
    width: 30% !important;
}

.col-w-40 {
    width: 40% !important;
}

.col-w-50 {
    width: 50% !important;
}

.col-w-60 {
    width: 60% !important;
}

.col-w-75 {
    width: 75% !important;
}

.col-w-100 {
    width: 100% !important;
}

/* ==========================================================
   LISTAS
   ========================================================== */

.list-group {
    counter-reset: list-counter;
}

.list-group-item::before {
    content: counter(list-counter) ". ";
    counter-increment: list-counter;
    font-weight: bold;
    margin-right: 5px;
}

/* ==========================================================
   MODALES
   ========================================================== */

.dropdown-menu {
    z-index: 1055;
    position: absolute;
}

/* ==========================================================
   LOADING OVERLAY
   ========================================================== */

.loading-overlay {
    position: fixed !important;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(0,0,0,.85);
}

.loading-content {
    text-align: center;
}

/* ==========================================================
   IMÁGENES
   ========================================================== */

.logo-miniatura {
    height: 40px;
    max-width: 60px;
    object-fit: contain;
}

.img-preview-selfie {
    max-width: 160px;
    max-height: 160px;
}

.qr-image {
    display: block;
    margin: 1rem auto;
    max-width: 250px;
    width: 100%;
    border: 2px solid #dee2e6;
    border-radius: .5rem;
}

/* ==========================================================
   DROPZONE
   ========================================================== */

.dropzone {
    transition: border-color .2s ease, background-color .2s ease;
}

    .dropzone.dz-drag-hover {
        border-color: #696cff !important;
        background-color: rgba(105,108,255,.05);
        box-shadow: 0 0 8px rgba(105,108,255,.4);
    }

    .dropzone.dz-started {
        background: #f8f9fa;
    }

/* ==========================================================
   MAPA
   ========================================================== */

#map {
    width: 100%;
    height: 800px;
}

.map-label {
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: 12px;
    font-weight: bold;
    color: #000;
    text-shadow: 1px 1px 2px #fff;
}

/* ==========================================================
   ORG TREE
   ========================================================== */

.org-node {
    cursor: pointer;
    min-width: 180px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e0e4ea;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
    text-align: center;
}

.org-node-title {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
}

.org-node-sub {
    font-size: 12px;
    color: #6b7280;
}

.org-node-level {
    font-size: 11px;
    font-weight: 500;
    color: #2563eb;
    background: #eff6ff;
    padding: 2px 8px;
    border-radius: 12px;
}

/* ==========================================================
   BADGES
   ========================================================== */

.badge-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.badge-pointer {
    cursor: pointer;
}

.badge-font-small {
    font-size: .65rem;
}

/* ==========================================================
   BOOTSTRAP SELECT
   ========================================================== */

.bootstrap-select .dropdown-menu {
    z-index: 20500 !important;
}

.bootstrap-select > .btn.dropdown-toggle {
    background: #fff !important;
    color: #212529 !important;
    border: 1px solid #ced4da !important;
}

/* ==========================================================
   MENU SEARCH
   ========================================================== */

.menu-search-match > .menu-link {
    background-color: rgba(255,193,7,.15);
    border-radius: 6px;
}

/* ==========================================================
   CÓDIGO
   ========================================================== */

.code-container {
    overflow-x: auto;
    margin-bottom: 1rem;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    background: #f9f9f9;
}

.code-block {
    white-space: pre;
    font-family: "Courier New",monospace;
    font-size: .9rem;
    color: #333;
    padding: 1rem;
    margin: 0;
}

/* ==========================================================
   LOGIN
   ========================================================== */

.login-split-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.login-visual-section {
    flex: 1;
    background-image: url('/images/LoginLogo.webp');
    background-size: cover;
    background-position: center;
    position: relative;
}

.login-visual-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0,0,0,.15);
}

.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bs-body-bg);
    padding: 2rem;
}

.login-card-wrapper {
    width: 100%;
    max-width: 400px;
}

.login-logo-img-custom {
    height: 42px;
    width: auto;
    filter: drop-shadow(0px 4px 4px rgba(0,0,0,0.1));
}

.login-logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.password-toggle {
    background: transparent;
    border: none;
}

    .password-toggle i {
        font-size: 18px;
    }

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width:768px) {

    .pc {
        display: none !important;
    }

    #map {
        height: 300px;
    }
}

@media (min-width:769px) {

    .mobile {
        display: none !important;
    }
}

@media (max-width:992px) {

    .login-visual-section {
        display: none;
    }

    .login-form-section {
        background-color: var(--bs-light);
    }
}

/* ==========================================================
   FONTS
   ========================================================== */

@font-face {
    font-family: 'Poppins';
    src: url('/fonts/poppins/poppins-v23-latin-100.woff2') format('woff2');
    font-weight: 100;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/fonts/poppins/poppins-v23-latin-300.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/fonts/poppins/poppins-v23-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/fonts/poppins/poppins-v23-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
}

.google-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.btn-google-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.google-icon {
    width: 22px;
    height: 22px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    overflow: hidden;
}

.menu-logo {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}


.menu-sub .menu-link::before {
    display: none !important;
}

/* CONTENEDOR GENERAL */

.page-under-construction {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
    text-align: center;
}

/* WRAPPER INTERNO */

.construction-wrapper {
    max-width: 720px;
    width: 100%;
}

/* IMAGEN */

.construction-image {
    max-height: 45vh;
    width: auto;
    max-width: 100%;
    margin-bottom: 2rem;
}

/* TITULO */

.construction-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #f0ad4e;
    margin-bottom: 1rem;
}

/* TEXTO */

.construction-text {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--bs-body-color);
}

/* BOTON */

.construction-btn {
    padding: 0.6rem 1.5rem;
}

/* ==========================================================
   BOTONES SUAVES (ASIGNAR / DESASIGNAR)
   ========================================================== */

.btn-primary-soft {
    background: rgba(105,108,255,.15);
    color: #696cff;
    border: 1px solid rgba(105,108,255,.35);
}

    .btn-primary-soft:hover {
        background: rgba(105,108,255,.25);
        color: #4f52ff;
    }

.btn-danger-soft {
    background: rgba(220,53,69,.15);
    color: #dc3545;
    border: 1px solid rgba(220,53,69,.35);
}

    .btn-danger-soft:hover {
        background: rgba(220,53,69,.25);
        color: #b02a37;
    }

/* BOTONES REDONDOS */

.btn-round {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    /* ICONO CENTRAL */

    .btn-round i {
        font-size: 1.2rem;
    }

/* columnas de acciones en tablas */
.col-acciones {
    width: 220px;
    white-space: nowrap;
}

