/****************************************************
   ESTILOS GENERALES
*****************************************************/
body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #eef2f5;
}

/****************************************************
   LAYOUT GENERAL (ADMIN)
*****************************************************/
.layout {
    display: flex;
    height: 100vh;
}

/****************************************************
   SIDEBAR
*****************************************************/
.sidebar {
    width: 260px;
    background: #0a1d52;
    color: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.logo-siderbar{
 display: flex;
 justify-content: center;
 margin-bottom: 1rem;
 align-items:center;
}
.logo-col-1 img{
 width: 100%;
}
.logo-col-2{
    padding-left: 1rem;
}
.brand {
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background: #ffffff;
    margin-bottom: 10px;
    text-decoration: none;
    color: #000;
    transition: 0.2s;
}
.menu-item-system{
    background: #1b6be0;
    color: white;
    padding: 8px 12px;
    margin-top: 5px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
}
.menu-item-recargar {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background: #1b6be0;
    margin-bottom: 10px;
    text-decoration: none;
    color: #ffffff;
    transition: 0.2s;
}
.recargar-button{
    max-width: 6%;
    text-align: center;
    align-items: center;
    display: flex;
    background-color: aliceblue
}

.menu-item:hover {
    background: #3c3f48;
    color: white;
}
.menu-item-recargar:hover{
    background: #3c3f48;
    color: white;
}
.menu-item.logout {

    background: #d9534f;
    color: white;
}

.menu-item.logout:hover {
    background: #c9302c;
}

/* ===============================
   BACKUP SIDEBAR
================================ */

.sidebar-section {
    margin: 12px;
    padding: 10px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
}

.sidebar-title {
    font-size: 13px;
    color: #cdd9ff;
    margin-bottom: 6px;
    font-weight: 600;
}

.backup-link {
    background: rgb(255 255 255);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
    text-align: center;
}

.backup-form input[type="file"] {
    width: 100%;
    font-size: 12px;
    margin-bottom: 6px;
    color: #fff;
}

.backup-form button {
    width: 100%;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    padding: 7px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
}

.backup-form button:hover {
    background: #1e40af;
}

/* Ocultar botón en desktop */
.menu-toggle {
    display: none;
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 28px;
    background: #333;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 999;
}

/* Tablet y móvil */
@media (max-width: 1024px) {

    /* Mostrar el botón */
    .menu-toggle {
        display: block;
    }

    /* Ocultar sidebar por defecto */
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100%;
        width: 240px;
        background: #0a1d52;
        padding: 20px;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    /* Cuando está activa */
    .sidebar.active {
        left: 0;
    }

    /* Empujar contenido */
    .content {
        margin-left: 0 !important;
    }
}



/****************************************************
   CONTENIDO (ADMIN & CALENDARIO)
*****************************************************/
.content {
    flex: 1;
    padding: 20px 30px;
    overflow-y: scroll;
}

.topbar {
    background: #0a1d52;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}
.calendario-registro{
    padding: 30px;
}
/* === PAGINACIÓN SIMPLE Y LIMPIA === */

/* Contenedor */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* Lista */
.pagination {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Botones */
.pagination .page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;

    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;

    color: #374151;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Hover */
.pagination .page-item .page-link:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}

/* Página activa */
.pagination .page-item.active .page-link {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    font-weight: bold;
    cursor: default;
}

/* Deshabilitado */
.pagination .page-item.disabled .page-link {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Flechas */
.pagination .page-item .page-link {
    padding: 0 10px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 480px) {
    .pagination {
        gap: 4px;
    }

    .pagination .page-item .page-link {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
    }
}
.button-editar-usuario{
    background: #222222;
    color: white;
    padding: 8px 12px;
    margin-top: 5px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
}
.button-user-system{
    display: flex;
    justify-content: center;
    gap: 10px;
}
/****************************************************
   CARD
*****************************************************/
.card {
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.card-title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 15px;
}

/****************************************************
   FORMULARIOS (ADMIN + CALENDARIO)
*****************************************************/
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.grid-label {
    display: grid;
}

.grid label {
    margin-bottom: 8px;
    font-weight: 600;
}

.style-dateform{
    padding: 10px;
    border: 1px solid #ccd2d8;
    border-radius: 8px;
}

.form-control{
    padding: 10px;
    border: 1px solid #ccd2d8;
    border-radius: 8px;
}

button {
    background: #1b6be0;
    color: white;
    padding: 10px 18px;
    margin-top: 5px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

button:hover {
    background: #1452a8;
}
.tittle-dateform{
     display: flex;
     gap: 10px;
     margin-bottom: 10px;
}
.pcr-last-color { 
    display: none !important; 
}
.pcr-current-color{
    height: 100% !important;
}

/****************************************************
   TABLA (ADMIN - REGISTROS) + CALENDARIO
*****************************************************/
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th {
    background: #0a1d52;
    color: white;
    padding: 10px 14px;
    border-right: 1px solid #ffffff20;
    font-size: 13px;
    white-space: nowrap;
}

table td {
    background: #fafafa;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #dcdcdc;
    padding: 10px 14px;
    font-size: 16px;
    text-align: center;
    white-space: nowrap;
}
.celda-color {
    transition: background-color 0.3s ease;
}

/* El color se insertará con JS usando el atributo data-color */


/****************************************************
   SCROLL PARA TABLA LARGA
*****************************************************/
.tabla-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    padding-bottom: 10px;
    border-radius: 10px;
    background: #fff;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
}
.tabla-scroll-top {
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 6px;
}

/* Solo sirve para generar el ancho del scroll */
.scroll-sync {
    height: 1px;
}

.tabla-scroll table {
    min-width: 1800px;
}

.tabla-scroll::-webkit-scrollbar {
    height: 8px;
}

.tabla-scroll::-webkit-scrollbar-thumb {
    background: #b4b4b4;
    border-radius: 4px;
}

.tabla-scroll::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/****************************************************
   LOGIN PAGE
*****************************************************/
.form-access{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: 100%;
  max-width: 400px;
  background-color: #fff;
  margin: 0;
  padding: 2.25em;
  box-sizing: border-box;
  border: solid 1px #ddd;
  border-radius: 0.5em;
  font-family: "Source Sans Pro", sans-serif;
}
.login-container {
    max-width: 380px;
    margin: 80px auto;
    background: white;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #0a1d52;
}

.login-container label {
    font-size: 14px;
    font-weight: 600;
}

.login-container input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccd2d8;
    border-radius: 8px;
    margin-bottom: 15px;
}

.login-container button {
    width: 100%;
    padding: 12px;
}

/****************************************************
   RESPONSIVE
*****************************************************/
@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar {
        position: fixed;
        height: 100%;
        z-index: 100;
    }

    .content {
        margin-left: 260px;
    }
}

@media (max-width: 600px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .content {
        margin-left: 0;
    }

    .sidebar {
        width: 100%;
        position: relative;
    }
}


.form-access {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    font-family: Arial, sans-serif;
}

.form-access h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.form-access label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
    color: #555;
}

.form-access input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.form-access button {
    margin-top: 20px;
    width: 100%;
    padding: 10px;
    background: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.form-access button:hover {
    background: #0056b3;
}

.form-access .error {
    color: red;
    text-align: center;
    margin-top: 10px;
}

.form-access .success {
    color: green;
    text-align: center;
    margin-top: 10px;
}

.form-access .link-back {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #007BFF;
    text-decoration: none;
}

.form-access .link-back:hover {
    text-decoration: underline;
}
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    padding-right: 30px; /* espacio para el icono */
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #555;
}


/* Estilo normal del botón */
.btn-print {
    background: #2d6cdf;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.btn-print:hover {
    background: #1f4fab;
}
.btn-clear-filter{
    text-decoration: none;
    border-radius: 10px;
    background: #1b6be0;
    color: white;
    padding: 8px 14px;
    margin-top: 5px;
    cursor: pointer;
}

.btn-clear-filter:hover {
    background: #1f4fab;
}
/* Estilos especiales SOLO al imprimir */
/* === ESTILOS ESPECIALES SOLO PARA IMPRIMIR === */
@media print {

    /* Ocultar elementos innecesarios */
    .recargar-button,
    .btn-print,
    form,
    h3,
    .buscar-fecha,
    hr {
        display: none !important;
    }

    /* Reset general */
    body {
        margin: 0 !important;
        padding: 0 !important;
        zoom: 85% !important;  /* <<< Truco que hace que TODO quepa */
    }

    /* Contenedor sin scroll */
    .table-container {
        overflow: visible !important;
        height: auto !important;
    }

    table {
        width: 100% !important;
        border-collapse: collapse !important;
        table-layout: fixed !important; /* <<< Fuerza adaptación automática */
    }

    th, td {
        border: 1px solid #000 !important;
        padding: 3px !important;
        font-size: 10px !important;
        white-space: normal !important; /* <<< Permite dividir texto */
        word-break: break-word !important; /* <<< rompe palabras largas */
        max-width: 120px !important; /* <<< reduce columnas muy anchas */
    }

    th {
        font-size: 10px !important;
        font-weight: bold !important;
    }

    /* Celda con color visible en impresión */
    .celda-color {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
.color-picker {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #ffffff;
    cursor: pointer;
    padding: 0;
    outline: none;
}

.estado-badge {
    padding: 6px 12px;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    display: inline-block;
    text-align: center;
    min-width: 90px;
}
