/* ==========================================================================
   1. RESET E ESTILOS GLOBAIS
   ========================================================================== */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw;
    height: 100vh;
    overflow: hidden !important; /* Trava a rolagem global */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body.login {
    background: #f4f7fa;
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   2. PÁGINA DE LOGIN PRINCIPAL
   ========================================================================== */

/* Layout Base */
.login-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.main-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.side-area {
    flex: 1;
    height: 100%;
    position: relative;
    z-index: 1;
}

.center-area {
    flex: 0 0 476px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    position: relative;
}

/* Efeito de Brilho Central */
.center-area::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgb(0, 82, 214);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Header de Login */
.login-header {
    position: absolute;
    top: 30px;
    left: 40px;
    right: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.logo-top img {
    height: 40px;
}

.header-actions a {
    margin-left: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    color: #2563eb;
    display: inline-block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Card de Login */
.login-card {
    position: relative;
    width: min(476px, 90%);
    background: #ffffff;
    padding: 50px;
    border-radius: 24px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.15);
    text-align: center;
    z-index: 10;
    box-sizing: border-box;
}

.login-card h1 {
    font-size: 28px;
    font-weight: 800;
    color: #111;
    margin-bottom: 10px;
}

.subtitle {
    margin-bottom: 35px;
    color: #666;
    font-size: 14px;
}

/* Formulário e Inputs */
.form-group {
    margin-bottom: 18px;
}

.form-group > input {
    all: unset;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 18px 15px 45px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    background: #e6ebf2;
    font-size: 14px;
    outline: none;
    transition: border 0.2s, background 0.2s;
    box-sizing: border-box;
}

.input-wrapper input:focus {
    border: 1px solid #2f6fd6;
    background: #fff;
}

.input-wrapper input#password,
.input-wrapper input#passconf {
    padding-right: 45px;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
}

/* Ícones de Visualizar Senha */
.input-wrapper i.view-password,
.input-wrapper i.view-password-conf {
    left: auto;
    right: 16px;
    pointer-events: auto;
    cursor: pointer;
    transition: color 0.2s;
}

.input-wrapper i.view-password:hover,
.input-wrapper i.view-password-conf:hover {
    color: #2563eb;
}

/* Links (Esqueceu a senha) */
.forgot {
    margin: 10px 0 25px;
    font-size: 15px;
}

.forgot a {
    color: #000;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot a:hover {
    color: #2563eb;
}

/* Ilustrações (Página de Login) */
.illustration {
    position: absolute;
    height: clamp(400px, 50vh, 620px);
    width: auto;
}

.left-side {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.left-man {
    right: -80px;
    width: 350px;
    height: auto;
    bottom: 150px;
}

.right-side {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.right-man {
    left: -220px;
    width: 350px;
    height: auto;
    bottom: 400px;
}

.mobile-only-man {
    display: none;
}

/* Redes Sociais e Divider */
.social-login {
    margin-top: 35px;
}

.divider-text {
    margin: 25px 0 15px;
    font-size: 13px;
    color: #718096;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.btn-social {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-social:hover {
    background: #f8fafc;
}

/* ==========================================================================
   3. BOTÕES GLOBAIS
   ========================================================================== */
.btn-demo {
    background: #ffffff;
    color: #2563eb !important;
    padding: 10px 20px;
    border-radius: 25px;
}

.header-actions .btn-demo:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 20px rgba(37, 99, 235, 0.3);
    color: #fff !important;
    background: #2563eb;
}

.btn-register,
.btn-login,
.btn-forgot {
    background: #2563eb !important;
    color: #fff !important;
    border: none !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-register {
    padding: 10px 20px;
}

.btn-login,
.btn-forgot {
    padding: 15px !important;
    font-size: 16px !important;
    margin-bottom: 10px !important;
}

.btn-login { width: 100%; }
.btn-forgot { width: 90% !important; }

.btn-register:hover,
.btn-login:hover,
.btn-forgot:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 20px rgba(37, 99, 235, 0.3) !important;
}

.btn-register:active,
.btn-login:active,
.btn-forgot:active {
    transform: translateY(-2px) !important;
}

/* ==========================================================================
   4. TELA DE CONFIRMAÇÃO DE EMAIL
   ========================================================================== */
.main-email-confirm {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100vw;
    background: #f4f8fb;
    position: relative;
}

.main-email-confirm .background-glow {
    position: absolute;
    width: 700px;
    height: 700px;
    background: rgba(37, 99, 235, 0.12);
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.main-email-confirm .content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 100px;
    max-width: 1200px;
    width: 100%;
    z-index: 10;
    position: relative;
    padding: 40px;
    box-sizing: border-box;
}

.illustration-side {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.illustration-img {
    width: 100%;
    max-width: 420px;
    height: auto;
}

.card-side {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.container-confirm {
    background: #ffffff;
    border-radius: 16px;
    padding: 60px 55px 40px 55px;
    width: 100%;
    max-width: 480px;
    text-align: center;
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.04),        
        0 0 35px rgba(37, 99, 235, 0.2);
    box-sizing: border-box;
}

.success-icon {
    width: 75px;
    height: 75px;
    margin: 0 auto 25px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container-confirm .title h1 {
    font-size: 30px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.container-confirm .body .text span {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
    display: block;
    margin-bottom: 35px;
}

.container-confirm .footer {
    margin-top: 35px;
}

.container-confirm .footer span {
    font-size: 12px;
    color: #9ca3af;
}

/* Botão Azul Específico (Confirmação) */
.btn-blue {
    width: 100%;
    padding: 16px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-blue:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

/* ==========================================================================
   5. MODAIS GERAIS (Alertas)
   ========================================================================== */
#bgbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 998;
}

#modalAlert {
    display: none;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: min(440px, 95%);
    background: #ffffff;
    border-radius: 28px;
    padding: 40px 30px;
    text-align: center;
    z-index: 10000;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.icon-modal {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: none;
}

#modalAlert .title span {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 15px;
}

#modalAlert .description span {
    display: block;
    font-size: 16px;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 30px;
}

#goToLogin {
    width: 100%;
    padding: 18px !important;
    border-radius: 16px !important;
    border: none !important;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

#goToLogin:hover {
    filter: brightness(0.9);
    transform: translateY(-2px);
}

.btn-success { background-color: #48a753 !important; }
.btn-warning { background-color: #ff9800 !important; color: white !important; }
.btn-danger { background-color: #be1633 !important; }

#box-md {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    margin-bottom: 20px;
}

#box-md img {
    display: block;
    margin: 0 auto;
    max-width: 100px;
    height: auto;
}

/* ==========================================================================
   6. RESPONSIVIDADE (Media Queries)
   ========================================================================== */

/* Telas Médias (Ocultar laterais no login) */
@media (max-width: 1100px) {
    .side-area {
        display: none;
    }
    .center-area {
        flex: 1;
    }
}

/* Responsividade Tela de Confirmação */
@media (max-width: 850px) {
    .main-email-confirm .content-wrapper {
        flex-direction: column;
        gap: 50px;
    }
    .illustration-side,
    .card-side {
        justify-content: center;
    }
    .illustration-img {
        max-width: 280px;
    }
}

/* Telas Menores (Mobile Geral) */
@media (max-width: 768px) {
    .center-area {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 0 20px !important;
    }
    .mobile-only-man {
        display: block !important;
        width: 250px !important;
        height: auto !important;
        margin-bottom: -130px !important;
        position: relative !important;
        z-index: 5 !important;
    }
    .login-card {
        width: 100% !important;
        max-width: 450px !important;
        padding: 60px 20px 40px 20px !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05) !important;
        border: none !important;
    }
    .login-card h1 {
        margin-top: 20px !important;
        font-size: 26px !important;
    }
}