input, select, textarea {
    background-color: var(--background-color) !important;
    color: var(--primary-text-color) !important;
}

.selectpicker {
    background-color: var(--background-color) !important;
    color: var(--primary-text-color) !important;
}

.no-results {
    background-color: var(--background-color) !important;
    color: var(--primary-text-color) !important;
}

.dropdown-menu {
    background-color: var(--background-color) !important;
}

.btn-group {
    padding: 0 !important;
}

::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
    color: var(--primary-text-color);
    opacity: 1;
}

body {
    color: var(--primary-text-color);
}

.ql-toolbar {
    background-color: white !important;
    color: black !important;
}

.ql-editor > * {
    background-color: white !important;
    color: black !important;
}

.w3-card-4 {
    background: var(--modal-background-color);
    border-radius: 8px;
}

.w3-modal-content {
    background: var(--modal-background-color);
    border-radius: 8px;
}

h2, h3 {
    color: var(--primary-text-color);
}

table.list-table {
    font-family: arial, sans-serif;
    width: 100%;
    margin-bottom: 8px;
    border-collapse: separate;
    border-spacing: 0;
    border: solid 1px var(--input-border-color);
    border-radius: 4px;
    background: var(--input-background-color);
}

table.list-table th {
    background-color: var(--background-color);
}

table.list-table th:first-child {
    border-top-left-radius: 8px;
}

table.list-table th:last-child {
    border-top-right-radius: 8px;
}

table.list-table td, th {
    text-align: left;
    padding: 8px;
    font-size: 12px;
}


table.list-table tr:first-child {
    color: var(--highlight-text-color);
}


table.list-table tr {
    color: var(--primary-text-color);
}

table.list-table tr:hover {
    background: var(--background-color);
}

form.search-bar input[type=text] {
    padding: 10px;
    font-size: 17px;
    border: 1px solid grey;
    float: left;
    width: 80%;
    height: 47.5px;
    background-color: white;
    border-radius: 24px 0 0 24px
}

form.search-bar select {
    padding: 10px;
    font-size: 17px;
    border: 1px solid grey;
    float: left;
    width: 100%;
    height: 47.5px;
    background: #f1f1f1;
}

form.search-bar button {
    float: left;
    width: 20%;
    padding: 10px;
    background: var(--highlight-text-color);
    color: white;
    font-size: 17px;
    border: 1px solid grey;
    border-left: none;
    cursor: pointer;
    border-radius: 0 24px 24px 0
}

form.search-bar button:hover {
    background: #0b7dda;
}

form.search-bar::after {
    content: "";
    clear: both;
    display: table;
}

.pagination {
    display: inline-block;
}

.pagination a {
    color: var(--primary-text-color);
    float: left;
    padding: 8px 16px;
    text-decoration: none;
}

.pagination a.active {
    background: var(--modal-background-color);
    color: var(--highlight-text-color);
}

.pagination a:hover:not(.active) {
    background-color: var(--hover-link-color)
}

.tooltip {
    position: relative;
    display: inline-block;
    background-color: var(--background-color) !important;
    color: var(--primary-text-color) !important;
    border-color: var(--primary-text-color) !important;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 140px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 150%;
    left: 50%;
    margin-left: -75px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.snackbar {
    visibility: hidden; /* Hidden by default. Visible on click */
    min-width: 250px; /* Set a default minimum width */
    border-radius: 2px; /* Rounded borders */
    padding: 16px; /* Padding */
    position: fixed; /* Sit on top of the screen */
    z-index: 10; /* Add a z-index if needed */
    right: 5%; /* Center the snackbar */
    top: 30px; /* 30px from the top */
}

/* Show the snackbar when clicking on a button (class added with JavaScript) */
.snackbar.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.6s 11.5s;
    animation: fadein 0.5s, fadeout 0.6s 11.5s;
}

/* Animations to fade the snackbar in and out */
@-webkit-keyframes fadein {
    from {
        top: 0;
        opacity: 0;
    }
    to {
        top: 30px;
        opacity: 1;
    }
}

@keyframes fadein {
    from {
        top: 0;
        opacity: 0;
    }
    to {
        top: 30px;
        opacity: 1;
    }
}

@-webkit-keyframes fadeout {
    from {
        top: 30px;
        opacity: 1;
    }
    to {
        top: 0;
        opacity: 0;
    }
}

@keyframes fadeout {
    from {
        top: 30px;
        opacity: 1;
    }
    to {
        top: 0;
        opacity: 0;
    }
}

/* Counter */

#labelCount {
    font-size: 12px;
    background: #ff0000;
    color: #fff;
    padding: 0 5px;
    vertical-align: top;
    margin-left: -10px;
}

.badge {
    padding-left: 9px;
    padding-right: 9px;
    -webkit-border-radius: 9px;
    -moz-border-radius: 9px;
    border-radius: 9px;
}

.label-warning[href],
.badge-warning[href] {
    background-color: #c67605;
}

.w3-modal-content {
    background: var(--modal-background-color) !important;
}

input, select, .selectpicker {
    background: var(--input-background-color) !important;
    color: var(--primary-text-color) !important;
    border-radius: 8px;
    border: 1px solid var(--input-border-color) !important;;
}

input::placeholder {
    color: var(--secondary-text-color);
}

.col-head {
    padding-right: 8px;
}

@media (max-width: 992px) {
    .col-head {
        padding-right: 0;
    }
}

.col-tail {
    padding-left: 8px;
}

@media (max-width: 992px) {
    .col-tail {
        padding-left: 0;
    }
}

.primary-button, .secondary-button, .negative-button, .folder-button {
    border-radius: 8px;
    border: none;
    display: inline-block;
    padding: 8px 16px;
    vertical-align: middle;
    overflow: hidden;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
}

.primary-button {
    background-color: var(--primary-button-background) !important;
    color: var(--primary-button-color) !important;
}

.primary-button:hover {
    opacity: 0.9;
}

.secondary-button {
    background-color: var(--secondary-button-background) !important;
    color: var(--secondary-button-color) !important;
}

.secondary-button:hover {
    opacity: 0.9;
}

.negative-button {
    background-color: #f44336 !important;
    color: #fff !important;
}

.negative-button:hover {
    background-color: #d32f2f !important; /* rojo más oscuro */
}

.folder-button {
    background-color: #ff9800 !important;
    color: #fff !important;
}

.folder-button:hover {
    background-color: #e68900 !important; /* rojo más oscuro */
}

.badge-container {
    position: relative;
    overflow: visible !important;
}

.badge-notify {
    position: absolute;
    top: -8px;
    right: -8px;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
}

.mobile-navbar-badge {
    position: absolute;
    top: 0;
    right: 2px;
    border-radius: 50%;
    padding: 1px 3px;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
}

.badge-notify-light {
    position: absolute;
    top: 0;
    right: -6px;
    border-radius: 50%;
    padding: 1px 3px;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
}

.bad {
    background-color: #f44336;
    color: white;
}

.good {
    background-color: #4CAF50;
    color: white;
}

.blink {
    animation: blink 1.4s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.25;
    }
}