:root{
    --color-amarillo: #facd01;
    --color-amarillo-dos: #e6bb0f;
    --background: rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--background);
    height: 100vh;
    display: flex;
}

/* Estilos para la plantilla de Login */

#login {
    margin: 50px auto 0 auto;
    background: #fff;
    width: 400px;
    height: 440px;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.17);
    box-shadow: 3px 4px 15px;
}

#login h1 {
    text-align: center;
    margin-bottom: 25px;
    color: #222;
    font-size: 30px;
}

.nombre,
.password {
    margin-bottom: 18px;
}

#login label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

#login input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 15px;
    
}

#login input:focus {
    border-color: var(--color-amarillo);
    box-shadow: 0 0 5px rgba(37, 99, 235, 0.4);
}

#login button {
    width: 100%;
    padding: 12px;
    background: var(--color-amarillo);
    color: black;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.5s;
}

#login button:hover {
    background: var(--color-amarillo-dos);
}

img {
    margin: 20px auto;
    width: 270px;
    height:80px;
}

/* Estilo para la Barra de Navegacion */

/* Reset */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial, Helvetica, sans-serif;
}

/* Navbar */
.navbar{
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;

    background: var(--color-amarillo-dos);
    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:15px 40px;
    box-shadow:0 2px 10px rgba(0,0,0,.15);
    z-index:1000;

    font-size: 20px;
}

/* Estilo para titulo de Subestacion Ferrero San Jose Inturbide */
.navbar-title{
    padding-left: 8px;
    width: 300px;
    height: 100%;
    color: #fff;
    font-size: 25px;
    font-weight: 700;
    font-family: Georgia, 'Times New Roman', Times, serif;
    letter-spacing: 0px;
    border-left: 4px solid #facc15;
    border-right: 4px solid #facc15;
    text-align: center;
}


.nav-links{
    display:flex;
    align-items:center;
    gap:25px;
    list-style:none;
}

.nav-links a,
.logo a{
    color:white;
    text-decoration:none;
}

.logo img {
    margin: auto;
    width: 270px;
    height: 75px;
}

/* Contenido */
.container{
    max-width:1200px;
    margin:30px auto;
    padding:20px;
}

/* Estilo para boton de volver */

.btn-volver{
    margin: 150px 10px 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--color-amarillo);
    color: #fff;
    text-decoration: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    transition: .3s;
    box-shadow: 0 4px 10px rgba(0,0,0,.15);
}

.btn-volver:hover{
    background: #eab308;
    transform: translateY(-2px);
}


/* Diseño de la tabla de articulos principal */

.table-container {
    width: 1050px;
    background: #fff;
    margin: 10px auto;
    padding: 0px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    overflow-x: auto;
}

.table-container h2 {
    margin: auto;
    text-align: center;
    padding: 10px;
    color: #1f2937;
    font-size: 20px;
}

/* Estilos para la barra de busqueda */

.buscador-container {
    width: 100%;
    margin-top: 125px;
    display: flex;
    justify-content: flex-end;
}

.buscador-box {
    position: relative;
    width: 100%;
    max-width: 420px;
}

.buscador-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #6b7280;
    pointer-events: none;
}

.buscador-input {
    width: 100%;
    padding: 13px 16px 13px 45px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 15px;
    color: #1f2937;
    outline: none;
    background: #ffffff;
    transition: .3s;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.buscador-input:focus {
    border-color: #facc15;
    box-shadow: 0 0 0 4px rgba(250,204,21,.25);
}

.buscador-input::placeholder {
    color: #9ca3af;
}


.tabla-registros {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.tabla-registros thead {
    margin: 1px auto;
    background: #1f2937;
    color: #fff;
}

.tabla-registros th {
    padding: 10px 10px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.tabla-registros td {
    padding: 0;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.tabla-registros tbody tr:hover {
    background: #f3f4f6;
}

.btn-pdf {
    background: var(--color-amarillo);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
}

.btn-pdf:hover {
    background: var(--color-amarillo-dos);
}

.firma-img {
    width: 120px;
    max-height: 60px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
}

@media (max-width: 1025px) {
    .table-container {
        width: 700px;
        background: #fff;
        margin: 120px auto;
        padding: 0px;
        border-radius: 16px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
        overflow-x: auto;
    }

    .tabla-registros {
    width: 90%;
    border-collapse: collapse;
    min-width: 950px;
    }

    .tabla-registros th,
    .tabla-registros td {
        padding: 10px 11px;
        text-align: center;
        border-bottom: 1px solid #e5e7eb;
        font-size: 12px;
    }
}

/* Estilos de la pagina de crear Entradas */

/* Estilo de select pagina crear entradas */

.campo {
    display: flex;
    flex-direction: column;
    margin-bottom: 22px;
}

.campo label {
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 15px;
}

.salida-select,
.entrada-select {
    width: 100%;
    padding: 13px 45px 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background-color: #ffffff;
    color: #1f2937;
    font-size: 15px;
    outline: none;
    cursor: pointer;
    transition: .3s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
}

.salida-select,
.entrada-select:hover {
    border-color: #9ca3af;
}

.salida-select,
.entrada-select:focus {
    border-color: #facc15;
    box-shadow: 0 0 0 4px rgba(250, 204, 21, .25);
}
.salida-select,
.entrada-select option {
    color: #1f2937;
    background: #ffffff;
}

.entrada-form {
    margin: 130px auto 40px auto;
    width: 90%;
    height: 1150px;
    max-width: 700px;
    padding: 35px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

.entrada-form h2 {
    margin-bottom: 30px;
    color: #1f2937;
    font-size: 28px;
    text-align: center;
}

.campo {
    display: flex;
    flex-direction: column;
    margin-bottom: 22px;
}

.campo label {
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 15px;
}

.campo input {
    padding: 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: .3s;
}

.campo input:focus {
    border-color: #facc15;
    box-shadow: 0 0 0 4px rgba(250,204,21,.25);
}

#canvasFirma {
    margin: auto;
    width: 100%;
    max-width: 500px;
    height: 180px;
    border: 2px dashed #9ca3af;
    border-radius: 12px;
    background: #f9fafb;
    touch-action: none;
}

.entrada-btn-clear{
     margin-top: 20px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: var(--background);
    color: #000;
    cursor: pointer;
    transition: .3s;
}

.entrada-form button[type="submit"] {
    margin-top: 20px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #facc15;
    color: #ffffff;
    cursor: pointer;
    transition: .3s;
}



.entrada-form button[type="submit"]:hover {
    background: #eab308;
    transform: translateY(-2px);
}

@media (max-width: 1025px){
    .entrada-form {
        width: 90%;
        max-width: 950px;
        height: 1000px;
        margin: 130px auto 0 auto;
        padding: 35px;
        background: #ffffff;
        border-radius: 18px;
        box-shadow: 0 10px 30px rgba(0,0,0,.12);
    }
}

/* Estilos para la pagina de Salidas */

.salida-container {
    margin: 130 auto 0 auto;
    width: 100%;
    padding: 40px 20px;
}

.salida-card {
    width: 90%;
    max-width: 900px;
    margin: 130px auto 0 auto;
    padding: 35px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

.salida-title {
    margin-bottom: 30px;
    text-align: center;
    color: #1f2937;
    font-size: 28px;
    font-weight: 700;
}

.salida-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.salida-field-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.salida-field,
.salida-signature-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.salida-label {
    color: #374151;
    font-size: 15px;
    font-weight: 600;
}

.salida-input,
.salida-select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    background: white;
}

.salida-input:focus,
.salida-select:focus {
    border-color: var(--color-amarillo);
    box-shadow: 0 0 0 4px rgba(250,204,21,.25);
}

.salida-signature-canvas {
    width: 100%;
    max-width: 500px;
    height: 180px;
    border: 2px dashed #9ca3af;
    border-radius: 12px;
    background: #f9fafb;
    touch-action: none;
}

.salida-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.salida-btn-clear,
.salida-btn-save {
    padding: 13px 18px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.salida-btn-clear {
    background: rgb(148, 148, 148);
    color: #fff;
}

.salida-btn-save {
    background: #facc15;
    color: #fff;
}

.salida-btn-save:hover {
    background: #eab308;
}

.salida-btn-clear:hover {
    background: #d1d5db;
}

@media (max-width: 768px) {
    .salida-field-group {
        grid-template-columns: 1fr;
    }

    .salida-card {
        padding: 25px;
    }

    .salida-buttons {
        flex-direction: column;
    }
}

/* Estilo para la pagina de reportes*/

.reportes-container {
    width: 90%;
    max-width: 450px;
    height: 300px;
    margin: 190px auto 0 auto;
    padding: 35px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    justify-content: center;
}

.reportes-title {
    margin-bottom: 30px;
    color: #1f2937;
    font-size: 32px;
    text-align: center;
}

.reportes-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.reportes-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reportes-field label {
    color: #374151;
    font-size: 15px;
    font-weight: 600;
}

.reportes-field input {
    padding: 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
}

.reportes-field input:focus {
    border-color: #facc15;
    box-shadow: 0 0 0 4px rgba(250,204,21,.25);
}

.reportes-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.reportes-buttons button {
    padding: 13px 20px;
    border: none;
    border-radius: 10px;
    background: var(--color-amarillo);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: .3s;
}

.reportes-buttons button:hover {
    background: var(--color-amarillo-dos);
    transform: translateY(-2px);
}

@media (min-width: 768px) {
    .reportes-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .reportes-buttons {
        grid-column: 1 / -1;
    }
}

/* Estilo para la tabla en la pagina de entradas */

.entradas-container-table{
    margin: 10px auto 0 auto;
    width: 95%;
    max-width: 11000px;
}

.titulo-seccion{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.subtitulo{
    margin: 90px 0 0 0;
    color: #1f2937;
    font-size: 28px;
    font-weight: 700;
}

.btn-crear{
    margin: 130px 0 0 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    background: #22c55e;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 40px;
    font-weight: 600;
    transition: .3s;
}

.btn-crear:hover{
    background: #16a34a;
    transform: translateY(-2px);
}

.btn-crear:active{
    transform: scale(0.98);
}

.entradas-title{
    margin: 120px auto 0 auto;
    padding: 15px;
    text-align: center;
    width: 100%;
    color: #1f2937;
}

.entradas-table{
    margin: auto 50px auto 0; 
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.10);
}

.entradas-table thead{
    background: #1f2937;
}

.entradas-table th{
    padding: 10px;
    text-align: left;
    color: #fff;
    font-weight: 700;
}

.entradas-table td{
    padding: 5px 7px;
    border-bottom: 1px solid #e5e7eb;
}

.entradas-table tbody tr:hover{
    background: #f9fafb;
}



/* Estilo para boton de ver firma */

.btn-ver-firma{
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .3s;
}

.btn-ver-firma:hover{

    background: #1d4ed8;
}

/* CSS para ver firma MODAL */

.modal-firma{
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-firma-content{
    background: white;
    padding: 30px;
    border-radius: 15px;
    position: relative;
    max-width: 700px;
    width: 90%;
    text-align: center;
}

.cerrar-modal{
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    cursor: pointer;
}

.imagen-firma-modal{
    max-width: 100%;
    max-height: 300px;
    margin-top: 20px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
}

.btn-editar{
    display: inline-block;
    padding: 10px 14px;
    background: var(--color-amarillo-dos);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: .3s;
}



.btn-editar:hover{
    background: #1f2937;
}

@media(max-width: 900px){

    .entradas-table{
        display: block;
        overflow-x: auto;
    }

}

/* Estilo para la pagina de editar entradas */

.editar-entrada-form{
    height: 1500px;
    width: 90%;
    max-width: 700px;
    margin: 130px auto 0 auto;
    padding: 35px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.editar-entrada-form h2{
    text-align: center;
    color: #1f2937;
    margin-bottom: 15px;
}


.editar-entrada-form label{
    font-weight: 600;
    color: #374151;
}

.editar-entrada-form input{
    padding: 13px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: .3s;
}

.editar-entrada-form input:focus{
    border-color: #facc15;
    box-shadow: 0 0 0 4px rgba(250,204,21,.25);
}

.editar-entrada-form input:disabled{
    background: #f3f4f6;
    cursor: not-allowed;
}

.firma-botones{
    display: flex;
    justify-content: flex-start;
    margin-top: 10px;
}

.limpiar-firma{
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    background: #e5e7eb;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .3s;
}

.limpiar-firma:hover{
    background: #d1d5db;
    transform: translateY(-2px);
}

.guardar-boton{
    margin-top: 20px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #facc15;
    color: #1f2937;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: .3s;
}

.guardar-boton:hover{
    background: #eab308;
    transform: translateY(-2px);
}

.guardar-boton:active,
.limpiar-firma:active{
    transform: scale(0.98);
}
