﻿html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
    scroll-behavior: smooth;
}
@media (min-width: 768px) {
    html { font-size: 16px; }
}
body {
    margin-bottom: 60px;
}
.container-fluid {
    background-color: lightblue;
}
.modal-lightblue .modal-content {
    background-color: lightblue;
}
.custom-scroll-body {
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 10px;
}
.table-responsive { overflow-x: auto; }
#tblList {
    font-size: 12px;
}
#tblList td:nth-child(2) {
    max-width: 50px;
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: break-word;
    vertical-align: top;
}

#tblList tbody td.text-end {
    text-align: right !important;
}

    #tblList thead th {
        text-align: center !important;
        vertical-align: middle !important;
    }
#tblList .btn {
    font-size: 12px;
    padding: 4px 8px;
}
#tblList img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: zoom-in;
    border-radius: 4px;
    max-height: 60px;
}
#tblList img:hover {
    transform: scale(4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 999;
    position: relative;
}
.col-observaciones {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
div.dataTables_filter {
    display: none;
}
.dataTables_filter input {
    height: auto;
    padding: 6px 10px;
    margin-top: 0.5rem;
    margin-right: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: none;
}
#createEditModal .modal-content {
    background-color: lightblue;
    border-radius: 25px;
    border: none;
}
#createEditModal .modal-header {
    background-color: #007bff;
    color: white;
    border-bottom: none;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
}
#createEditModal .btn-close { filter: invert(1); }
#createEditModal .form-control,
#createEditModal .form-check-input {
    border: 1px solid #007bff;
}
#createEditModal .form-label,
#createEditModal .form-check-label {
    font-weight: 500;
    color: #003366;
}
.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;
}
.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;
}
.navbar {
    background-color: lightblue !important;
}
.navbar-light .navbar-nav .nav-link {
    color: #000 !important;
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}
.navbar-light .navbar-nav .nav-link:hover {
    color: white !important;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}
.dropdown-menu .dropdown-item {
    transition: background-color 0.3s ease, color 0.3s ease;
}
.dropdown-menu .dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: black !important;
}
.dropdown-submenu {
    position: relative;
}
.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -0.125rem;
}
.btn-outline-white {
    color: white !important;
    background-color: transparent !important;
    border: 2px solid white !important;
    border-radius: 25px;
    padding: 8px 16px;
    font-size: 14px;
    transition: background-color 0.3s, color 0.3s;
}
.btn-outline-white:hover {
    background-color: white !important;
    color: black !important;
}
.btn-outline-cancel {
    color: white !important;
    background-color: transparent !important;
    border: 2px solid #ff6666 !important;
    border-radius: 25px;
    padding: 8px 16px;
    font-size: 14px;
    transition: background-color 0.3s, color 0.3s;
}
.btn-outline-cancel:hover {
    background-color: #ff6666 !important;
    color: white !important;
}
.btn-outline-edit {
    color: #17a2b8 !important;
    background-color: transparent !important;
    border: 2px solid #17a2b8 !important;
    border-radius: 25px;
    padding: 6px 12px;
    font-size: 12px;
    transition: background-color 0.3s, color 0.3s;
}
.btn-outline-edit:hover {
    background-color: #17a2b8 !important;
    color: white !important;
}
.btn-outline-delete {
    color: darkred !important;
    background-color: transparent !important;
    border: 2px solid #dc3545 !important;
    border-radius: 25px;
    padding: 6px 12px;
    font-size: 12px;
    transition: background-color 0.3s, color 0.3s;
}

    .btn-outline-delete:hover {
        background-color: #dc3545 !important;
        color: white !important;
    }

    /* Esto es lo que agregamos para el ícono */
    .btn-outline-delete i {
        color: red !important;
        transition: color 0.3s;
    }

    .btn-outline-delete:hover i {
        color: white !important;
    }

.btn-outline-contact {
    color: blueviolet !important;
    background-color: transparent !important;
    border: 2px solid #0d6efd !important;
    border-radius: 25px;
    padding: 6px 12px;
    font-size: 12px;
    transition: background-color 0.3s, color 0.3s;
}
.btn-outline-contact:hover {
    background-color: #0d6efd !important;
    color: white !important;
}
.btn-outline-contact i {
    transition: transform 0.3s ease, color 0.3s ease;
}
.btn-outline-contact:hover i {
    transform: scale(1.3);
    color: white !important;
}
.btn-outline-primary i,
.btn-outline-edit i,
.btn-outline-delete i,
.btn-outline-white i,
.btn-outline-cancel i {
    transition: transform 0.3s ease, color 0.3s ease;
}
.btn-outline-primary i,
.btn-outline-edit:hover i,
.btn-outline-delete:hover i,
.btn-outline-white:hover i,
.btn-outline-cancel:hover i {
    transform: scale(1.3);
    color: white !important;
}
.btn-primary {
    border: 2px solid white !important;
    border-radius: 25px;
    font-weight: 500;
    background-color: transparent !important;
}
.btn-primary:hover {
    background-color: #0056b3 !important;
    color: white !important;
    border-color: white !important;
}
i.fas,
i.far,
i.fab,
i.fa {
    color: dodgerblue;
    transition: color 0.3s ease;
}
i.fas:hover,
i.far:hover,
i.fab:hover,
i.fa:hover {
    color: #0056b3;
}
i[aria-hidden="true"] {
    pointer-events: none;
}

body.dark-theme {
    background-color: #121212;
    color: #e0e0e0;
}
.dark-theme .navbar,
.dark-theme .container-fluid,
.dark-theme .modal-content {
    background-color: #1e1e1e !important;
    color: #e0e0e0;
}
.dark-theme .dropdown-menu {
    background-color: #2c2c2c;
    color: #ffffff;
}
.dark-theme .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
/* Fondo suave con sombra para navbar */
.navbar {
    background-color: #e3f2fd !important; /* azul muy claro */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 12px 12px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Botones del menú */
.navbar-light .navbar-nav .nav-link {
    color: #0d6efd !important;
    font-weight: 500;
    border-radius: 8px;
    padding: 6px 12px;
    transition: background-color 0.25s, transform 0.2s;
}

    /* Hover más amigable */
    .navbar-light .navbar-nav .nav-link:hover {
        background-color: rgba(13, 110, 253, 0.1);
        color: #0a58ca !important;
        transform: translateY(-1px);
    }

/* Menú desplegable con sombra y bordes redondeados */
.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    animation: fadeInDown 0.2s ease-out;
}

/* Items dentro del dropdown */
.dropdown-item {
    padding: 8px 16px;
    border-radius: 6px;
}

    /* Hover item */
    .dropdown-item:hover {
        background-color: rgba(13, 110, 253, 0.08);
        color: #0a58ca !important;
    }

/* Animación de entrada suave para el menú */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Submenú moderno */
.dropdown-submenu > .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
}

.user-profile-img:hover {
    transform: scale(1.5);
    position: relative;
    z-index: 10000;
    transition: transform 0.3s ease;
    transform-origin: center center;
}
.user-profile-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 2px solid #0d6efd;
    transition: transform 0.3s ease; /* lo aumenté a 0.3s para que se note mejor */
}

.text-red {
    color: red;
}

.text-black {
    color: black;
}
.contenedor-principal {
    background-color: rgba(255, 255, 255, 0.1); /* fondo muy transparente */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* sombra suave */
    padding: 2rem;
    border-radius: 12px;
}
.card {
    background-color: rgba(255, 255, 255, 0.6); /* Ajustá la opacidad a gusto */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border-radius: 20px;
}

.logo-hover-effect {
    transition: all 0.3s ease;
    border-radius: 8px; /* Bordes redondeados por defecto */
}

.logo-hover-effect:hover {
    transform: scale(1.2); /* Aumenta levemente el tamaño */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); /* Sombra envolvente */
    filter: brightness(0.95); /* Muy leve oscurecimiento */
    border-radius: 15px; /* Más redondeado al hacer hover */
    cursor: pointer;
}
#tblItemsPresupuesto td, #tblItemsPresupuesto th {
    font-size: 9pt;
}
#tblItemsPresupuesto thead th {
    text-align: center !important;
}

#tblItemsPresupuesto {
    table-layout: fixed;
    width: 100% !important;
}

    #tblItemsPresupuesto th:nth-child(1),
    #tblItemsPresupuesto td:nth-child(1) {
        width: 60% !important;
        word-wrap: break-word;
    }


    #tblItemsPresupuesto th:nth-child(7),
    #tblItemsPresupuesto td:nth-child(7) {
        width: 8% !important;
        word-wrap: break-word;
    }
.text-red {
    color: red;
    font-weight: bold;
}

.text-black {
    color: black;
    font-weight: bold;
}
#modalItemsPresupuesto .modal-xl {
    max-width: 90% !important;
}

.select2-search__field {
    pointer-events: auto !important;
    user-select: text !important;
    background-color: white !important;
}

.list-group {
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
}

.list-group-item {
    padding: 5px 10px;
    cursor: pointer;
}

    .list-group-item:hover {
        background-color: #eee;
    }

.navbar-toggler {
    border: none;
    outline: none;
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(33,37,41,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* 🔹 Contenedor para el input y el select */
.dropdown-container {
    position: relative;
    width: 100%;
}

/* 🔹 Estilo del input buscador tipo YouTube / WhatsApp con lupa interna */
.dropdown-search-input {
    padding: 8px 12px 8px 36px; /* espacio para la lupa */
    border-radius: 50px;
    border: 1px solid #ccc;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    background: #f5f5f5;
    transition: all 0.3s ease-in-out;
    color: #333;
    position: relative;
}

    /* 🔹 Lupa dentro del input */
    .dropdown-search-input::before {
        content: "🔍";
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 16px;
        color: #888;
        pointer-events: none;
    }

    /* 🔹 Hover y foco del input */
    .dropdown-search-input:hover {
        background: #f0f0f0;
    }

    .dropdown-search-input:focus {
        border-color: #0d6efd;
        box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
        transition: all 0.2s ease-in-out;
    }

.list-group-item-action.active {
    background-color: #0d6efd;
    color: #fff;
}
/* Contenedor general */
.buscador-container {
    position: relative;
    display: flex;
    align-items: center;
}

    /* Lupa a la derecha */
    .buscador-container .icono-lupa {
        position: absolute;
        right: 12px;
        pointer-events: none;
        font-size: 1.2em;
        color: #888;
    }

/* Input estilo pill con fondo suave */
.buscador-pill {
    width: 100%;
    padding: 10px 40px 10px 15px; /* espacio a la derecha para la lupa */
    border-radius: 50px; /* bordes redondeados tipo pill */
    border: 1px solid #ccc;
    background-color: #f5f5f5; /* color de fondo suave */
    transition: all 0.2s ease-in-out;
}

    /* Efecto al enfocar */
    .buscador-pill:focus {
        outline: none;
        border-color: #6c63ff;
        box-shadow: 0 0 8px rgba(108, 99, 255, 0.3);
    }

/* 🎯 Lista de sugerencias alineada al input */
#sugerenciasMateriales {
    position: absolute;
    top: 100%; /* justo debajo del input */
    left: 0; /* empieza al borde del input */
    width: 100%; /* mismo ancho que el input */
    box-sizing: border-box; /* incluye padding y borde en el ancho */
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    display: none;
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
}

    /* 🔹 Pequeña “punta” tipo tooltip */
    #sugerenciasMateriales::before {
        content: "";
        position: absolute;
        top: -6px;
        left: 12px; /* alineada con la lupa del input */
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-bottom: 6px solid #ffffff;
    }

    /* 📋 Ítems individuales */
    /* Ítems individuales */
    #sugerenciasMateriales .list-group-item {
        font-size: 0.875rem;
        padding: 0.4rem 0.75rem;
        border: none;
        cursor: pointer;
        transition: background-color 0.2s ease;
    }

        #sugerenciasMateriales .list-group-item:hover {
            background-color: #007bff;
            color: #fff;
        }

/* ✨ Efecto al enfocar el input */
#materialInput:focus {
    box-shadow: none !important;
    border-color: #86b7fe;
    outline: none;
}

/* 🎨 Botón lupa */
.btn-outline-secondary {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease-in-out;
}

    .btn-outline-secondary:hover {
        background-color: #e9ecef;
    }

/* 💬 Ajustes de modal */
#modalCrearItemPresupuesto .modal-body {
    padding-bottom: 0.5rem !important;
}

    #modalCrearItemPresupuesto .modal-body .row.mb-3:last-child {
        margin-bottom: 0 !important;
    }
