/* Estilos para el tema claro */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f0f0;
    color: #333;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

/* Estilos para la página de inicio de sesión */
.login-container {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 350px;
    text-align: center;
    margin: 50px auto; /* Centramos el contenedor */
}

.login-container h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.login-container h2 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #777;
}

.login-container form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.login-container label {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
    align-self: flex-start;
}

.login-container input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.login-container button:hover {
    background-color: #0056b3;
}

#error-message {
    color: red;
    text-align: center;
    margin-top: 10px;
}

/* Resto de los estilos del sitio web */
.navbar {
    background-color: #2c3e50;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .container-fluid {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-nav .nav-item {
    margin-right: 15px;
}

.navbar-nav .nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .dropdown-item:hover {
    color: #3498db;
    background-color: #34495e;
}

.navbar-text {
    color: #fff;
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    color: #fff;
}

.user-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.btn-outline-light {
    border-color: #fff;
    color: #fff;
    transition: background-color 0.3s, color 0.3s;
}

.btn-outline-light:hover {
    background-color: #3498db;
    border-color: #3498db;
    color: #fff;
}

.container {
    margin-top: 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.toolbar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 15px;
}

.toolbar .btn {
    margin-right: 10px;
    font-size: 14px;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    transition: color 0.3s;
}

.button-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.button-group a {
    margin: 5px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    border: none;
    color: white;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 4px 2px;
    transition-duration: 0.4s;
    cursor: pointer;
    border-radius: 5px;
    padding: 10px 20px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    background-color: #2980b9;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.table {
    width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 6px;
    vertical-align: middle;
    border: 1px solid #dee2e6;
    text-align: center;
    background-color: #f4f4f4;
    transition: background-color 0.3s, color 0.3s;
}

.table thead th {
    vertical-align: middle;
    border-bottom: 2px solid #dee2e6;
    background-color: #bfbfbf;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

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

.table-hover tbody tr:hover {
    background-color: #e0e0e0;
}

.editable:focus {
    outline: 2px solid #3498db;
    background-color: #e7f3ff;
}

/* Estilos para el tema oscuro */
body.dark-mode {
    background-color: #2c3e50;
    color: #ecf0f1;
}

.navbar.dark-mode {
    background-color: #1b2a38;
}

.container.dark-mode {
    background-color: #3b4d5a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.table th.dark-mode,
.table td.dark-mode {
    background-color: #445566;
    color: #ecf0f1;
}

.table thead th.dark-mode {
    background-color: #1b2a38;
}

/* Spinner de carga */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none; /* Hidden by default */
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border: 0.25em solid #3498db;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner 1s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}
