@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
    --ceu-blue: #005aad;
    --ceu-blue-dark: #003570;
    --ceu-navy: #003570;
    --ceu-navy-soft: #003570;
    --ceu-ink: #0f172a;
    --ceu-gray: #475569;
    --ceu-border: #cbd5e1;
    --ceu-bg: #f2f6fb;
    --cayena-cyan: #40e0d0;
    --ticket-paper: #fdfbf3;
    --font-display: 'Manrope', 'Segoe UI', Arial, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Consolas', 'Courier New', monospace;
}

* {
    box-sizing: border-box;
}

.auth-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    background: #ffffff;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* Columna Izquierda: Ahora todo centrado para un diseño balanceado */
.auth-side {
    flex: 1 1 46%;
    max-width: 560px;
    background: linear-gradient(160deg, #005aad 0%, #003570 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    /* Centra todos los elementos horizontalmente */
    text-align: center;
    /* Asegura que los textos fluyan desde el centro */
    padding: 50px 48px 40px;
    box-sizing: border-box;
    color: #fff;
    position: relative;
}

/* Badge del Logo CEU */
.auth-logo-badge {
    width: auto;
    max-width: 210px;
    height: 68px;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    padding: 10px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    position: relative;
    z-index: 1;
}

.auth-logo-badge .logo-img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* Titular e Identidad de la Marca Cayena */
.system-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centrado */
    text-align: center;
    /* Centrado */
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
}

.system-brand h1 {
    font-family: var(--font-display);
    font-size: 2.15rem;
    font-weight: 800;
    line-height: 1.08;
    margin: 0 0 10px;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.system-brand h1 span {
    color: var(--cayena-cyan);
    font-weight: 500;
}

.system-brand p {
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.5;
    margin: 0;
    max-width: 320px;
    text-align: center;
    /* Centrado */
}

/* Ticket Centrado y Balanceado */
.ticket-visual-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 270px;
    background: var(--ticket-paper);
    border-radius: 4px;
    padding: 22px 20px 18px;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.25);
    text-align: center;
    align-self: center;
    /* Se mantiene en el centro, pero ahora armoniza con el resto */
    margin: 20px 0;
    transform: rotate(-2deg);
    color: var(--ceu-ink);
}

.ticket-visual-card::before,
.ticket-visual-card::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    height: 12px;
    background-image: radial-gradient(circle at 10px 50%, var(--ceu-blue-dark) 6px, transparent 6.5px);
    background-size: 20px 12px;
    background-repeat: repeat-x;
}

.ticket-visual-card::before {
    top: -6px;
}

.ticket-visual-card::after {
    bottom: -6px;
    transform: rotate(180deg);
}

.ticket-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--ceu-gray);
    text-transform: uppercase;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--ceu-border);
}

.status-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #005aad;
    box-shadow: 0 0 6px rgba(0, 90, 173, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }

    100% {
        opacity: 0.5;
        transform: scale(0.9);
    }
}

.ticket-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.ticket-code {
    font-size: 2.1rem;
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: 0.03em;
    color: var(--ceu-ink);
}

.ticket-dest {
    font-size: 0.78rem;
    color: var(--ceu-gray);
    font-weight: 500;
}

/* Sello del Holding en la base */
.holding-signature {
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.75);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centrado */
    text-align: center;
    /* Centrado */
    gap: 3px;
    width: 100%;
    max-width: 250px;
    /* Acorta la línea superior para que parezca un divisor limpio */
    margin: 0 auto;
}

.holding-signature strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Columna Derecha / Formulario */
.auth-main {
    flex: 1 1 54%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
}

.auth-form-box {
    width: 100%;
    max-width: 340px;
}

.auth-form-box h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ceu-ink);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.auth-form-box .auth-subtitle {
    font-size: 0.9rem;
    color: var(--ceu-gray);
    margin: 0 0 34px;
}

.auth-form-box .form-group {
    margin-bottom: 24px;
}

.auth-form-box .form-group label {
    display: block;
    font-size: 12px;
    color: #334155;
    font-weight: 700;
    margin-bottom: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Inputs de línea sin fondo del navegador */
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1.5px solid var(--ceu-border);
    padding-bottom: 8px;
    background: transparent;
    transition: all 0.2s ease;
}

.input-wrap .input-icon {
    position: static;
    width: 16px;
    height: 16px;
    color: #64748b;
    pointer-events: none;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.input-wrap:focus-within {
    border-bottom-color: var(--ceu-blue);
    border-bottom-width: 2px;
}

.input-wrap:focus-within .input-icon {
    color: var(--ceu-blue);
}

.auth-form-box .form-control {
    width: 100%;
    padding: 4px 0;
    font-size: 15px;
    font-family: 'Segoe UI', Arial, sans-serif;
    border: none;
    border-radius: 0;
    background: transparent !important;
    color: var(--ceu-ink);
    outline: none;
    box-shadow: none;
}

/* Anula la caja de color amarillo/gris cuando el navegador autocompleta campos */
.auth-form-box .form-control:-webkit-autofill,
.auth-form-box .form-control:-webkit-autofill:hover,
.auth-form-box .form-control:-webkit-autofill:focus,
.auth-form-box .form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
    -webkit-text-fill-color: var(--ceu-ink) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.btn-auth {
    width: 100%;
    padding: 13px;
    margin-top: 14px;
    background: var(--ceu-blue);
    color: #fff;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 90, 173, 0.2);
}

.btn-auth svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.btn-auth:hover {
    background: var(--ceu-blue-dark);
    box-shadow: 0 6px 14px rgba(0, 53, 112, 0.3);
}

.btn-auth:hover svg {
    transform: translateX(3px);
}

.alert-danger {
    background: #fdecec;
    border: 1px solid #f5b8b8;
    color: #b42318;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.auth-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 12px;
    color: #64748b;
}

@media (max-width: 860px) {
    .auth-body {
        flex-direction: column;
    }

    .auth-side {
        max-width: none;
        padding: 40px 32px;
        flex: 0 0 auto;
    }

    .auth-main {
        padding: 32px;
    }
}