* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #00111f, #003b66, #3979aa);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.auth-card {
    width: 100%;
    max-width: 950px;
    min-height: 540px;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
    animation: fadeIn .6s ease;
}

.auth-left {
    padding: 58px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-title {
    text-align: center;
    color: #06395b;
    font-size: 38px;
    font-weight: 800;
    margin: 0 0 8px;
}

.auth-subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 16px;
    margin: 0 0 34px;
}

/* MENSAJE DE ERROR */
.login-role-error {
    width: 100%;
    margin: 0 0 22px;
    padding: 13px 16px;
    border-radius: 14px;
    background: #fff3f3;
    color: #d71920;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.login-role-error i {
    font-size: 18px;
    color: #d71920;
    flex-shrink: 0;
}

.login-status {
    width: 100%;
    margin: 0 0 22px;
    padding: 13px 16px;
    border-radius: 14px;
    background: #ecfdf5;
    color: #047857;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

/* INPUTS */
.auth-field {
    position: relative;
    margin-bottom: 18px;
}

.auth-field label {
    display: none;
}

.auth-field input {
    width: 100%;
    height: 58px;
    border: 1px solid #c5cbd3;
    border-radius: 10px;
    padding: 0 18px;
    font-size: 16px;
    color: #1f2937;
    background: #fff;
    outline: none;
    transition: all .25s ease;
}

.auth-field input::placeholder {
    color: #6b7280;
}

.auth-field input:focus {
    border-color: #0b67a8;
    box-shadow: 0 0 0 3px rgba(11, 103, 168, .15);
}

/* ICONOS */
.auth-field-icon > i {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 25px;
    color: #1f5f86;
    z-index: 10;
    pointer-events: none;
}

.auth-field-icon input {
    padding-left: 72px !important;
    padding-right: 62px !important;
}

/* BOTÓN OJO PASSWORD */
.show-password-btn {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #1f5f86;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    line-height: 1;
}

.show-password-btn:hover {
    color: #0b67a8;
}

/* OLVIDASTE CONTRASEÑA */
.forgot-box {
    display: flex;
    justify-content: center;
    margin-top: 12px;
    margin-bottom: 32px;
}

.forgot-link {
    color: #0067ad;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* BOTÓN */
.auth-button {
    width: 100%;
    height: 58px;
    background: #0067ad !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 19px;
    font-weight: 700;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
    transition: .25s ease;
    cursor: pointer;
}

.auth-button:hover {
    background: #00548f !important;
    transform: translateY(-2px);
}

.auth-button:disabled {
    opacity: .85;
    cursor: not-allowed;
    transform: none;
}

/* LOADER */
.login-loader {
    display: none;
    width: 27px;
    height: 27px;
    border: 3px solid rgba(255, 255, 255, .45);
    border-top-color: #a855f7;
    border-radius: 50%;
    animation: loginSpin .8s linear infinite;
}

/* PANEL DERECHO */
.auth-right {
    background: linear-gradient(to bottom right, #03233b 0%, #3979aa 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-right::before {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.10);
    animation: rotate 18s linear infinite;
}

.auth-right::after {
    content: '';
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,.08);
    animation: rotateReverse 28s linear infinite;
}

.logo-granja {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-granja img {
    width: 100%;
    max-width: 430px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .45));
    animation: floatLogo 4s ease-in-out infinite;
}

.circuit-lines {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    pointer-events: none;
}

.circuit-lines img {
    width: 100%;
    display: block;
    opacity: .95;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .auth-card {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .auth-right {
        display: none;
    }

    .auth-left {
        padding: 45px 30px;
    }
}

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

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

@keyframes floatLogo {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateReverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

@keyframes loginSpin {
    to {
        transform: rotate(360deg);
    }
}