/*
=====================================
ESTILO DE LOGIN CORPORATIVO
=====================================
Página de login com tema de fábrica de veículos
Cores: Vermelho #db001b e Preto #1a171b
*/

/* ==== BACKGROUND E LAYOUT GERAL ==== */
.login {
    background: linear-gradient(135deg, #1a171b 0%, #2a2a2a 50%, #1a171b 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.login:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(219, 0, 27, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(219, 0, 27, 0.1) 0%, transparent 50%);
    z-index: 1;
}

/* ==== PADRÃO INDUSTRIAL DE FUNDO ==== */
.login:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, transparent 40%, rgba(219, 0, 27, 0.03) 40%, rgba(219, 0, 27, 0.03) 60%, transparent 60%),
        linear-gradient(-45deg, transparent 40%, rgba(255, 255, 255, 0.02) 40%, rgba(255, 255, 255, 0.02) 60%, transparent 60%);
    background-size: 30px 30px;
    z-index: 1;
}

/* ==== CONTAINER DO LOGIN ==== */
.login_wrapper {
    position: relative;
    z-index: 10;
    max-width: 420px;
    margin: 0 auto;
    padding-top: 8vh;
}

/* ==== FORM PRINCIPAL ==== */
.login_form {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(219, 0, 27, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    position: relative;
}

/* ==== HEADER DO FORM ==== */
.login_content {
    padding: 40px 35px;
    position: relative;
}

.login_content:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #db001b 0%, #ff1a35 50%, #db001b 100%);
}

/* ==== LOGO ==== */
.logo_login {
    max-width: 180px;
    height: auto;
    margin: 0 auto 30px;
    display: block;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

/* ==== SEPARADOR ==== */
.separator {
    margin: 25px 0;
    position: relative;
    text-align: center;
}

.separator:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #db001b 20%, #db001b 80%, transparent 100%);
    transform: translateY(-50%);
}

/* ==== CAMPOS DE INPUT ==== */
.form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #1a171b;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    background: rgba(255, 255, 255, 1);
    border-color: #db001b;
    box-shadow: 
        0 0 0 3px rgba(219, 0, 27, 0.1),
        0 5px 20px rgba(0, 0, 0, 0.1);
    outline: none;
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: #6c757d;
    font-weight: 400;
}

/* ==== WRAPPER DA SENHA ==== */
.senha-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.senha-wrapper .form-control {
    margin-bottom: 0;
    padding-right: 55px;
    flex: 1;
}

.btn-senha {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #6c757d;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 5;
}

.btn-senha:hover {
    background: rgba(219, 0, 27, 0.1);
    color: #db001b;
    transform: scale(1.1);
}

/* ==== BOTÃO DE LOGIN ==== */
.btn_login {
    background: linear-gradient(135deg, #db001b 0%, #b50017 100%);
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(219, 0, 27, 0.3);
}

.btn_login:before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn_login:hover {
    background: linear-gradient(135deg, #b50017 0%, #8b0013 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(219, 0, 27, 0.4);
}

.btn_login:hover:before {
    left: 100%;
}

.btn_login:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(219, 0, 27, 0.3);
}

/* ==== LINK DE ESQUECI SENHA ==== */
.reset_pass {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.reset_pass:hover {
    color: #db001b;
    text-decoration: none;
}

.reset_pass:after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #db001b;
    transition: width 0.3s ease;
}

.reset_pass:hover:after {
    width: 100%;
}

/* ==== FOOTER DO FORM ==== */
.change_link {
    text-align: center;
    color: #6c757d;
    font-size: 13px;
    font-weight: 500;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    position: relative;
}

.change_link:before {
    content: "🏭";
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0 15px;
    font-size: 20px;
}

/* ==== ELEMENTOS DECORATIVOS ==== */
.industrial-lines {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    opacity: 0.1;
}

.industrial-lines:before,
.industrial-lines:after {
    content: "";
    position: absolute;
    background: #db001b;
}

.industrial-lines:before {
    width: 100%;
    height: 2px;
    top: 20px;
    left: 0;
}

.industrial-lines:after {
    width: 2px;
    height: 100%;
    top: 0;
    left: 20px;
}

/* ==== CLASSES DE CORES ESPECÍFICAS ==== */
.bg_cinza_escuro {
    background: #1a171b;
}

.texto_amarelo {
    color: #ffc107;
}

/* ==== RESPONSIVIDADE ==== */
@media (max-width: 480px) {
    .login_wrapper {
        margin: 20px;
        max-width: none;
        padding-top: 5vh;
    }
    
    .login_content {
        padding: 30px 25px;
    }
    
    .logo_login {
        max-width: 150px;
        margin-bottom: 20px;
    }
    
    .form-control {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .btn_login {
        padding: 12px 25px;
        font-size: 14px;
    }
}

/* ==== ANIMAÇÕES ==== */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.login_form {
    animation: fadeInScale 0.6s ease-out;
}

.logo_login {
    animation: slideInFromTop 0.8s ease-out;
}

.form-control,
.btn_login {
    animation: slideInFromTop 0.6s ease-out;
    animation-fill-mode: both;
}

.form-control:nth-child(1) { animation-delay: 0.1s; }
.form-control:nth-child(2) { animation-delay: 0.2s; }
.btn_login { animation-delay: 0.3s; }

/* ==== HOVER EFFECTS INDUSTRIAIS ==== */
.login_content:hover .industrial-lines {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

/* ==== LOADING STATES ==== */
.btn_login.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn_login.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 white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}