﻿/* ===============================
   Estilos generales
=============================== */
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5 {
    font-weight: 500;
}

/* ===============================
   Menú principal y submenús
=============================== */
.navbar {
    background-color: #343a40; /* color del menú */
}

    .navbar .navbar-nav .nav-link {
        color: #ffffff;
    }

        .navbar .navbar-nav .nav-link:hover {
            color: #ffc107;
        }

.dropdown-menu {
    background-color: #343a40;
    border: none;
}

    .dropdown-menu a.dropdown-item {
        color: #ffffff;
    }

        .dropdown-menu a.dropdown-item:hover {
            background-color: #495057;
            color: #ffc107;
        }

/* Submenú tipo acordeón */
.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu > .dropdown-menu {
        top: 0;
        left: 100%;
        margin-left: 0.1rem;
    }

/* ===============================
   Tablas
=============================== */
.table {
    font-size: 0.9rem;
    vertical-align: middle;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

    .table th {
        vertical-align: middle;
    }

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f1f3f5;
}


/* ===============================
   Botones
=============================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    .btn i {
        font-size: 0.85rem; /* íconos más pequeños */
        vertical-align: middle;
    }

/* Tamaño de botones pequeños */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

/* Colores personalizados (opcional) */
.btn-primaryJGS {
    background-color: #FAEEC0;
    font-weight: bold;
}

    .btn-primaryJGS:hover {
        background-color: #F5BD18;
        color: white;
        font-weight: bold;
    }

.btn-secondaryJGS {
    background-color: #cfd6ce;
    font-weight: bold;
}

    .btn-secondaryJGS:hover {
        background-color: #7d807d;
        color: white;
        font-weight: bold;
    }

.btn-detailJGS {
    background-color: #D5EDF7;
}

    .btn-detailJGS:hover {
        background-color: #375280;
        color: white;
    }

.btn-warning:hover {
    background-color: #e0a800;
}


/* ===============================
   Formularios
=============================== */
.form-control {
    border-radius: 0.25rem;
    height: calc(1.5em + .75rem + 2px) !important;
    padding: 0.375rem 0.75rem;
    line-height: 1.5;
    margin-bottom: 5px;
}


/* Ocultar flecha nativa del select */
.form-select {
    appearance: none; /* Chrome, Safari, Edge */
    -moz-appearance: none; /* Firefox */
    -webkit-appearance: none; /* Safari */
    background-image: none; /* Quita la flecha por defecto */
    padding-right: 2rem; /* Deja espacio para el ícono */
    position: relative;
    height: calc(1.5em + .75rem + 2px) !important;
    padding: .375rem .75rem;
    line-height: 1.5;
}


/* Contenedor para insertar la flechita */
.select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

    /* Ícono personalizado */
    .select-wrapper::after {
        content: "\f229"; /* Unicode de bi-caret-down-fill */
        font-family: "bootstrap-icons";
        position: absolute;
        top: 50%;
        right: 1rem;
        transform: translateY(-50%);
        pointer-events: none; /* No bloquea clics */
        color: #555;
    }



.form-label {
    margin-bottom: 5px;
}

/* ===============================
   Responsive
=============================== */
@media (max-width: 768px) {
    .navbar .navbar-nav {
        text-align: center;
    }

    .table-responsive {
        overflow-x: auto;
    }
}

select.actividad-select {
    max-width: 220px;
    font-size: .85rem;
}

.table td, .table th {
    padding: 2px 6px; /* menos espacio interno */
    vertical-align: middle; /* centra los contenidos */
    white-space: nowrap; /* evita saltos de línea */
}

.table input, .table select {
    padding: 0 4px; /* más compacto */
    height: auto;
    line-height: 1.2;
}

/* Compactar filas de la tabla */
.table-sm td,
.table-sm th {
    padding: 1px 2px !important; /* menos espacio arriba/abajo */
    vertical-align: middle;
    line-height: 1.1; /* más compacto aún */
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Inputs y selects dentro de la tabla más delgados */
.table-sm input,
.table-sm select,
.table-sm textarea {
    padding: 0 0px;
    height: 20px; /* forzar altura baja */
    font-size: 0.85rem; /* texto más pequeño */
    line-height: 1.1;
}

.table-sm input,
.table-sm select {
    border-radius: 0;
}


/* Compactar inputs y selects dentro de la tabla compacta */
.table-compact .form-control-sm,
.table-compact .form-select-sm {
    padding-top: 0.1rem !important;
    padding-bottom: 0.1rem !important;
    line-height: 1.1 !important;
    height: calc(1.3em + .375rem + 2px) !important; /* 👈 altura más baja */
    font-size: 0.8rem !important; /* opcional: texto más pequeño */
}

.container, .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.table-responsive {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.table-compact {
    table-layout: fixed;
    width: 100% !important;
}

    /* --- Reglas generales para todas las celdas --- */
    .table-compact th,
    .table-compact td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: middle;
    }

        /* Columnas muy pequeñas */
        .table-compact td.col-hipersmall,
        .table-compact th.col-hipersmall {
            width: 40px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Columnas muy pequeñas */
        .table-compact td.col-verysmall,
        .table-compact th.col-verysmall {
            width: 70px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Columnas pequeñas */
        .table-compact td.col-small,
        .table-compact th.col-small {
            width: 70px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Columnas medianas */
        .table-compact td.col-medium,
        .table-compact th.col-medium {
            width: 90px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Columnas grandes */
        .table-compact td.col-large,
        .table-compact th.col-large {
            width: 160px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }


/* --- Observaciones un poco más grandes --- */
.col-observaciones {
    max-width: 220px;
}

/* --- Tooltip estilo Bootstrap --- */
[data-bs-toggle="tooltip"] {
    cursor: help;
}
