/* Estilos modernos para o sistema de login */

/* Variáveis CSS para consistência */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --shadow-soft: 0 25px 45px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 35px 60px rgba(0, 0, 0, 0.15);
    --border-radius: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Melhorias para acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-card {
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid white;
    }
    
    .form-input {
        background: rgba(0, 0, 0, 0.6);
        border: 2px solid white;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --glass-bg: rgba(0, 0, 0, 0.3);
        --glass-border: rgba(255, 255, 255, 0.1);
    }
}

/* Melhorias para impressão */
@media print {
    .login-container {
        background: white !important;
        color: black !important;
    }
    
    .login-card {
        background: white !important;
        border: 1px solid black !important;
        box-shadow: none !important;
    }
    
    .gradient-custom::before {
        display: none !important;
    }
}

/* Efeitos de partículas no fundo (opcional) */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Melhorias para dispositivos touch */
@media (hover: none) and (pointer: coarse) {
    .login-btn {
        padding: 18px;
        font-size: 18px;
    }
    
    .form-input {
        padding: 18px;
        padding-top: 26px;
        font-size: 18px;
    }
    
    .login-card:hover {
        transform: none;
    }
}

/* Melhorias para telas muito pequenas */
@media (max-width: 360px) {
    .login-card {
        padding: 20px 16px;
        margin: 8px;
    }
    
    .login-title {
        font-size: 22px;
    }
    
    .login-logo img {
        width: 50px;
        height: 50px;
    }
}

/* Melhorias para telas muito grandes */
@media (min-width: 1400px) {
    .login-card {
        max-width: 500px;
        padding: 56px;
    }
    
    .login-title {
        font-size: 36px;
    }
    
    .login-subtitle {
        font-size: 18px;
    }
}

/* Estados de loading mais suaves */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    color: white;
}

/* Melhorias para o alerta de erro */
.alert {
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Efeito de digitação para o título */
.login-title {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 2s steps(20, end);
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* Melhorias para o foco do teclado */
.form-input:focus,
.login-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Efeito de ripple no botão */
.login-btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Melhorias para o logo */
.login-logo img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: filter 0.3s ease;
}

.login-logo img:hover {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

/* Efeito de glassmorphism mais pronunciado */
.login-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Melhorias para o gradiente de fundo */
.gradient-custom {
    background-attachment: fixed;
}

/* Efeito de parallax sutil */
@media (min-width: 768px) {
    .gradient-custom::before {
        background-attachment: fixed;
    }
}
