/* ------------------------------
   ESTILOS GENERALES
--------------------------------*/

body {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background: #f0f2f5;
    margin: 0;
    padding: 0;
    color: #333;
}

/* ------------------------------
   HEADER SUPERIOR
--------------------------------*/

header {
    background: linear-gradient(90deg, #192846, #0056c1);
    color: #fff;
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

header .stats {
    font-size: 15px;
    opacity: 0.9;
}

/* ------------------------------
   LOGIN BOX
--------------------------------*/

.login-box {
    width: 350px;
    background: #fff;
    padding: 25px;
    margin: 120px auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    text-align: center;
}

.login-box h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 600;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: 0.25s ease;
}

.login-box input:focus {
    border-color: #192846;
    box-shadow: 0 0 5px rgba(0,123,255,0.4);
    outline: none;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #192846;
    border: none;
    color: #fff;
    font-size: 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease;
}

.login-box button:hover {
    background: #005fcc;
}

/* ------------------------------
   CONTENEDOR PRINCIPAL
--------------------------------*/

.container {
    padding: 25px 5%;
    max-width: 1100px;
    margin: auto;
}

/* ------------------------------
   INPUT DE CUPÓN CENTRADO
--------------------------------*/

.cupon-container {
    width: 380px;
    margin: 30px auto;
    text-align: center;
}

#cupon {
    width: 100%;
    padding: 14px;
    font-size: 17px;
    border: 2px solid #ccc;
    border-radius: 8px;
    transition: 0.3s;
    box-sizing: border-box;
}

#cupon:focus {
    border-color: #192846;
    box-shadow: 0 0 8px rgba(0,123,255,0.2);
    outline: none;
}

/* ------------------------------
   BOTÓN DE VALIDAR CUPÓN
--------------------------------*/

#validarBtn {
    width: 100%;
    margin-top: 12px;
    padding: 14px;
    font-size: 17px;
    border-radius: 8px;
    border: none;
    background: #192846;
    color: white;
    cursor: pointer;
    transition: 0.25s;
}

#validarBtn:hover {
    background: #005fcc;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* ------------------------------
   TITULOS Y SECCIONES
--------------------------------*/

h3 {
    margin-top: 40px;
    font-weight: 600;
}

/* ------------------------------
   TABLA DATATABLES
--------------------------------*/

table.dataTable {
    border-collapse: collapse !important;
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    font-size: 14px;
}

table.dataTable thead {
    background: #192846;
    color: white;
}

table.dataTable th,
table.dataTable td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

table.dataTable tbody tr:hover {
    background: #f2f7ff;
}

/* ------------------------------
   MODAL (MENSAJES FLOTANTES)
--------------------------------*/

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(3px);
}

.modal-content {
    background: white;
    padding: 25px;
    width: 380px;
    margin: 150px auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    text-align: center;
    animation: modalIn 0.25s ease-out;
}

/* Animación modal */
@keyframes modalIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ------------------------------
   BOTÓN OK DEL MODAL
--------------------------------*/

.modal-content button {
    width: 100%;
    padding: 12px;
    background: #192846;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    margin-top: 18px;
    cursor: pointer;
    transition: 0.2s;
}

.modal-content button:hover {
    background: #005fcc;
}

/* -----------------------------------
   LOGO EN HEADER
----------------------------------- */

.header-left {
    display: flex;
    align-items: center;
    gap: 15px; /* separación entre logo y texto */
}

.logo-header {
    height: 100px;          /* tamaño ideal para header */
    width: 100px;
    object-fit: contain;   /* respeta proporción del PNG */
    border-radius: 6px;    /* opcional: bordes suaves */
}

/* LOGO DEL LOGIN */
.login-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 10px auto;
    display: block;
}

/* Ajustes a la caja del login */
.login-box {
    width: 360px;
    background: #fff;
    padding: 30px;
    margin: 120px auto;
    border-radius: 14px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
    text-align: center;
}

/* Input y botón alineados */
.login-box input, 
.login-box button {
    width: 100%;
    box-sizing: border-box;
}

/* Error message */
.login-box .error {
    color: #c00;
    margin-top: 10px;
    font-size: 14px;
}

/* Títulos del modal */
#modal-title {
    margin-top: 0;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}

.modal-success {
    color: #1fa851; /* verde */
}

.modal-error {
    color: #d62525; /* rojo */
}

/* Efecto visual para nueva fila */
.highlight {
    background-color: #fff3a3 !important; /* amarillo suave */
    animation: fadeHighlight 2s forwards;
}

@keyframes fadeHighlight {
    0%   { background-color: #fff3a3; }
    100% { background-color: transparent; }
}

.logout-btn {
    background: #c62828;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 15px;
}

.logout-btn:hover {
    background: #a61c1c;
}

.highlight {
    background-color: #fff3a3 !important;
    animation: fadeHighlight 2s forwards;
}

@keyframes fadeHighlight {
    0% { background-color: #fff3a3; }
    100% { background-color: #ffffff; } /* blanco */
}

/* Agrupa Local + botón Salir */
.local-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Botón Salir */
.logout-btn {
    background: #D76122;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    width: fit-content;
    transition: 0.2s;
}

.logout-btn:hover {
    background: #103754;
}

/* Mantener contadores a la derecha */
.header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

