/* General */

html,
body {
    font-family: 'Arial', sans-serif;
    margin: 10px;
    padding: 20px;
    background-image: url('images/fondoO.png');
    /* Ruta relativa correcta */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #4b3621;
    min-height: 100vh;
    /* Asegura que el contenido ocupe al menos toda la pantalla */
    display: flex;
    flex-direction: column;
}


/* Contenido principal */

#main {
    flex: 1;
    text-align: center;
    /* Centra todo el contenido en el contenedor */
    padding: 16px;
}


/* Encabezados */

h1,
h2 {
    text-align: center;
    margin-top: 20px;
    color: #3e2723;
    /* Marrón oscuro */
    font-family: 'Georgia', serif;
}


/* Botones */

button {
    background-color: #4b3621;
    /* Marrón medio */
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    font-family: 'Arial', sans-serif;
}

button:hover {
    background-color: #4b3621;
    /* Marrón más oscuro */
}


/* Formularios */

form {
    max-width: 400px;
    width: 100%;
    /* Asegura que el formulario se adapte al tamaño del contenedor */
    padding: 20px;
    background-color: rgba(250, 243, 224, 0.9);
    background-image: url('images/fondo.jpeg');
    /* Ruta relativa correcta */
    background-size: cover;
    border: 1px solid #ddd;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    margin: 20px auto;
    /* Centra el formulario horizontalmente y añade espacio superior */
}


/* Inputs */

input[type="text"],
input[type="email"],
input[type="password"],
button {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    display: block;
    box-sizing: border-box;
    border-radius: 5px;
    border: 1px solid #bbb;
    font-family: 'Arial', sans-serif;
}


/* Tablas */

table {
    width: 80%;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: #faf3e0;
    /* Fondo beige */
    border-radius: 10px;
    overflow: hidden;
}

th,
td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
}

th {
    background-color: #4b3621;
    /* Cafe  */
    color: white;
}

td {
    background-color: #ffe0b2;
    /* Tono crema */
}


/* Enlaces */

a {
    display: block;
    text-align: center;
    margin: 10px auto;
    color: #6d4c41;
    /* Marrón */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #4b3621;
    /* Marrón más oscuro */
}


/* Footer */

footer {
    width: 100%;
    background: #4b3621;
    color: #fff;
    text-align: center;
    padding: 14px 0 12px 0;
    position: fixed;
    left: 0;
    bottom: 0;
    font-size: 16px;
    letter-spacing: 0.5px;
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.07);
}


/* Cabecera */

header {
    width: 100%;
    background-color: #4b3621;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    height: 60px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.header-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 60px;
}

header .admin-btn {
    font-size: 30px;
    cursor: pointer;
    color: white;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

header h1 {
    margin: 0;
    font-size: 24px;
    color: white;
    text-align: center;
    width: 100%;
    z-index: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Espacio para el header fijo */
#main {
    margin-top: 70px !important;
}

/* Responsive header */
@media (max-width: 700px) {
    header h1 {
        font-size: 16px;
    }
    .header-content {
        height: 48px;
    }
    header {
        height: 48px;
    }
    #main {
        margin-top: 55px !important;
    }
    header .admin-btn {
        font-size: 22px;
        left: 10px;
    }
}


/* Estilo del nav dentro del header */

nav {
    background-color: #4b3621;
    /* Café oscuro */
    overflow: hidden;
    padding: 10px;
    text-align: center;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    /* Centra los elementos del menú */
}

nav ul li {
    padding: 8px 12px;
    display: inline-block;
    position: relative;
    /* Necesario para el menú desplegable */
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

nav ul li a:hover {
    color: #d7bba8;
    /* Café claro */
}

nav ul li.dropdown .dropbtn {
    cursor: pointer;
}

nav ul li .dropdown-content {
    display: none;
    position: absolute;
    background-color: #4b3621;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    top: 100%;
    /* Asegura que el menú aparezca debajo del botón */
}

nav ul li .dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

nav ul li .dropdown-content a:hover {
    background-color: #8b5e3c;
}


/* Mostrar el contenido del dropdown cuando se pasa el ratón */

nav ul li.dropdown:hover .dropdown-content {
    display: block;
}


/* Estilo de las gráficas */

canvas {
    display: block;
    margin: 0 auto;
    background-color: #ffe0b2;
    /* Fondo crema claro */
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}


/* Ajustar la posición y la transición del menú lateral */

.sidenav {
    height: 100%;
    /* Asegura que ocupe todo el alto de la pantalla */
    width: 0;
    /* Inicialmente oculto */
    position: fixed;
    /* Permanece fijo en la pantalla */
    z-index: 1;
    /* Encima de otros elementos */
    top: 0;
    left: 0;
    background-color: #4b3621;
    /* Color marrón oscuro */
    overflow-x: hidden;
    /* Oculta contenido horizontal */
    transition: width 0.5s ease;
    /* Animación suave al abrir y cerrar */
    padding-top: 60px;
    /* Añade espacio para el encabezado */
}

.sidenav a {
    padding: 8px 16px;
    /* Espaciado dentro de los enlaces */
    text-decoration: none;
    /* Sin subrayado */
    font-size: 18px;
    /* Tamaño de fuente */
    color: #f1f1f1;
    /* Color claro */
    display: block;
    /* Cada enlace ocupa una línea */
    transition: color 0.3s ease;
    /* Cambio de color suave */
}

.sidenav a:hover {
    color: #d7bba8;
    /* Color más claro al pasar el ratón */
}

.sidenav .closebtn {
    position: absolute;
    /* Posicionado dentro del menú */
    top: 0;
    right: 25px;
    /* Separado del borde derecho */
    font-size: 36px;
    /* Tamaño del botón */
    margin-left: 50px;
}


/* Ajustar el contenido principal cuando el menú está abierto */

#main {
    transition: margin-left 0.5s ease;
    padding: 16px;
}

.error-message {
    margin-top: 10px;
    /* Añadir espacio entre el botón y el mensaje */
    color: #ffffff;
    /* Texto en rojo oscuro */
    background-color: #ffdddd;
    /* Fondo rojo claro */
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    width: 100%;
    /* Ajustar para que coincida con el ancho del formulario */
    box-sizing: border-box;
}


/* Asegura que el párrafo del mensaje esté bien alineado */

.error-message p {
    margin: 0;
    color: #000000;
}

.refresh-button {
    background-color: #4b3621;
    /* Color de fondo del botón */
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    display: block;
    margin: 20px auto;
    /* Centrado en la página */
    font-family: 'Arial', sans-serif;
    transition: background-color 0.3s;
}

.refresh-button:hover {
    background-color: #3e2723;
    /* Color más oscuro al pasar el cursor */
}


/* Estilo para los filtros */

.filters {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.filter-btn {
    margin: 0 10px;
    padding: 10px 20px;
    background-color: #4b3621;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-family: 'Arial', sans-serif;
    transition: background-color 0.3s ease;
}

.filter-btn:hover {
    background-color: #3e2723;
}


/* Estilo para alertas */

.alerts {
    margin: 20px auto;
    text-align: center;
}

.alert {
    color: red;
    font-weight: bold;
}

.filters-menu ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 20px 0;
}

.filters-menu ul li {
    margin: 0 10px;
}

.filters-menu ul li a {
    text-decoration: none;
    padding: 10px 15px;
    background-color: #4b3621;
    color: white;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.filters-menu ul li a:hover {
    background-color: #3e2723;
}

.alerts {
    text-align: center;
    margin: 20px 0;
}

.alert {
    padding: 15px;
    margin: 10px auto;
    border-radius: 5px;
    font-size: 18px;
    width: 80%;
    color: white;
    text-align: center;
}

.alert-danger {
    background-color: #d9534f;
}

.alert-success {
    background-color: #5cb85c;
}

.date-filter {
    text-align: center;
    margin: 20px 0;
}

.date-filter label {
    font-size: 16px;
    margin-right: 10px;
}

.date-filter input[type="date"] {
    padding: 5px 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.date-filter .filter-btn {
    padding: 5px 15px;
    font-size: 16px;
    background-color: #4b3621;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
}

.date-filter .filter-btn:hover {
    background-color: #3e2723;
}


/* Paginación tipo "moderna" para DataTables */

.dataTables_paginate {
    margin-top: 20px;
    text-align: center !important;
    width: 100%;
}
.dataTables_paginate .paginate_button {
    background: #fff !important;
    color: #a67c52 !important;
    border: 2px solid #a67c52 !important;
    border-radius: 50% !important;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border 0.2s;
}
.dataTables_paginate .paginate_button.current {
    background: #a67c52 !important;
    color: #fff !important;
    border-color: #a67c52 !important;
}
.dataTables_paginate .paginate_button:hover:not(.current) {
    background: #f5e6d3 !important;
    color: #5d3b1a !important;
    border-color: #a67c52 !important;
}
.dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: default !important;
    background: #fff !important;
    color: #ccc !important;
    border-color: #eee !important;
}

/* Botones DataTables más visibles */
.dt-button {
    background: #a67c52 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    margin: 0 6px 10px 0 !important;
    padding: 10px 22px !important;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
    cursor: pointer;
    transition: background 0.2s;
}
.dt-button:hover {
    background: #5d3b1a !important;
    color: #fff !important;
}

.logout-btn {
    float: right;
    margin-top: -40px;
    margin-right: 30px;
    background: #a67c52;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 8px 18px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}
.logout-btn:hover {
    background: #5d3b1a;
    color: #fff;
}

.dataTables_filter label {
    position: relative;
    font-weight: bold;
    color: #6b4f33;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.dataTables_filter input[type="search"] {
    border: 2px solid #a67c52;
    border-radius: 25px;
    padding: 8px 38px 8px 16px;
    font-size: 16px;
    outline: none;
    background: #fff8f0;
    color: #6b4f33;
    transition: border 0.2s;
    width: 220px;
    box-sizing: border-box;
}

.dataTables_filter input[type="search"]:focus {
    border-color: #5d3b1a;
    background: #fff;
}

/* Ícono de lupa SVG a la derecha del input */
.dataTables_filter label::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23a67c52" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>') no-repeat center center;
    background-size: 18px 18px;
    pointer-events: none;
}

.logout-container {
    width: 100%;
    text-align: center;
    margin: 40px 0 0 0;
}

.logout-btn {
    display: inline-block;
    background: #a67c52;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 17px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}
.logout-btn:hover {
    background: #5d3b1a;
    color: #fff !important;
}

/* Estilo para el contenedor del formulario de edición */
.edit-user-container {
    max-width: 420px;
    margin: 40px auto 0 auto;
    background: #fdf5e6;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(166, 124, 82, 0.10);
    padding: 36px 32px 28px 32px;
    border: 1.5px solid #f3e2c7;
    text-align: left;
}

.edit-user-container h2 {
    text-align: center;
    color: #4b3621;
    margin-bottom: 28px;
    font-family: 'Georgia', serif;
}

.edit-user-container label,
.edit-user-container strong {
    color: #4b3621;
    font-size: 17px;
    margin-bottom: 8px;
    display: block;
}

.edit-user-container select {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1.5px solid #a67c52;
    font-size: 16px;
    margin-bottom: 18px;
    background: #fff8f0;
    color: #4b3621;
    outline: none;
    transition: border 0.2s;
}

.edit-user-container select:focus {
    border-color: #5d3b1a;
    background: #fff;
}

.edit-user-container button {
    width: 100%;
    background: #4b3621;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 12px 0;
    font-size: 17px;
    font-weight: bold;
    margin-top: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.edit-user-container button:hover {
    background: #a67c52;
    color: #fff;
}

.edit-user-container .volver-link {
    display: block;
    text-align: center;
    margin-top: 22px;
    color: #6b4f33;
    font-size: 16px;
    text-decoration: none;
    transition: color 0.2s;
}

.edit-user-container .volver-link:hover {
    color: #a67c52;
    text-decoration: underline;
}

/* Elimina o comenta cualquier sombra/fondo extra en el form */
.edit-user-container form {
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 0 0 18px 0;
}

/* Modal de confirmación centrado y elegante */
.modal-confirm {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.35);
    justify-content: center;
    align-items: center;
}

.modal-confirm.active {
    display: flex;
}

.modal-content-confirm {
    background: #fff8f0;
    padding: 28px 32px 22px 32px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    text-align: center;
    min-width: 320px;
    max-width: 90vw;
}

.modal-content-confirm p {
    color: #4b3621;
    font-size: 18px;
    margin-bottom: 22px;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 10px;
}

.btn-delete {
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 28px;
    font-size: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-delete:hover {
    background: #e53935;
}

.btn-cancel {
    background: #bbb;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 28px;
    font-size: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-cancel:hover {
    background: #888;
}

.register-container {
    text-align: center;
    margin-top: 18px;
}

.register-btn {
    display: inline-block;
    background: #a67c52;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}
.register-btn:hover {
    background: #5d3b1a;
    color: #fff !important;
}



