/* ============================================================
    ARCHIVO: admin-login.css
    Página de Acceso Administrativo | UrgencLink
    Versión blanca con contraste azul y animaciones sutiles
    ============================================================ */

/* ============================================================
    SECCIÓN 1: FONDO Y CONTENEDOR PRINCIPAL
    ============================================================ */

.login-background {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background:
        radial-gradient(circle at top left, #16C2F5 0%, transparent 35%),
        radial-gradient(circle at bottom right, #0B5ED7 0%, transparent 30%),
        linear-gradient(135deg, #061224, #0B5ED7);
    position: relative;
    overflow: hidden;
}

/* ===== Decoración de fondo animada ===== */
.login-background::before {
    content: "";
    position: absolute;
    width: 650px;
    height: 650px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    top: -250px;
    left: -220px;
    pointer-events: none;
    animation: floatBg 20s ease-in-out infinite alternate;
}

.login-background::after {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(22, 194, 245, .06);
    bottom: -180px;
    right: -150px;
    pointer-events: none;
    animation: floatBg 25s ease-in-out infinite alternate-reverse;
}

/* ===== Animación de flotación del fondo ===== */
@keyframes floatBg {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(40px, 30px) scale(1.1);
    }
}

/* ============================================================
    SECCIÓN 1.1: PARTÍCULAS SUTILES DE FONDO
    ============================================================ */

.particles-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    animation: particleFloat 15s linear infinite;
}

/* ===== Posicionamiento y duración individual de cada partícula ===== */
.particle:nth-child(1) { left: 10%; animation-duration: 18s; animation-delay: 0s; }
.particle:nth-child(2) { left: 25%; animation-duration: 14s; animation-delay: 2s; width: 4px; height: 4px; }
.particle:nth-child(3) { left: 45%; animation-duration: 20s; animation-delay: 4s; }
.particle:nth-child(4) { left: 65%; animation-duration: 16s; animation-delay: 1s; width: 8px; height: 8px; }
.particle:nth-child(5) { left: 80%; animation-duration: 22s; animation-delay: 3s; }
.particle:nth-child(6) { left: 90%; animation-duration: 13s; animation-delay: 5s; width: 4px; height: 4px; }

/* ===== Animación de flotación de partículas ===== */
@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================================
    SECCIÓN 2: TARJETA DE LOGIN (BLANCA CON PERSONALIDAD)
    ============================================================ */

.login-card {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 30px;
    padding: 45px 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .25);
    position: relative;
    z-index: 2;
    animation: cardEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ===== Línea decorativa superior con gradiente animado ===== */
.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #0B5ED7, #16C2F5, #0B5ED7);
    background-size: 200% 100%;
    border-radius: 30px 30px 0 0;
    animation: gradientMove 4s ease-in-out infinite;
}

/* ===== Animación del gradiente en movimiento ===== */
@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ===== Sombra de la tarjeta al hacer hover ===== */
.login-card:hover {
    box-shadow: 0 35px 70px rgba(11, 94, 215, .20);
    transition: box-shadow 0.5s ease;
}

/* ===== Animación de entrada de la tarjeta ===== */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================================
    SECCIÓN 3: BOTÓN REGRESAR (MEJORADO)
    ============================================================ */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #64748B;
    font-size: .92rem;
    font-weight: 500;
    margin-bottom: 30px;
    padding: 8px 16px 8px 12px;
    border-radius: 50px;
    background: #F7FAFD;
    border: 1px solid #E4EDF6;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

/* ===== Fondo hover del botón ===== */
.back-link::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50px;
    background: linear-gradient(135deg, #0B5ED7, #16C2F5);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.back-link i {
    font-size: 14px;
    color: #0B5ED7;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.back-link span {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.back-link:hover {
    transform: translateX(-4px) scale(1.02);
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(11, 94, 215, .15);
}

.back-link:hover::before {
    opacity: 1;
}

.back-link:hover i {
    transform: translateX(-4px) rotate(-8deg);
    color: #ffffff;
}

.back-link:hover span {
    color: #ffffff;
}

.back-link:active {
    transform: scale(0.96);
}

/* ============================================================
    SECCIÓN 4: ENCABEZADO
    ============================================================ */

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

/* ===== Contenedor del logo con anillo pulsante ===== */
.login-header .logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.login-header .logo-wrapper::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: rgba(11, 94, 215, .06);
    animation: pulseRing 3s ease-in-out infinite;
}

/* ===== Animación del anillo pulsante ===== */
@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.15);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.login-header img {
    width: 90px;
    display: block;
    position: relative;
    z-index: 1;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.login-header img:hover {
    transform: scale(1.06) rotate(-3deg);
}

.login-header h1 {
    font-family: var(--font-sifon);
    font-size: 30px;
    color: #061224 !important;
    margin-bottom: 8px;
}

.login-header p {
    color: #64748B;
    font-size: .95rem;
    line-height: 1.6;
}

/* ============================================================
    SECCIÓN 5: FORMULARIO
    ============================================================ */

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    color: #061224;
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: #0B5ED7;
}

/* ===== Contenedor de input ===== */
.input-group {
    display: flex;
    align-items: center;
    background: #F7FAFD;
    border: 2px solid #E4EDF6;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.input-group i:first-child {
    width: 50px;
    text-align: center;
    color: #94A3B8;
    font-size: 18px;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.input-group input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: #061224;
    padding: 18px 15px;
    font-size: 16px;
    font-family: inherit;
    min-width: 0;
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: #94A3B8;
}

.input-group:focus-within {
    border-color: #0B5ED7;
    box-shadow: 0 0 0 4px rgba(11, 94, 215, .10);
    transform: translateY(-2px);
}

.input-group:focus-within i:first-child {
    color: #0B5ED7;
}

/* ===== Botón mostrar/ocultar contraseña ===== */
.toggle-password {
    width: 50px;
    height: 100%;
    border: none;
    background: transparent;
    color: #94A3B8;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    padding: 0;
}

.toggle-password:hover {
    color: #0B5ED7;
    transform: scale(1.1);
}

/* ============================================================
    SECCIÓN 6: OPCIONES DE LOGIN
    ============================================================ */

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 28px;
    flex-wrap: wrap;
    gap: 12px;
}

/* ===== Checkbox "Recordarme" ===== */
.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: .92rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.remember-me:hover {
    color: #0B5ED7;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0B5ED7;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.remember-me input[type="checkbox"]:hover {
    transform: scale(1.15);
}

/* ===== Enlace "Olvidaste tu contraseña" ===== */
.forgot-password {
    color: #0B5ED7;
    text-decoration: none;
    font-size: .92rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

/* ===== Subrayado animado ===== */
.forgot-password::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0B5ED7, #16C2F5);
    transition: width 0.3s ease;
}

.forgot-password:hover {
    color: #16C2F5;
}

.forgot-password:hover::after {
    width: 100%;
}

/* ============================================================
    SECCIÓN 7: MENSAJE DE LOGIN
    ============================================================ */

.login-message {
    display: none;
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: .92rem;
    font-weight: 500;
    text-align: center;
    animation: messageSlide 0.4s ease both;
}

/* ===== Animación de entrada del mensaje ===== */
@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== Mensaje de error ===== */
.login-message.error {
    display: block;
    background: #FEE2E2;
    color: #B91C1C;
    border: 1px solid #FCA5A5;
}

/* ===== Mensaje de éxito ===== */
.login-message.success {
    display: block;
    background: #DCFCE7;
    color: #15803D;
    border: 1px solid #86EFAC;
}

/* ============================================================
    SECCIÓN 8: BOTÓN DE LOGIN (CON EFECTO)
    ============================================================ */

.btn-login {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    background: linear-gradient(135deg, #0B5ED7, #16C2F5);
    background-size: 200% 200%;
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 18px 40px rgba(11, 94, 215, .30);
    font-family: var(--font-poppins);
    position: relative;
    overflow: hidden;
}

/* ===== Overlay hover del botón ===== */
.btn-login::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #16C2F5, #0B5ED7);
    background-size: 200% 200%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.btn-login:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 24px 50px rgba(11, 94, 215, .40);
    animation: gradientShift 3s ease-in-out infinite;
}

.btn-login:hover::before {
    opacity: 1;
}

.btn-login i,
.btn-login span {
    position: relative;
    z-index: 1;
}

.btn-login i {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-login:hover i {
    transform: translateX(4px) scale(1.1);
}

.btn-login:active {
    transform: scale(0.96);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== Animación de desplazamiento del gradiente ===== */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ============================================================
    SECCIÓN 9: SEPARADOR
    ============================================================ */

.login-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 35px 0;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #E4EDF6, transparent);
}

.login-divider span {
    color: #94A3B8;
    font-size: .85rem;
    font-weight: 500;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================================
    SECCIÓN 10: INFORMACIÓN DE SEGURIDAD
    ============================================================ */

.login-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    background: #F7FAFD;
    border: 1px solid #E4EDF6;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

.info-item:hover {
    background: #EEF5FC;
    border-color: #D9E9FF;
    transform: translateX(6px);
    box-shadow: 0 4px 15px rgba(11, 94, 215, .06);
}

.info-item i {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(11, 94, 215, .10);
    color: #0B5ED7;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.4s ease;
}

.info-item:hover i {
    background: linear-gradient(135deg, #0B5ED7, #16C2F5);
    color: #ffffff;
    transform: scale(1.05) rotate(-5deg);
}

.info-item span {
    color: #334155;
    font-size: .92rem;
    font-weight: 500;
}

/* ============================================================
    SECCIÓN 11: FOOTER
    ============================================================ */

.login-footer {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #E4EDF6;
    text-align: center;
}

.login-footer p {
    color: #061224;
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.login-footer span {
    color: #94A3B8;
    font-size: .82rem;
}

/* ============================================================
    SECCIÓN 12: RESPONSIVE
    ============================================================ */

/* ===== Tablet (768px) ===== */
@media (max-width: 768px) {
    .login-background {
        padding: 25px;
    }

    .login-card {
        padding: 35px 28px;
        border-radius: 24px;
        max-width: 100%;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .login-header img {
        width: 65px;
    }

    .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .input-group input {
        padding: 14px 12px;
        font-size: 15px;
    }

    .btn-login {
        font-size: 16px;
        padding: 16px;
    }

    .back-link {
        padding: 6px 14px 6px 10px;
        font-size: .85rem;
    }
}

/* ===== Móvil grande (480px) ===== */
@media (max-width: 480px) {
    .login-background {
        padding: 16px;
    }

    .login-card {
        padding: 28px 18px;
        border-radius: 20px;
    }

    .login-header h1 {
        font-size: 20px;
    }

    .login-header p {
        font-size: .85rem;
    }

    .login-header img {
        width: 55px;
    }

    .input-group input {
        padding: 12px 10px;
        font-size: 14px;
    }

    .input-group i:first-child {
        width: 40px;
        font-size: 15px;
    }

    .toggle-password {
        width: 40px;
        font-size: 16px;
    }

    .btn-login {
        font-size: 15px;
        padding: 14px;
        border-radius: 12px;
    }

    .info-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .info-item i {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .info-item span {
        font-size: .82rem;
    }

    .login-footer p {
        font-size: .85rem;
    }

    .login-footer span {
        font-size: .72rem;
    }

    .login-divider {
        margin: 25px 0;
    }

    .back-link {
        padding: 5px 12px 5px 8px;
        font-size: .80rem;
        gap: 6px;
    }

    .back-link i {
        font-size: 12px;
    }
}

/* ===== Móvil pequeño (380px) ===== */
@media (max-width: 380px) {
    .login-card {
        padding: 20px 14px;
        border-radius: 16px;
    }

    .login-header h1 {
        font-size: 18px;
    }

    .login-header img {
        width: 48px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-group label {
        font-size: .85rem;
    }

    .input-group {
        border-radius: 10px;
    }

    .input-group input {
        padding: 10px 8px;
        font-size: 13px;
    }

    .btn-login {
        font-size: 14px;
        padding: 12px;
        border-radius: 10px;
    }
}