body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
}

.layout {
    display: flex;
    min-height: calc(100vh - 100px);
}

.main-content {
    flex: 1;
    padding: 5px;
    background-color: #f8f9fa;
}

#home.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.text-principal {
    color: #e21776;
}

select:hover,
input[type=datetime-local],
input[type=checkbox] {
    cursor: pointer;
}

/* PAGINATION ============================================================================= */
.pagination-btn {
    border: 1px solid transparent;
    border-radius: 6px;
    outline: none;
    background-color: transparent;
    text-align: center;
}

.pagination-btn:hover,
.pagination-outline-primary:hover {
    background-color: #ebedee;
}

.pagination-primary {
    border: 1px solid #e21776;
    border-radius: 6px;
}

.pagination-primary:hover {
    border: 1px solid #e21776;
    border-radius: 6px;
}

.pagination-none {
    cursor: not-allowed;
}

/* HEADER ================================================================================= */
header.login {
    background-color: #69be28;
    height: 100px;
}

header.main {
    background-color: #69be28;
    height: 64px;
}

header .head {
    padding: 12px;
}

header .user-icon-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #e21776;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: none;
    padding: 0;
    font-size: 1.25rem;
}

header .dropdown-menu {
    padding: 0.25rem 0;
    min-width: auto;
    width: max-content;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: opacity 0.3s ease;
    opacity: 0;
    visibility: hidden;
    display: block;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    z-index: 1000;
}

header .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

header .dropdown-menu form {
    margin: 0 0.25rem;
}

header .dropdown-menu button {
    all: unset;
    cursor: pointer;
    padding: 0.25rem 0.75rem;
    text-align: left;
    color: #212529;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

header .dropdown-menu li {
    font-size: smaller;
    list-style: none;
}

header #langMenu {
    display: none;
    background-color: #e9ecef;
}

header #langMenu span {
    margin-right: 10px;
}

header .dropdown-menu li:hover {
    background-color: #f8f9fa;
}

header #langMenu a:hover {
    background-color: #ced4da;
}

/* NAV ==================================================================================== */
.sidebar {
    display: block;
}

.navbar {
    display: none;

}

@media screen and (max-width: 868px) {
    .sidebar {
        display: none;
    }

    .navbar {
        display: block;
    }

    .layout {
        margin-top: 48px;
    }

    #login,
    #forgotPassword {
        transform: scale(0.8);
    }

    .container {
        max-width: calc(100vw - 50px) !important;
    }

    #home.main-content {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #home img {
        width: 100px;
        height: 100px;
    }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        width: 100%;
        font-size: 11px;
    }

    th,
    td {
        padding: 2px;
        white-space: nowrap;
    }
}

/* NAV 1 ================================================================================== */
nav.sidebar {
    width: 200px;
    min-height: 100%;
    background-color: #4e911f;
    color: white;
}

nav .nav-item.active a {
    background-color: #e21776;
    color: white;
    border-left: 5px solid #b0105e;
}

/* NAV 2 ================================================================================== */
.custom-navbar {
    background-color: #4e911f !important;
    width: 100%;
    font-size: medium;
}

.custom-navbar .nav-link,
.custom-navbar .dropdown-item {
    color: white !important;
    font-size: medium;
    padding: 5px;
}

/* Fondo más oscuro para el dropdown */
.custom-navbar .dropdown-menu {
    background-color: #3a6e17;
}

/* Hover sobre los ítems del menú */
.custom-navbar .dropdown-item:hover {
    background-color: #345a14;
    color: white !important;
}

/* Opción activa en color rosa */
.custom-navbar .dropdown-item.active,
.custom-navbar .dropdown-item:active {
    background-color: #345a14 !important;
    color: white !important;
}

/* NAV 3 ================================================================================== */
header #navDropdown {
    width: 38px;
    height: 38px;
    background-color: #e21776;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: none;
    padding: 0;
    font-size: 1.25rem;
}

.gruposNav {
    display: none;
    background-color: #e9ecef;
}

.gruposNav span {
    margin-right: 10px;
}

.gruposNav a:hover {
    background-color: #ced4da;
}

.activeNav {
    background-color: #e21776;
    color: white;
}

/* FOOTER ================================================================================= */
footer {
    background-color: #3f7519;
    color: #fff;
    font-size: 0.85rem;
}

/* ICONOS ACTIONS ========================================================================= */
.icon-btn {
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.principal {
    background-color: #e21776;
    color: white;
    border: none;
}

.principal:hover {
    background-color: #c31565;
    color: #f0f0f0;
}

.secundario {
    background-color: white;
    color: #212529;
    border: 1px solid #ccc;
}

.secundario:hover {
    background-color: #e9ecef;
    border: 1px solid #ddd;
}

/* SAMPLINGS ============================================================================== */
#samplingsTable {
    min-width: 1500px;
    font-size: 0.875rem;
    /* Reduce ligeramente el texto */
}

#samplingsTable th,
#samplingsTable td {
    white-space: nowrap;
}

#samplingsTable td {
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 150px;
}

.samplingsFilter {
    border: 2px solid #69be28;
    border-radius: 15px;
}

.fechaSamp {
  max-width: 125px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.btn-primary {
    background-color: #e21776;
    border-color: #c31565;
}

.btn-primary:hover {
    background-color: #e21776;
    border-color: #c31565;
}

.btn-outline-primary:hover {
    background-color: #e21776;
    border-color: #c31565;
}

.btn-outline-primary {
    border-color: #c31565;
    color: #e21776;
}

.btn-csv {
    background-color: #69be28;
    border-color: #4e911f;
    color: white;
}

.btn-csv:hover {
    border-color: #345a14;
    background-color: #4e911f;
    color: white;
}

@media (max-width: 768px) {
  /* Solo en vista móvil */
  #samplingsModal .save {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1060; /* por encima del modal */
  }
}


/* SPINNER ================================================================================ */
#tableSpinnerOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(128, 128, 128, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* ASTERISCO ============================================================================== */
.required-asterisk {
    color: red;
    margin-left: 3px;
    font-weight: bold;
}

#samplings .container {
    max-width: calc(100vw - 50px) !important;
}

/* DESPLEGABLE CSV SAMPLINGS ============================================================== */
#samplings .dropdown {
    position: relative;
    display: inline-block;
}

#samplings .dropdown-toggle {
    cursor: pointer;
}

#samplings .dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#samplings .dropdown-menu a {
    padding: 5px 10px;
    display: block;
    text-decoration: none;
    color: black;
}

#samplings .dropdown-menu a:hover {
    background-color: #f1f1f1;
}

#samplings .dropdown.open .dropdown-menu {
    display: block;
}