/* Estilos otimizados para tema dark tecnológico minimalista */
:root {
    --primary-blue: #00aaff;
    --primary-blue-dark: #0088cc;
    --secondary-green: #00dd99;
    --accent-yellow: #ffcc00;
    --dark-bg: #000000;
    --darker-bg: #050505;
    --card-bg: rgba(15, 20, 30, 0.92);
    --text-color: #f0f5ff;
    --text-muted: #8899bb;
    --danger-color: #ff3366;
    --border-color: rgba(0, 170, 255, 0.25);
    --glow-shadow-blue: 0 0 20px rgba(0, 170, 255, 0.3);
    --glow-shadow-green: 0 0 15px rgba(0, 221, 153, 0.2);
    --neon-glow: 0 0 15px rgba(0, 170, 255, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
}

body.login-page {
    min-height: 100vh;
    background-color: #000000;
    background-image:
        repeating-linear-gradient(0deg, transparent 0px, transparent 1px, rgba(0, 170, 255, 0.03) 1px, rgba(0, 170, 255, 0.03) 2px),
        repeating-linear-gradient(90deg, transparent 0px, transparent 1px, rgba(0, 170, 255, 0.02) 1px, rgba(0, 170, 255, 0.02) 2px);
    background-size: 50px 50px, 50px 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    color: var(--text-color);
}

/* Grade sutil */
body.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 30% 20%, rgba(0, 170, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(0, 221, 153, 0.05) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* Linhas de dados sutis */
.data-line {
    position: absolute;
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(0, 170, 255, 0.4), transparent);
    z-index: 0;
    opacity: 0.3;
    animation: dataFlow 4s linear infinite;
}

@keyframes dataFlow {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

.data-line:nth-child(1) { left: 15%; animation-delay: 0s; }
.data-line:nth-child(2) { left: 35%; animation-delay: 1s; }
.data-line:nth-child(3) { left: 55%; animation-delay: 2s; }
.data-line:nth-child(4) { left: 75%; animation-delay: 3s; }

/* Cartão de login */
.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow:
        0 0 0 1px rgba(0, 170, 255, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.8),
        var(--glow-shadow-blue),
        inset 0 0 20px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 170, 255, 0.3);
    position: relative;
    z-index: 2;
    overflow: hidden;
    transition: all 0.3s ease;
}

.login-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 0 0 1px rgba(0, 170, 255, 0.25),
        0 12px 40px rgba(0, 0, 0, 0.9),
        0 0 25px rgba(0, 170, 255, 0.25),
        inset 0 0 25px rgba(0, 0, 0, 0.7);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-green));
    z-index: 3;
}

/* Cabeçalho com gradiente azul, verde e amarelo */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
    border-radius: 2px;
}

.login-header h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg,
        var(--primary-blue) 0%,
        var(--secondary-green) 40%,
        var(--accent-yellow) 80%,
        var(--primary-blue) 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-header h2 i {
    background: linear-gradient(90deg,
        var(--primary-blue) 0%,
        var(--secondary-green) 40%,
        var(--accent-yellow) 80%,
        var(--primary-blue) 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 5s ease infinite;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 300;
    margin-top: 0.5rem;
}

/* Alertas */
.alert {
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    animation: slideDown 0.3s ease;
    background-color: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.3);
    color: #ff99aa;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Formulário */
.login-form {
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1.8rem;
    position: relative;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-label i {
    font-size: 1.1rem;
    color: var(--primary-blue);
    width: 20px;
    transition: color 0.3s ease;
}

.form-control {
    width: 100%;
    padding: 1rem 1.2rem;
    background-color: rgba(10, 15, 25, 0.8);
    border: 1px solid rgba(0, 170, 255, 0.2);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow:
        inset 0 2px 10px rgba(0, 0, 0, 0.6),
        0 0 15px rgba(0, 170, 255, 0.25);
    background-color: rgba(15, 22, 35, 0.9);
}

.form-control::placeholder {
    color: rgba(136, 153, 187, 0.6);
}

.form-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Botão */
.btn {
    display: block;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: white;
    box-shadow: 0 5px 15px rgba(0, 170, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 170, 255, 0.3);
    background: linear-gradient(135deg, var(--primary-blue-dark), #0077aa);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 170, 255, 0.2);
}

/* Ícones tecnológicos sutis */
.tech-icon {
    position: absolute;
    font-size: 1.2rem;
    z-index: 1;
    color: rgba(0, 170, 255, 0.2);
    opacity: 0.5;
}

.tech-icon:nth-child(1) { top: 15%; left: 8%; }
.tech-icon:nth-child(2) { top: 20%; right: 10%; }
.tech-icon:nth-child(3) { bottom: 25%; left: 9%; }
.tech-icon:nth-child(4) { bottom: 20%; right: 7%; }

/* Responsividade */
@media (max-width: 768px) {
    .login-card {
        max-width: 90%;
        padding: 2rem 1.8rem;
        margin: 1rem;
    }

    .login-header h2 {
        font-size: 1.9rem;
    }

    .data-line {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.8rem 1.5rem;
    }

    .login-header h2 {
        font-size: 1.7rem;
    }

    .form-control {
        padding: 0.9rem 1.1rem;
    }

    .btn {
        padding: 0.9rem;
        font-size: 1rem;
    }
}