:root {
    --verde-sena: #39A900;
    --verde-oscuro: #2E7D32;
    --verde-claro: #E8F5E9;
    --verde-destaque: #43A047;
    --gris-oscuro: #37474F;
    --gris-medio: #78909C;
    --gris-claro: #ECEFF1;
    --blanco: #FFFFFF;
    --sombra-suave: 0 4px 20px rgba(0, 0, 0, 0.08);
    --sombra-focus: 0 0 0 4px rgba(57, 169, 0, 0.2);
    --degradado-verde: linear-gradient(135deg, var(--verde-sena), var(--verde-oscuro));
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--gris-claro);
    color: var(--gris-oscuro);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    background: linear-gradient(rgb(243, 243, 245), rgb(231, 231, 235));
}

.flecha {
    display: flex;
    justify-content: start;
    align-items: start;
    cursor: pointer;
}

.flecha img {
    transform: rotate(-90deg);
    padding: 10px;
    border-radius: 10px;
    background-color: white;
    width: 50px;
}

.main-content {
    display: flex;
    width: 100%;
    max-width: 1500px;
    gap: 10px;
    padding: 10px;
    opacity: 0;
    animation: fadeInSlide 0.8s ease-out forwards;
    animation-delay: 0.2s;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tabla {
    display: flex;
    gap: 10px;
    width: 100%;
    flex-direction: column;
}

.head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background-color: white;
    border-radius: 10px;
    padding: 30px 40px;
    height: 160px;
}

.logo {
    padding: 10px;
    background-color: var(--verde-sena);
    border-radius: 10px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.card-title img {
    width: 70px;
}

.card-title h1 {
    font-size: 2.2rem;
    color: var(--verde-sena);
    font-weight: 500;
}

.card-title p {
    font-size: 1.1rem;
    color: var(--gris-medio);
}


.time-display {
    display: flex;
    justify-content: end;
    align-items: end;
    flex-direction: column;
}

#full_hour {
    font-size: 3rem;
    font-weight: 500;
    color: var(--verde-sena);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.date-display {
    font-size: 1.1rem;
    color: var(--gris-medio);
}

.columna {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.content-card {
    background-color: white;
    border-radius: 10px;
    padding: 10px 30px;
    width: 100%;
    padding: 2.5rem;
}

.input-section {
    margin: 2rem 0;
}

.input-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gris-oscuro);
    margin-bottom: 0.8rem;
}

.input-field {
    width: 100%;
    padding: 20px 20px;
    font-size: 2rem;
    border: 2px solid var(--verde-sena);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--blanco);
    color: var(--gris-oscuro);
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(57, 169, 0, 0.1);
}

.input-field:focus {
    outline: none;
    border-color: var(--verde-oscuro);
    box-shadow: var(--sombra-focus);
    transform: translateY(-2px);
}

.input-field::placeholder {
    color: #BDBDBD;
    font-weight: 400;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 53%;
    transform: translateY(-50%);
    color: var(--verde-sena);
    font-size: 1.5rem;
}

.hint {
    font-size: 18px;
    font-family: Arial, Helvetica, sans-serif;
    color: #888;
    margin-top: 10px;
    text-align: right;
}

.action-section {
    margin: 2rem 0;
    border-radius: 12px;
    /* background: rgb(56, 106, 172); */
    transition: all 0.4s ease;
}

.action-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgb(0, 0, 0);
    display: block;
    margin-bottom: 0.3rem;
}

.action {
    width: 100%;
    background-color: rgb(240, 240, 240);
    height: 150px;
    border-radius: 10px;
    display: flex;
    padding: 20px;
    align-items: center;
    gap: 15px;
}

.action .icon {
    background-color: white;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    min-width: 100px;
    min-height: 100px;
}

.action .icon img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.action h3 {
    font-weight: 400;
    font-size: 24px;
}

.info-entrada {
    display: flex;
    flex-direction: column;
}

.content-card,
.user-info-card {
    height: auto;
    /* ❌ quita height fijo */
}

.entrada {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
}

.entrada {
    .action-label {
        color: rgb(255, 255, 255);
    }
}

.salida {
    background: linear-gradient(135deg, #4f67b6, #205191);
    color: white;
}

.salida {
    .action-label {
        color: rgb(255, 255, 255);
    }
}

.documento-no-registrado {
    background: linear-gradient(135deg, #E53935, #C62828);
    color: white;
}

.documento-no-registrado {
    .action-label {
        color: rgb(255, 255, 255);
    }
}

.documento-invalido {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.documento-invalido {
    .action-label {
        color: rgb(255, 255, 255);
    }
}

.error-servidor {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    color: white;
}

.error-servidor {
    .action-label {
        color: rgb(255, 255, 255);
    }
}

.user-info-card {
    background: var(--blanco);
    background-color: rgb(255, 255, 255);
    border-radius: 10px;
    padding: 20px;
    width: 100%;
    max-width: 500px;
}

.user-info-card .title {
    border-bottom: 1px solid #d7dbe0;
    display: flex;
    align-items: center;
    font-family: Arial, Helvetica, sans-serif;
    margin-bottom: 10px;
    padding-bottom: 10px;
    gap: 1px;
}

.user-info-card .title h3 {
    font-weight: 400;
    color: #6a727c;
    padding: 10px;
}

.user-info-card .title img {
    width: 20px;
    height: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    margin-top: 20px;
    background-color: rgb(248, 248, 248);
    border-radius: 10px;
    padding: 10px;
}


.info-item .icon-item {
    padding: 10px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.orange {
    background-color: rgb(240, 176, 57)
}

.green {
    background-color: rgb(55, 165, 55)
}

.blue {
    background-color: rgb(42, 130, 212)
}

.purple {
    background-color: rgb(189, 82, 189)
}


.info-item .icon-item {
    padding: 10px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.orange {
    background-color: rgb(240, 176, 57)
}

.green {
    background-color: rgb(55, 165, 55)
}

.blue {
    background-color: rgb(42, 130, 212)
}

.purple {
    background-color: rgb(189, 82, 189)
}

.info-label {
    font-weight: 500;
    color: #6e6e6e;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 17px;
    color: black;
    font-weight: 600;
}

#error_message {
    background: #FFEBEE;
    color: #C62828;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    text-align: center;
    font-weight: 500;
    border-left: 4px solid #C62828;
    display: none;
    animation: shake 0.5s ease;
}

.decoration {
    position: absolute;
    z-index: 1;
    opacity: 0.05;
}

.decoration-1 {
    top: 10%;
    left: 5%;
    font-size: 15rem;
    color: var(--verde-sena);
}

.decoration-2 {
    bottom: 10%;
    right: 5%;
    font-size: 12rem;
    color: var(--verde-sena);
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* Footer (mantenido como está) */
.footer {
    background-color: var(--blanco);
    color: var(--verde-sena);
    text-align: center;
    padding: 25px 20px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-footer {
    height: 60px;
    margin-bottom: 10px;
    object-fit: contain;
}

.footer p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

@media (max-width: 1024px) {

    body {
        align-items: flex-start;
    }

    .main-content {
        flex-direction: column;
    }

    .columna {
        flex-direction: column;
    }

    .head {
        flex-direction: column;
        gap: 15px;
        height: auto;
        text-align: center;
    }

    .time-display {
        align-items: center;
    }

    .card-title {
        flex-direction: column;
    }

    .card-title img {
        width: 60px;
    }

    .user-info-card {
        max-width: 100%;
    }
}

@media (max-width: 768px) {

    .flecha img {
        width: 40px;
    }

    .card-title h1 {
        font-size: 1.5rem;
    }

    .card-title p {
        font-size: 0.95rem;
    }

    #full_hour {
        font-size: 2.2rem;
    }

    .content-card {
        padding: 1.5rem;
    }

    .input-label {
        font-size: 1rem;
        text-align: center;
    }

    .input-field {
        font-size: 1.4rem;
        padding: 15px;
    }

    .hint {
        font-size: 14px;
        text-align: center;
    }

    .action {
        flex-direction: column;
        height: auto;
        text-align: center;
        padding: 15px;
    }

    .action .icon {
        min-width: 80px;
        min-height: 80px;
        padding: 10px;
    }

    .action .icon img {
        width: 60px;
        height: 60px;
    }

    .action h3 {
        font-size: 20px;
    }

    .info-item {
        flex-direction: row;
    }
}

@media (max-width: 480px) {

    .card-title h1 {
        font-size: 1.3rem;
    }

    #full_hour {
        font-size: 1.8rem;
    }

    .input-field {
        font-size: 1.2rem;
    }

    .info-label {
        font-size: 0.85rem;
    }

    .info-value {
        font-size: 0.95rem;
    }
}