:root {
    --bgcolor: #39A900;
    --bgcolor-clare: #39A900;
    --hovercolor: rgba(60, 109, 42, 1);
    --hovercolorclare: rgba(202, 255, 182, 0.144);
    --text-color: rgba(140, 223, 120, 1);
    --header-height: 70px;
}

/* Fuentes */
@font-face {
    font-family: Zurich;
    src: url(../assets/fonts/Zurich/Zurich.ttf) format('truetype');
}

@font-face {
    font-family: ZurichBlack;
    src: url(../assets//fonts/Zurich/Zurich\ Black\ BT.ttf) format('truetype');
}

@font-face {
    font-family: Nunito;
    src: url(../assets/fonts/Nunito/static/Nunito-Regular.ttf) format('truetype');
}

body {
    font-family: 'Nunito', sans-serif;
    height: 100%;
}

html {
    height: 100%;
}

/*=====================================================================================*/

/* 
    CONTENEDOR MAIN
*/
main {
    min-height: calc(100vh - var(--header-height));
    padding: 80px 40px
}

/*=====================================================================================*/

/* 
    HEADER 
*/
header.layout {
    background-color: var(--bgcolor);
    font-family: 'ZurichBlack', Helvetica, sans-serif;
    width: 100%;
    height: var(--header-height);
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 20px;
}

header.layout * {
    color: white;
    margin: 0;
}

/* Icono Admin */
header.layout .header-admin {
    width: 40px;
    position: absolute;
    right: 50px;
    border-radius: 15px;
    border: 2px solid white;
    padding: 8px;
}

header.layout .header-admin img {
    width: 100%;
}

.header-title {
    position: absolute;
    top: 0;
    left: 20px;
    height: var(--header-height); /* consistente con el header */
    display: flex;
    align-items: center;
}

.header-title img {
    height: 40px; /* 👈 Tamaño controlado */
    width: auto;
}

/*=====================================================================================*/

/*
    GENERALES   
*/

/* KEYBOARD */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@100;300;400;700&display=swap');

.container-keyboard {
    display: flex;
    align-items: center;
    justify-content: center;
}

.keyboard {
    display: none;
    max-width: 1020px;
    max-height: 360px;
    width: 100%;
    background-color: #e7e7e7;
    overflow: hidden;
    padding: 0px 14px;
    position: absolute;
}

.keyboard_bg {
    position: absolute;
    width: 100%;
    height: 100%;
}

.keyboard.active {
    display: block;
    animation: keyboard_animation 1.5s forwards;
}

.keyboard .text {
    max-width: 1008px;
    width: 100%;
    height: 90px;
    margin-bottom: 30px;
    border: none;
    outline: none;
    font-size: 26px;
    background-color: #f7f7f7;
    padding-left: 10px;
    transition: .2s;
    pointer-events: none;
}

.keyboard .text.active {
    background-color: #2b2b2b;
    color: #fff;
}

@keyframes keyboard_animation {
    0% {
        height: 0;
    }

    100% {
        height: 55%;
    }
}

.keyboard .keys {
    width: 60px;
    height: 60px;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 4px;
    transition: .2s;
    z-index: 5;
    cursor: pointer;
    pointer-events: all;
}

.keyboard .keys.active {
    background-color: #333;
    color: #fff;
}

.keyboard .keys.remove {
    animation: keys_animation 0.5s forwards;
}

.keyboard .backspace_key {
    width: 120px;
}

.keyboard .tab_key {
    width: 90px;
}

.keyboard .slash_key {
    width: 90px;
}

.keyboard .caps_lock_key {
    width: 128px;
}

.keyboard .enter_key {
    width: 120px;
}

.keyboard .shift_key {
    width: 124px;
}

.keyboard .space_key {
    max-width: 600px;
    width: 100%;
}

@keyframes keys_animation {
    0% {
        background-color: #333;
        color: #fff;
    }

    100% {
        background-color: #fff;
        color: #000;
    }
}


/* CARD */
.card {
    position: relative; /* IMPORTANTE */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    height: auto;
    margin: 60px auto;
    padding: 30px 50px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.card-aside {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.card-aside .btn {
    border-radius: 10 10 10 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 12px;
    padding: 6px 12px;
}
.card .card-header {
    background-color: white;
    border: none;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.card .card-header .card-title {
    font-size: 2rem;
    text-align: center;
    font-weight: normal;
    color: var(--text-color);
}

.card .card-body {
    width: 100%;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card .card-footer {
    background-color: white;
    border: none;
    width: 100%;
    display: flex;
    justify-content: center;
}


/* FORMULARIO */
/* Margen entre filas */
.form-group {
    padding: 18px 0;
    align-items: center;
}

/* Cuerpo input */
.input-box {
    width: 100%;
    height: 50px;
    position: relative;
    border: 2px solid rgb(141, 194, 121);
    border-radius: 20px;
}

/* Label */
.input-box label {
    top: 50%;
    left: 20px;
    background-color: white;
    font-size: 1rem;
    font-weight: 300;
    color: #807e7e;
    position: absolute;
    pointer-events: none;
    transition: .5s;
    transform: translateY(-50%);
}

/* Input */
.input-box input {
    margin-left: 10px;
    width: 95%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
}

/*Al estar activo cambiar posicion de label*/
.input-box input:focus~label,
.input-box input:valid~label,
.input-box input:read-only~label {
    top: -3px;
}

/* Check formulario */
.form-check {
    font-size: 1rem;
}

.form-check-input:checked[type=checkbox] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.form-check-input:checked {
    background-color: var(--bgcolor);
    border: 1px solid white;
}

/* Seccion boton form */
.form-submit {
    text-align: center;
    margin: 50px 0 0 0;
}

/* Boton form */
.form-submit .form-btn {
    font-size: 1.1rem;
    width: 150px;
    height: 40px;
    background: var(--bgcolor);
    border: #fff;
    transition: width 1s;
    color: white;
}

.form-submit .form-btn:hover {
    width: 100%;
    background: rgb(92, 187, 58);
}

/* Boton verde */
.btn-green {
    background-color: var(--bgcolor-clare);
    color: white;
    font-weight: bold;
}

.btn-green:hover {
    background-color: rgb(92, 187, 58) !important;
    color: white !important;
}


/* OTROS */

/* Boton verde - atras */
.back-button {
    position: absolute;
    left: 70px;
    color: var(--text-color);
}

.back-button:hover {
    color: var(--bgcolor);
}

/* Boton cancelar */
.btn.cancel {
    background-color: red;
    color: white;
}

.btn.cancel:hover {
    background-color: rgb(179, 42, 42);
    color: white;
}

/* Boton aceptar */
.btn.accept {
    background-color: var(--bgcolor-clare);
    color: white;
}

.btn.accept:hover {
    background-color: var(--text-color);
    color: white;
}

.alert {
    margin-bottom: 20px;
}

/*=====================================================================================*/

/*
    INDEX
*/

/* GENERALES */
#ingreso header .header-title {
    text-align: center;
    color: var(--text-color);
    font-weight: bolder;
}
#ingreso header .header-title2 {
    text-align: center;
    color: var(--text-color);
    font-weight: bolder;
}
#ingreso .card .card-footer>* {
    margin: 0 40px;
}

/* REGISTRO - ELECCION TIPO */


#ingreso.register-select .card {
    width: 80%;
}

/* Lista */
#ingreso.register-select .card .card-body ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Items */
#ingreso.register-select .card .card-body a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-color);
}

#ingreso.register-select .card .card-body a img {
    width: 50%;
}

#ingreso.register-select .card .card-body a span {
    font-weight: 500;
    font-size: 1.5rem;
}

/* REGISTRO - FORMULARIO */
#ingreso.register .card {
    width: 70%;
}

#ingreso.form .card .card-body form {
    width: 90%;
}


/* ESCANEO CARNET */

/* Modal botones ingreso/salida */
#ingreso.scan .btn-zone .modal-dialog {
    max-width: 90%;
}

/* Card escaneo */
#ingreso.scan .card {
    width: 35%;
}

/* Card escaneo: Seccion escaneo */
#ingreso.scan .card .card-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 3px solid #ddd;
    border-radius: 10px;
    height: 250px;
    width: 80%;
    background-color: #e6e5e5;
}

#ingreso.scan .card .card-code img {
    width: 15%;
    opacity: .5;
    position: absolute;
    background-color: #e6e5e5;
}

/* Card escaneo: Barra scan */
#ingreso.scan .card .card-barra {
    width: 80%;
    height: 7px;
    background-color: #39A900;
    border-radius: 100px;
    animation: barra 5s infinite;
    z-index: 1;
    position: relative;
    box-shadow: 2px 2px 5px;
}

@keyframes barra {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(250px);

    }

    100% {
        transform: translateY(0);

    }
}

/* Card footer */
#ingreso.scan .card .card-footer .row {
    margin: 0;
}

/* Card escaneo: input */
#ingreso.scan .card .card-footer input {
    width: 100%;
    height: 20px;
    border: 1px solid var(--bgcolor-clare);
    border-radius: 20px;
    padding: 15px;
}

#ingreso.scan .card .card-footer input:hover {
    border: 1px solid var(--bgcolor);
}

#ingreso.scan .card .card-footer input:focus {
    box-shadow: 0 0 0 0.25rem rgb(127 255 116 / 25%);
}

/* Boton camara*/
.smallCamera {
    width: 12%;
    padding: 0 5px;
}


/* CONSULTA USUARIO */

/* CARD */

/* Card header */
#ingreso.consulta .card .card-header {
    justify-content: space-between;
}

#ingreso.consulta .card .card-header .card-title {
    font-weight: bolder;
    flex: 1;
    margin: 0 30px 0 130px;
}

#ingreso.consulta .card .card-header .card-hour {
    position: absolute;
    left: 30px;
    font-size: 20px;
    color: var(--text-color);
    font-weight: bold;
}

#ingreso.consulta .card .card-header .card-header-element .btn {
    border: 2px solid #ddd;
    background-color: white;
    color: var(--bgcolor-clare);
}

#ingreso.consulta .card .card-header .card-header-element .btn:hover {
    border: 2px solid var(--bgcolor-clare);
    background-color: var(--bgcolor-clare);
    color: white;
}

/* Card body */
#ingreso.consulta .card .card-body {
    flex-direction: row;
    align-items: flex-start;
}

/* Imagen usuario */
#ingreso.consulta .card .card-body .card-image {
    display: flex;
    flex-direction: column;
}

#ingreso.consulta .card .card-body .card-image img {
    border: 1px solid var(--bgcolor-clare);
    border-radius: 50px;
    width: 300px;
    height: 410px;
}


/* INGRESO TOMAR FOTO */

/* Boton tomar foto */
#ingreso.consulta #user-picture-btn {
    width: 15%;
}

/* Modal camara */
.cam-modal .modal-dialog {
    max-width: 90%;
    margin: 40px auto;
}

#camaraModal .modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Video */
#camaraModal #user-cam {
    width: 70%;
    border-radius: 100px;
    margin-top: 30px;
}

/* Canvas */
#camaraModal #user-picture {
    width: 70%;
    border-radius: 100px;
    margin-top: 30px;
    display: none;
}

/* Botones */
#camaraModal .btn-zone {
    margin: 50px 0;
}

#camaraModal .btn-zone form {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

#camaraModal .btn-zone form .btn-picture {
    width: 15%;
    margin: 0px 40px;
}

#camaraModal .btn-picture {
    width: 35%;
    display: block;
    margin: 0 auto;
    padding: 20px;
    -moz-border-radius: 50%;
    -webkit-border-radius: 50%;
    border-radius: 50%;
}

#camaraModal #user-repeatpicture-btn,
#camaraModal #user-savepicture-btn {
    display: none;
    margin-bottom: 10px;
}

/* Datos usuario */
#ingreso.consulta .card .card-body .card-info {
    width: 100%;
    margin-left: 20px;
}

#ingreso.consulta .card .card-body .card-info>* {
    margin: 20px;
    font-size: 18px;
}

#ingreso.consulta .card .card-body .card-info label {
    color: var(--text-color);
    font-weight: bold;
}

/* Card footer */
#ingreso.consulta .card .card-footer .btn {
    width: 65%;
}

#ingreso.consulta .card .card-footer .btn-success {
    background-color: var(--text-color);
    border-color: var(--text-color);
}


/* Select vehiculo y dispositivos */

#ingreso.consulta .card .select-form {
    position: relative;
    max-width: 350px;
    width: 100%;
}

/* SELECT CERRADO */
#ingreso.consulta .card .select-form .select-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 55px;
    padding: 0 20px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 30px;
    box-shadow: 0 5px 10px rgb(0 0 0 / 25%);
    background-color: #fff;
}

/* Select texto */
#ingreso.consulta .card .select-form .select-btn .btn-text {
    font-size: 16px;
    font-weight: 400;
    color: #333;
}

/* Select cerrado: Flecha abajo */
#ingreso.consulta .card .select-form .select-btn .arrow-dwn {
    display: flex;
    height: 21px;
    width: 21px;
    color: #fff;
    font-size: 14px;
    border-radius: 50%;
    background: var(--bgcolor-clare);
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

/* Select lista */
#ingreso.consulta .card .select-form .list-items {
    display: none;
    position: relative;
    margin-top: 15px;
    padding: 16px;
    border: 1px solid rgba(221, 221, 221, 0.3);
    border-radius: 8px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

/* SELECT ABIERTO */

/* Select abierto: Flecha arriba*/
#ingreso.consulta .card .select-form .select-btn.open .arrow-dwn {
    transform: rotate(-180deg);
}

/* Select lista abierta */
#ingreso.consulta .card .select-form .select-btn.open~.list-items {
    display: block;
}

/* Items */
#ingreso.consulta .card .select-form .list-items .item {
    display: flex;
    align-items: center;
    list-style: none;
    height: 50px;
    padding: 0 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

#ingreso.consulta .card .select-form .list-items .item:hover {
    background-color: rgba(126, 241, 98, 0.2);
}

#ingreso.consulta .card .select-form .list-items .item-text {
    font-size: 16px;
    font-weight: 400;
    color: #333;
}

/* Item checkbox */
#ingreso.consulta .card .select-form .item .checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    width: 20px;
    margin-right: 12px;
    border: 1.5px solid #c0c0c0;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

#ingreso.consulta .card .select-form .checkbox .check-icon {
    color: #fff;
    font-size: 11px;
    transform: scale(0);
    transition: all 0.2s ease-in-out;
}


/* Cuando tiene check */
#ingreso.consulta .card .select-form .item.checked .checkbox {
    background-color: var(--bgcolor);
    border-color: var(--bgcolor);
}

#ingreso.consulta .card .select-form .item.checked .check-icon {
    transform: scale(1);
}

/* INGRESO: REGISTRO USUARIO FORM*/
#ingreso.register-user .card .card-body form {
    width: 100%;
}



/* -------------------------------------------------------------------------------------------------------------------------------*/
:root {
    --width: 250px;
    --padding: 10px;
    --bgcolor:
        rgba(78, 142, 55);
    --hovercolor:
        rgb(60, 109, 42);
    --hovercolorclare:
        rgba(202, 255, 182, 0.144);
    --width-collapsed: 50px;
    --gradient: linear-gradient(90deg, rgba(2, 0, 36, 1) 0%, rgba(9, 9, 121, 1) 0%, rgba(0, 212, 255, 1) 100%);
    --text-color: #8cdf78;
}

body {
    background-color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    margin: 0;
    transition: .2s ease-in-out;
}

.body-collapsed {
    margin-left: var(--width-collapsed);
}

.body-expanded {
    margin-left: var(--width);
}

#main-container {
    color: rgb(255, 255, 255);
}

/* 
        MENU
*/
#sidemenu {
    background-color: var(--bgcolor);
    color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    transition: width .2s ease-in-out;
}

#sidemenu a {
    color: white;
    text-decoration: none;
}
.links{
    color: white;
    text-decoration: none;
}
.links:hover {
    color: inherit; /* Mantiene el color original al pasar el mouse */
}
/*
        HEADER
*/
#sidemenu #header {
    box-sizing: border-box;
    max-height: 50px;
    overflow: hidden;
}

#sidemenu #header #title {
    box-sizing: border-box;
    overflow: hidden;
    font-size: .9rem;
    font-weight: 800;
}

#sidemenu #header #title,
#sidemenu #header #menu-btn {
    vertical-align: middle;
}

#sidemenu #header #menu-btn {
    display: inline-block;
}

#sidemenu #header #menu-btn {
    cursor: pointer;
    padding: 10px;
    width: var(--width-collapsed);
    box-sizing: border-box;
}

#sidemenu #header #menu-btn:hover {
    background-color: var(--hovercolor);
}

#sidemenu #header #menu-btn .btn-hamburger {
    background-color: #fff;
    width: 100%;
    height: 2px;
    margin: 5px 0;
}

/* 
        PROFILE
*/

#sidemenu #profile {
    padding: var(--padding) 0;
    text-align: center;
}

#sidemenu #profile #photo {
    box-sizing: border-box;

    margin: 0 auto;
}

#sidemenu #profile #photo img {
    border-radius: 70%;
    width: 50%;
}

/*
        ITEMS
*/
#sidemenu #menu-items {
    padding-top: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#sidemenu #menu-items .item {
    display: block;
    transition: .5s;
    width: calc(var(--width) + 30px);
    margin-top: 8px;
}

#sidemenu #menu-items .item .icon {
    display: inline-block;
    box-sizing: border-box;
    padding: var(--padding);
}

#sidemenu #menu-items .item .icon>* {
    width: 100%;
}

#sidemenu #menu-items .item .title {
    padding: var(--padding) 0;
}

#sidemenu #menu-items .item .icon,
#sidemenu #menu-items .item .title {
    font-size: 1rem;
    font-weight: bold;
    vertical-align: middle;
    overflow: hidden;
    display: inline-block;
}

#sidemenu #menu-items .down {
    margin-top: auto;
}

/*
        MENU EXPANDED
*/
.menu-expanded {
    width: var(--width);
}

.menu-expanded #header #title {
    display: inline-block;
    overflow: hidden;
    width: 199px;
    margin-right: -5px;
    padding: var(--padding);
}

.menu-expanded #header #title span {
    min-width: 30px;
    overflow: hidden;
}

.menu-expanded #profile #photo {
    width: 200px;
}

.menu-expanded #profile #name {
    width: 100%;
}

.menu-expanded #menu-items {
    height: 80%;
}

.menu-expanded #menu-items .item:hover {
    margin-left: 15px;
    border-radius: 50px;
    border: 2px solid white;
}

.active-item {
    margin-left: 15px;
    border-radius: 50px;
    border: 2px solid white;
    color: none;
    background-color: white;
}

.active-item .title {
    color: var(--bgcolor-clare)
}

.active-item .icon {
    color: var(--bgcolor-clare);
}

.menu-expanded #menu-items .item .icon {
    margin-left: 15px;
    width: 50px;
}

/* 
        MENU COLLAPSED
*/

.menu-collapsed {
    width: var(--width-collapsed);

}

.menu-collapsed #header #title {
    display: none;
}

.menu-collapsed #profile #photo {
    width: 100%;
}

.menu-collapsed #profile #name {
    display: none;
}

.menu-collapsed #menu-items {
    height: 85%;
}

.menu-collapsed #menu-items .item:hover {
    margin-left: 5px;
    border-radius: 50px;
    border: 2px solid white;
}

.menu-collapsed .active-item {
    margin-left: 8px;
}

.menu-collapsed #menu-items .item .icon {
    margin-left: 5px;
    width: 40px;
}

.header .header_items .right {
    position: absolute;
    right: 30px;
    font-size: 2rem;
}


/* 
        GENERALES ADMIN
*/

#container-admin #main {
    width: 100%;
}

/* Select */
#container-admin #select .card-body {
    flex-direction: row;
}

#container-admin #select .card-body ul {
    padding: 0;
}

#container-admin #select .card-body a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-color);
}

#container-admin #select .card-body a img {
    width: 50%;
}

#container-admin #select .card-body a span {
    font-weight: 500;
    font-size: 1.5rem;
}

/* Container */
#container-admin {
    min-height: 75vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Card */
#container-admin .card {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    transition: .5s ease;
}

#container-admin .card .card-header {
    text-align: initial;
    justify-content: center;
}

#container-admin .card .card-body {
    margin: 10px 0;
}

/* SEARCH */

#container-admin .card-search {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* Grupo */
#container-admin .input-box.search {
    border: 2px solid var(--bgcolor-clare);
    width: 30%;
}

/* Input */
#container-admin .input-box.search input {
    margin-left: 50px;
    width: 80%;
}

/* Icono campo formulario */
#container-admin .input-box.search .icon {
    position: absolute;
    left: 11px;
    bottom: 11px;
    width: 25px;
    opacity: .5;
    color: var(--bgcolor-clare);
}

#container-admin .alert {
    margin: 20px 0 0 0;
}

/* SECCION BOTONES */
#container-admin .card-table-buttons {
    visibility: hidden;
    transition: .3s linear;
}

#container-admin .card-table-buttons.active {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    margin: 20px 0;
    visibility: visible;
    transition: .3s ease;
}

#container-admin .card-table-buttons>* {
    margin-right: 15px;
}

.btn-delete {
    width: 45px;
}


.btn-actions {
    width: 25px;
    padding: 2px;
}

.icon-dropdown-item {
    width: 15px;
    position: absolute;
    right: 12px;
    margin: 4px 0 0 0;
}

/* ESTILOS TABLA */
.card-table {
    
    overflow-x: auto;
    overflow-y: auto;
    justify-content: normal;
    align-items: normal;
}

.table {
    width: auto;
    white-space: nowrap;
}

/* Bordes tabla */
tr td,
th {
    border-top-right-radius: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

th:first-child {
    border-top-left-radius: 10px;
}

th:last-child {
    border-top-right-radius: 10px;
}

tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

/* Filas tabla */
.table tbody tr:hover {
    background-color: var(--hovercolorclare);
}

/* ------------------------------------------------------------------ */

/* LOGIN */

#login .card {
    width: 100%;
    margin: 0;
}

#login .card .card-body {
    padding: 0;
    flex-direction: row;
    margin: 60px 0;
}

#login .card .card-body .card-image {
    margin-right: 10px;
    width: 60%;
}

#login .card .card-body .card-image img {
    width: 100%;
}

#login .card .card-body .card-form {
    margin: 0 auto;
    width: 30%;
}

#login .card .card-body .card-form .card-header {
    display: block;
}

#login .card .card-body .card-form .card-header .card-title {
    font-size: 2.5rem;
}

#login .login-register {
    position: absolute;
    right: 30px;
    color: var(--text-color);
}

#login .login-register:hover {
    color: var(--bgcolor);
}


/*
        ADMIN PANEL | HOME
*/

#container-admin.adminpanel {
    text-align: center;
}

#container-admin.adminpanel .title {
    font-family: 'ZurichBlack';
    font-size: 4rem;
    color: var(--bgcolor);
    font-style: italic;
}


/*
    ADMIN PANEL | USERS 
*/

/* Boton registrar */
#container-admin .add {
    position: absolute;
    right: 30px;
}

/* Intercambio de vista */

/* Vista tabla */
#container-admin.users #main {
    transition: .5s ease;
}

#container-admin.users.select #main {
    transition: none;
    transform: translateX(-120%);
}

/* Vista select */
#container-admin.users #select {
    position: absolute;
    transition: none;
    transform: translateX(300%);
}

#container-admin.users.select #select {
    transition: .5s ease;
    transform: translateX(0);
    width: 100%;
}

#container-admin.users.select .card {
    min-height: 10px;
    place-content: center;
}

#container-admin.users.select .card .card-body {
    justify-content: center;
}

/* Vista formulario */
#container-admin.users.form form {
    width: 70%;
}


/*
    ACERCA DE
*/
.about {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.about .about-button {
    margin: 20px;
}

.about .about-button .about-btn {
    background-color: var(--bgcolor);
    border-color: var(--bgcolor);
}

.about .about-button .about-btn:hover {
    background-color: var(--hovercolor);
    border-color: var(--hovercolor);
}

.about .about-button .about-title,
.about .about-button .about-icon {
    font-size: 1rem;
    font-weight: bold;
    vertical-align: middle;
    overflow: hidden;
    display: inline-block;
    margin-left: 5px;
}


/*=============================================================================================================*/
/*===============================================  MEDIA QUERIES  =============================================*/

/*Totem y pc*/
@media (max-width: 1200px) and (max-height: 1920px) {
    main {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* GENERALES */

    /* Card de registro */
    #ingreso.register .card {
        width: 80%;
    }

    /* Keyboard */
    .keyboard {
        max-height: 500px;
    }


    /*
        INDEX
    */

    /* CARD SCAN */
    #ingreso.scan .card {
        width: 45%;
    }

    /* CONSULTA USUARIO */

    /* Card body */
    #ingreso.consulta .card .card-body {
        flex-direction: column;
        align-items: center;
    }

    /* Imagen */
    #ingreso.consulta .card .card-body .card-image {
        margin: 20px 0 40px 0;
    }

    #ingreso.consulta .card .card-body .card-image img {
        width: 450px;
        height: 500px;
    }

    /* Boton tomar foto */
    #ingreso.consulta #user-picture-btn {
        width: 10%;
    }

}

/* Portatil */
@media (max-width: 992px) {

    /*
        INDEX
    */

    /* CARD SCAN */
    #ingreso.scan .card {
        width: 60%;
    }
}

/* Tablet */
@media (max-width: 768px) {

    /*
        INDEX
    */

    /* CARD SCAN */
    #ingreso.scan .card {
        width: 75%;
    }
}

/* Celular */
@media (max-width: 576px) {

    /*
        INDEX
    */

    /* CARD SCAN */
    #ingreso.scan .card {
        width: 70%;
        padding: 30px 10px;
    }

    #ingreso.scan .card .card-header .card-title {
        font-size: 1.3rem;
    }

    #ingreso.scan .card .card-body {
        margin: 0 0 20px 0;
    }

    #ingreso.scan .card .card-code {
        height: 130px;
        width: 90%;
    }

    #ingreso.scan .card .card-barra {
        width: 95%;
    }

    @keyframes barra {
        0% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(135px);

        }

        100% {
            transform: translateY(0);

        }
    }

}

@media (max-width: 400px){

    /*
        INDEX
    */

    /* CARD SCAN */
    #ingreso.scan .card {
        width: 100%;
        padding: 30px 10px;
    }
}

/* ============ CUSTOM RESPONSIVE FIXES FOR MOBILES AND TABLETS ============ */
@media (max-width: 768px) {
    .card {
        width: 95% !important;
        padding: 20px 15px !important;
    }

    .card .card-header .card-title {
        font-size: 1.5rem !important;
        text-align: center;
    }

    .card .card-body form,
    .card .card-body .form-group {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .form-group .col, .form-group .col-10 {
        width: 100% !important;
        margin-bottom: 15px;
    }

    .form-submit .form-btn,
    .card-footer .btn {
        width: 100% !important;
    }

    .card-image img {
        width: 100% !important;
        height: auto !important;
    }

    .select-form .select-btn,
    .select-form .list-items .item {
        font-size: 1rem !important;
    }

    #camaraModal #user-cam,
    #camaraModal #user-picture {
        width: 100% !important;
        border-radius: 30px !important;
    }

    #login .card .card-body {
        flex-direction: column !important;
    }

    #login .card .card-body .card-image,
    #login .card .card-body .card-form {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .back-button {
        left: 20px !important;
    }

    .card .card-header .card-title {
        font-size: 1.2rem !important;
    }

    .smallCamera {
        width: 20% !important;
    }

    .form-group label {
        font-size: 0.9rem !important;
    }
}


/* ============ FIXES PARA ERRORES VISUALES EN CELULARES ============ */
@media (max-width: 576px) {
    .card-footer .row {
        flex-direction: column !important;
        gap: 10px;
    }

    .card-footer .btn {
        width: 100% !important;
        font-size: 1rem !important;
        padding: 10px !important;
    }

    .form-control {
        font-size: 1rem !important;
        padding: 10px !important;
    }

    label {
        font-size: 1rem !important;
    }

    .btn-green, .btn-danger, .btn-primary {
        font-size: 1rem !important;
        padding: 12px 0 !important;
        min-width: 100px;
        width: 100%;
    }

    .smallCamera svg {
        width: 50px !important;
        height: auto !important;
    }

    .select-form .select-btn {
        flex-wrap: wrap !important;
        justify-content: center;
    }

    .select-form .list-items {
        font-size: 1rem;
    }

    #extrasContainer {
        padding-bottom: 20px;
    }

    input[type="file"] {
        width: 100% !important;
    }

    .form-group .btn-green {
        display: block;
        margin-top: 10px;
    }

    .card-title {
        text-align: center;
        font-size: 1.4rem !important;
    }
}


/* ============ FIX: botones flotantes y selects mal alineados ============ */
@media (max-width: 576px) {
    .card-header-element {
        display: flex;
        flex-wrap: wrap;
        justify-content: center !important;
        gap: 10px;
        margin-top: 10px;
    }

    .card-header-element a.btn {
        padding: 8px 12px;
        width: auto !important;
    }

    .select-form.vehicle,
    .select-form.device {
        width: 100% !important;
        margin-top: 10px;
    }

    .select-form .select-btn {
        width: 100% !important;
        padding: 10px 15px;
    }

    .select-form .list-items {
        width: 100% !important;
    }

    .card-info .row {
        flex-direction: column !important;
    }

    .card-info .col {
        width: 100% !important;
    }
}


/* ============ FIX: botón de cámara en sección 'Extras' demasiado grande ============ */
@media (max-width: 576px) {
    #extrasContainer .btn-green svg {
        width: 40px !important;
        height: 40px !important;
    }

    #extrasContainer .btn-green {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 60px !important;
        height: 60px !important;
        padding: 0 !important;
        margin-top: 10px;
        border-radius: 12px !important;
    }
}


/* ============ UNIFICACIÓN Y PREVENCIÓN DE ERRORES PARA TODOS LOS BOTONES DE CÁMARA ============ */
@media (max-width: 768px) {
    .btn-green svg,
    .btn svg,
    .smallCamera svg {
        width: 36px !important;
        height: 36px !important;
    }

    .btn-green,
    .btn.btn-green,
    .btn.btn-primary,
    .btn.btn-danger {
        padding: 8px 12px !important;
        font-size: 1rem !important;
        min-width: 90px;
        text-align: center;
    }

    #user-picture-btn {
        width: auto !important;
        max-width: 100%;
        display: inline-flex;
        justify-content: center;
        align-items: center;
    }

    .card-image .btn-green {
        width: 60px !important;
        height: 60px !important;
        padding: 0 !important;
        border-radius: 14px !important;
        margin: 10px auto 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .card-image .btn-green svg {
        width: 36px !important;
        height: 36px !important;
    }
}


/* ============ RESPONSIVE UNIVERSAL (mobile-first hasta escritorio grande) ============ */

/* Móviles (pantallas pequeñas) */
@media (max-width: 480px) {
    .card {
        width: 95% !important;
    }

    .card-header-element {
        flex-wrap: wrap;
        justify-content: center !important;
        gap: 10px;
    }

    .card-header-element a.btn {
        padding: 6px 10px !important;
        font-size: 0.9rem !important;
    }

    .select-form.vehicle,
    .select-form.device {
        width: 100% !important;
        margin-top: 10px;
    }

    .select-form .select-btn {
        width: 100% !important;
        font-size: 1rem;
    }

    .select-form .list-items {
        font-size: 0.9rem;
    }

    .card-footer .btn {
        width: 100%;
    }

    .form-control {
        font-size: 1rem !important;
    }
}

/* Tablets */
@media (min-width: 481px) and (max-width: 991px) {
    .card {
        width: 90% !important;
    }

    .card-header-element {
        justify-content: flex-end !important;
        gap: 8px;
    }

    .card-footer .btn {
        min-width: 130px;
        font-size: 1rem;
    }
}

/* Escritorio (ancho medio) */
@media (min-width: 992px) and (max-width: 1199px) {
    .card {
        width: 80% !important;
    }

    .select-form .select-btn {
        font-size: 1.1rem;
    }
}

/* Escritorio grande */
@media (min-width: 1200px) {
    .card {
        width: 60% !important;
    }

    .card-header-element {
        justify-content: flex-end;
    }

    .card-footer .btn {
        padding: 10px 20px;
    }
}


/* ============ FIX FINAL: prevenir desbordes horizontales ============ */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

.card,
section.card,
article#ingreso {
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.card-header-element {
    flex-wrap: wrap;
    justify-content: center !important;
}

@media (max-width: 576px) {
    .card-header-element a.btn {
        max-width: 48% !important;
    }

    .card-body,
    .card-footer,
    .card-header {
        overflow-x: hidden !important;
    }
}


/* ============ FIX FINAL BOTONES FLOTANTES VISIBLES EN MOVILES ============ */
@media (max-width: 576px) {
    .card-header-element {
        overflow: visible !important;
        position: relative;
        z-index: 10;
    }

    .card-header-element a.btn {
        width: 45px !important;
        height: 45px !important;
        display: inline-flex !important;
        justify-content: center;
        align-items: center;
        padding: 0 !important;
        border-radius: 12px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.2);
        background-color: white;
    }

    .card-header-element a.btn svg {
        width: 28px !important;
        height: 28px !important;
        color: #28a745;
    }
}


/* ============ FIX POSICIÓN Y VISIBILIDAD DE BOTONES FLOTANTES PARA ≤470px ============ */
@media (max-width: 470px) {
    .card-header-element {
        position: absolute !important;
        top: 10px;
        right: 10px;
        z-index: 50;
        background: transparent !important;
    }

    .card-header {
        position: relative;
        overflow: visible !important;
    }

    .card-header-element a.btn {
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        margin-bottom: 6px;
        border-radius: 10px !important;
    }

    .card-header-element a.btn svg {
        width: 22px !important;
        height: 22px !important;
    }
}


/* ============ FIX: que los botones flotantes no oculten el nombre ============ */
@media (max-width: 470px) {
    .card-header {
        padding-top: 60px !important; /* Empuja hacia abajo el contenido como el nombre */
    }

    .card-title {
        text-align: center;
        font-size: 1.3rem !important;
    }

    .card-header-element {
        top: 10px;
        right: 10px;
        position: absolute !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 10px;
        background: none;
    }
}


/* ============ FIX: textos de roles demasiado pegados o grandes en móvil ============ */
@media (max-width: 576px) {
    .register-select .row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .register-select .col {
        flex: 0 0 30%;
        max-width: 30%;
        text-align: center;
    }

    .register-select .col span {
        display: block;
        font-size: 0.85rem;
        margin-top: 5px;
        word-wrap: break-word;
    }

    .register-select .col img {
        width: 100%;
        max-width: 60px;
        height: auto;
    }
}


/* ============ FIX FINAL: desbordamiento de nombres de rol debajo de los íconos ============ */
@media (max-width: 576px) {
    .register-select .col {
        flex: 0 0 30% !important;
        max-width: 30% !important;
        text-align: center;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal !important;
    }

    .register-select .col span {
        display: block;
        font-size: 0.8rem !important;
        margin-top: 5px;
        line-height: 1.1;
        max-width: 100%;
        word-break: break-word;
    }

    .register-select .col img {
        max-width: 50px !important;
        height: auto !important;
        margin: 0 auto;
        display: block;
    }
}


/* ============ FIX AJUSTADO: nombres de rol con tamaño legible y sin romper palabras ============ */
@media (max-width: 576px) {
    .register-select .col {
        flex: 0 0 33.33% !important;
        max-width: 33.33% !important;
        min-width: 80px;
        text-align: center;
    }

    .register-select .col span {
        font-size: 0.95rem !important;
        margin-top: 6px;
        line-height: 1.2;
        white-space: nowrap !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .register-select .col img {
        max-width: 60px !important;
        margin: 0 auto;
        display: block;
    }
}
/* Contenedor de tabla con scroll vertical */
.table-responsive {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
    display: block;
    width: 100%;
}

/* Sticky para encabezado */
.table thead th {
    position: sticky;
    top: 0;
    background-color: white; /* Necesario para evitar transparencia al hacer sticky */
    z-index: 2;
}

/* Estilos generales para tabla */
.table {
    width: 100% !important;
    table-layout: auto;
    border-collapse: collapse;
    white-space: nowrap;
}

/* Estilo de celdas */
.table th,
.table td {
    padding: 12px 16px;
    vertical-align: middle;
    white-space: nowrap;
}

/* Hover visible */
.table tbody tr:hover {
    background-color: #f1f1f1;
    transition: background-color 0.2s ease-in-out;
}

/* Centrado y altura normal para pantallas grandes */
#login {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    box-sizing: border-box;
}
 

/* LOGIN AJUSTES  */

/* Tarjeta principal */
#login .card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    width: 100%;
    max-height: none; 
    overflow: visible;
    margin: 40px 0; 
    border-radius: 12px;
    background-color: white;
}

/* Cuerpo: imagen y formulario */
#login .card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

/* Imagen */
#login .card-image {
    flex: 1;
    max-width: 50%;
    padding-right: 20px;
}

#login .card-image img {
    width: 100%;
    height: auto;
}

/* Formulario */
#login .card-form {
    flex: 1;
    max-width: 50%;
    padding-left: 20px;
}

/* Botón de volver */
.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

/* RESPONSIVE: ajustes para pantallas pequeñas */
@media (max-width: 768px) {
    #login {
        align-items: flex-start; /* Ya no centramos verticalmente */
        padding-top: 40px;
        padding-bottom: 40px;
        overflow-y: auto;
    }

    #login .card {
        padding: 20px 15px;
        margin: 0;
    }

    #login .card-body {
        flex-direction: column;
        align-items: center;
    }

    #login .card-image,
    #login .card-form {
        max-width: 100%;
        padding: 0;
    }

    .back-button {
        position: relative;
        margin-bottom: 10px;
        top: 0;
        left: 0;
    }
}
/*ESTILOS PARA EXTRA*/
#extra-btn {
    width: 60px;
    height: 60px;
    padding: 0;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

#extra-btn svg {
    width: 36px;
    height: 36px;
}

@media (max-width: 576px) {
    #extra-btn {
        width: 50px;
        height: 50px;
        border-radius: 10px;
    }

    #extra-btn svg {
        width: 28px;
        height: 28px;
    }
}
.extra-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.descripcion-extra {
    flex: 1;
}

.descripcion-extra textarea {
    min-height: 120px;
    resize: vertical;
}

.btn-extra-foto {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#extra-btn {
    width: 60px;
    height: 60px;
    padding: 0;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5px;
}

#extra-btn svg {
    width: 36px;
    height: 36px;
}

@media (max-width: 768px) {
    .extra-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-extra-foto {
        align-items: flex-start;
    }

    #extra-btn {
        width: 50px;
        height: 50px;
    }

    #extra-btn svg {
        width: 28px;
        height: 28px;
    }
}
.extras-toggle-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.extras-label {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
}

.btn-extras-toggle {
    background-color: white;
    color: var(--bgcolor);
    border: 2px solid var(--bgcolor);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease-in-out;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-extras-toggle:hover {
    background-color: var(--bgcolor);
    color: white;
}


/*Estilos tarjetas extra*/
.shadow-sm:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}
.extra-card {
    padding: 15px;
    align-items: flex-start;
    min-height: 100px;
    gap: 12px;
    position: relative;
    transition: box-shadow 0.3s ease;
}

.extra-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Estilo checkbox */
.extra-check {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    accent-color: var(--bgcolor); /* hace que el check sea verde moderno */
    cursor: pointer;
    flex-shrink: 0;
}

/* En caso que accent-color no se aplique, fallback visual */
.extra-check:checked {
    background-color: var(--bgcolor);
    border-color: var(--bgcolor);
}

/* Para evitar que el texto se pegue al borde */
.extra-info {
    word-break: break-word;
    white-space: normal;
    flex: 1;
}

/* === CAMARA MODAL EXTRAS === */
#camaraModalExtra .modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 15px;
}

#camaraModalExtra video,
#camaraModalExtra canvas {
  width: 70%;
  max-width: 500px;
  border-radius: 20px;
  margin-top: 20px;
}

#camaraModalExtra canvas {
  display: none;
}

#camaraModalExtra .btn-zone {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

#camaraModalExtra .btn-picture {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  font-size: 1.5rem;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 576px) {
  #camaraModalExtra video,
  #camaraModalExtra canvas {
    width: 90%;
    border-radius: 12px;
  }

  #camaraModalExtra .btn-picture {
    width: 60px;
    height: 60px;
    font-size: 1.2rem;
  }
}

