/* ============================================
   RESET E VARIÁVEIS
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #0066ff;
    --secondary-cyan: #00d4ff;
    --dark-bg: #ffffff;
    --darker-bg: #f5f5f5;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(200, 200, 200, 0.3);
    --text-white: #333333;
    --text-gray: #666666;
    --text-error: #ff4757;
    --glow-blue: 0 0 20px rgba(0, 102, 255, 0.3);
    --glow-cyan: 0 0 30px rgba(0, 212, 255, 0.4);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ============================================
   BODY E BACKGROUND - BRANCO
   ============================================ */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    background-attachment: fixed;
    background-color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}



/* ============================================
   BACKGROUND ANIMADO (CÍRCULOS)
   ============================================ */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(0deg); }
}

.tech-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;    
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.4), transparent);
    top: 20%;
    right: 10%;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.3), transparent);
    bottom: 10%;
    left: 15%;
    animation-delay: 2s;
}

@keyframes pulse {
    0% { opacity: 0.2; transform: scale(1); }
    100% { opacity: 0.2; transform: scale(1); }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

@keyframes float {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 0; }
    90% { opacity: 0; }
    100% { transform: translateY(0) translateX(0); opacity: 0; }
}

/* ============================================
   CONTAINER PRINCIPAL - CORRIGIDO
   ============================================ */
.login-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px; /* AUMENTADO para dar espaço */
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(0px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   LOGO E TÍTULO - CORRIGIDO
   ============================================ */
.logo-container {
    text-align: center;
    margin-bottom: 30px; /* REDUZIDO para dar mais espaço */
    animation: none;
}

/* LOGO simples */
.logo {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
    filter: none;
}

.system-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #190962;
    letter-spacing: 4px;
    margin-bottom: 8px;
    animation: none;
}


.system-subtitle {
    color: #2c0ddc;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 1.5px;
    text-shadow: none;
}

/* ============================================
   CARD DE LOGIN
   ============================================ */
.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 35px 30px; /* REDUZIDO para caber melhor */
    width: 100%;
    max-width: 450px;
    box-shadow: 
        var(--shadow-card),
        inset 0 0 30px rgba(0, 212, 255, 0.05);
    animation: slideUp 0.4s ease-out 0.1s both;
    position: relative;
    overflow: hidden;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(0px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-header {
    text-align: center;
    margin-bottom: 25px;
}

.card-header i {
    font-size: 2.5rem;
    color: #0066ff;
    margin-bottom: 12px;
    display: block;
}

.card-header h2 {
    color: var(--text-white);
    font-size: 1.4rem;
    font-weight: 600;
}

/* ============================================
   CAMPOS DE INPUT
   ============================================ */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-cyan);
    font-size: 1.1rem;
    z-index: 2;
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.5));
}

.input-group input {
    width: 100%;
    padding: 14px 45px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-white);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input::placeholder {
    color: var(--text-gray);
}

.input-group input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary-blue);
    box-shadow: 
        0 0 20px rgba(0, 102, 255, 0.3),
        inset 0 0 15px rgba(0, 212, 255, 0.1);
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    z-index: 2;
}

.toggle-password:hover {
    color: var(--secondary-cyan);
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.5));
}

/* ============================================
   MENSAGEM DE ERRO
   ============================================ */
.error-message {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid var(--text-error);
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.5s ease-in-out;
    backdrop-filter: blur(10px);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.error-message i {
    color: var(--text-error);
    font-size: 1.2rem;
}

.error-message span {
    color: var(--text-white);
    font-size: 0.9rem;
}

/* ============================================
   BOTÃO DE LOGIN
   ============================================ */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-cyan));
    border: none;
    border-radius: 12px;
    color: var(--text-white);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 212, 255, 0.4);
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login:hover::before {
    width: 300px;
    height: 300px;
}

.btn-login:hover {
    box-shadow: 0 8px 35px rgba(0, 212, 255, 0.6);
    transform: translateY(-2px);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login i {
    transition: transform 0.3s ease;
}

.btn-login:hover i {
    transform: translateX(5px);
}

.btn-text {
    position: relative;
    z-index: 1;
}

/* ============================================
   FOOTER DO CARD
   ============================================ */
.card-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--glass-border);
}

.card-footer p {
    color: var(--text-gray);
    font-size: 0.85rem;
}

.card-footer a {
    color: var(--secondary-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

.card-footer a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* ============================================
   VERSÃO DO SISTEMA
   ============================================ */
.version-info {
    margin-top: 20px; /* ALTERADO: não mais position absolute */
    color: var(--text-gray);
    font-size: 0.8rem;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 10;
}

/* ============================================
   RESPONSIVIDADE - CORRIGIDO
   ============================================ */
@media (max-width: 768px) {
    .login-container {
        padding: 30px 15px; /* Mais padding em mobile */
    }

    .system-title {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .system-subtitle {
        font-size: 0.8rem;
    }
    
    .login-card {
        padding: 30px 20px;
        max-width: 100%;
    }
    
    .logo {
        width: 100px;
    }  

}

@media (max-width: 480px) {
    .system-title {
        font-size: 1.5rem;
    }
    
    .card-header h2 {
        font-size: 1.2rem;
    }
    
    .input-group input {
        padding: 12px 40px;
        font-size: 0.9rem;
    }
    
    .login-card {
        padding: 25px 18px;
    }

    .logo {
        width: 90px;
    }
}

/* Telas muito pequenas */
@media (max-height: 650px) {
    .login-container {
        justify-content: flex-start; /* Alinha no topo */
        padding-top: 20px;
    }

    .logo {
        width: 80px;
    }

    .system-title {
        font-size: 1.4rem;
        margin-bottom: 5px;
    }

    .logo-container {
        margin-bottom: 15px;
    }

    .card-header {
        margin-bottom: 15px;
    }

    .input-group {
        margin-bottom: 15px;
    }
}

/* ============================================
   ACESSIBILIDADE
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}