/* =========================
   RESET E CONFIGURAÇÕES GLOBAIS
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --primary-color: #03292D;
    --primary-light: #7ED9C4;
    --bg-body: #f5f7fa;
    --bg-main: #ffffff;
    --text-heading: #0f172a;
    --text-body: #64748b;
    --border-light: #e2e8f0;
    --input-bg: #f8fafc;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --accent: #facc15;
    --qr-bg: rgba(15, 23, 42, 0.55);
    --step-bg: rgba(15, 23, 42, 0.85);
    --step-text: #e5e7eb;
}

body.dark-mode {
    --bg-body: #1a1a1a;
    --bg-main: #2d2d2d;
    --text-heading: #ffffff;
    --text-body: #cccccc;
    --border-light: #444444;
    --input-bg: #3a3a3a;
    --primary: #4f9eff;
    --primary-hover: #3a7bc8;
    --accent: #facc15;
    --qr-bg: rgba(0, 0, 0, 0.7);
    --step-bg: rgba(255, 255, 255, 0.15);
    --step-text: #f0f0f0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-body);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-body);
}

/* Container principal – dois cards lado a lado */
.main-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    background: var(--bg-main);
    border-radius: 32px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    min-height: 720px;
}

/* Garante que as duas colunas se comportem bem */
.main-container > .app-info-section,
.main-container > .login-side {
    flex: 1;
    min-width: 0;
}

/* ============================================
   LADO ESQUERDO – FORMULÁRIO DE LOGIN
============================================ */
.login-side {
    flex: 1;
    padding: 56px 64px;
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
}

.logo-container {
    margin-bottom: 40px;
    text-align: center;
}

.logo-container img {
    height: 98px;
    width: auto;
}
.recaptcha-box {
    margin: 20px auto; 
    transform: scale(0.9);
    transform-origin: center;
    display: flex;
    justify-content: center;
    border-radius: 8px; 
    overflow: hidden;
}
@media (max-width: 480px) {
    .recaptcha-box {
        transform: scale(0.8);
        transform-origin: center;
    }
}

.welcome-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-heading);
    text-align: center;
}

.welcome-header p {
    font-size: 14px;
    color: var(--text-body);
    margin-bottom: 32px;
    text-align: center;
}

.qrcode-box img {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Grupos de formulário */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-container i {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 20px;
}

.input-container input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    border-color: var(--border-light);
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.2s;
    background: var(--input-bg);
    color: var(--text-heading);
}

.input-container input::placeholder {
    color: #9ca3af;
}

.input-container input:hover {
    border-color: var(--primary);
}

.input-container input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--input-bg);
    color: var(--text-heading);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

/* Ícone de mostrar/ocultar senha */
.password-toggle {
    position: absolute;
    right: 16px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 20px;
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    color: var(--primary);
}

/* Container do token (inicialmente oculto) */
.token-container {
    margin: 16px 0 24px;
    padding: 18px 16px;
    background: var(--input-bg);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    display: none;
}

.token-container.show {
    display: block;
}

.token-container label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 10px;
    display: block;
}

.token-input-wrapper {
    margin-bottom: 12px;
}

.token-input-wrapper input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    color: var(--text-heading);
}

.token-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    color: var(--text-heading);
}

.token-option {
    flex: 1;
    min-width: 140px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.token-option:hover {
    background: #e5edff;
    border-color: #2563eb;
}

.token-option i {
    color: var(--primary);
    font-size: 16px;
}

/* Link "Baixar Google Authenticator" */
.token-container > a {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: #2563eb;
    text-decoration: none;
}

.token-container > a:hover {
    text-decoration: underline;
}

/* Botão principal */
.btn-primary {
    width: 100%;
    padding: 14px 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin: 16px 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

/* Links do formulário */
.form-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    gap: 10px;
}
/*Formulário de recuperação de senha*/
.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.register-link {
    color: var(--text-heading);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.register-link strong {
    color: var(--primary);
    font-weight: 600;
}

.register-link:hover strong {
    text-decoration: underline;
}

/* Rodapé */
.copyright {
    text-align: center;
    margin-top: 40px;
    font-size: 12px;
    color: var(--text-body);
}

/* ============================================
   LADO DIREITO – INFORMAÇÕES DO APP + QR CODE
============================================ */
.app-info-section {
    flex: 1;
     background:
        linear-gradient(
            rgba(0,0,40,0.55),
            rgba(0,0,70,0.65)
        ),  url('../images/background_banner.jpg') center/cover;
    color: white;
    padding: 56px 56px 48px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    gap: 24px;
}

.app-info-section::before,
.app-info-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.app-info-section::before {
    top: -80px;
    right: -80px;
    width: 260px;
    height: 260px;
    background: url('../images/background_banner.jpg') center / cover no-repeat;
}

.app-info-section::after {
    bottom: -120px;
    left: -120px;
    width: 360px;
    height: 360px;
    background: rgba(15, 23, 42, 0.35);
}

.app-info-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    align-items: center;
}

.app-info-content h1 {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 18px;
    max-width: 520px;
    text-align: center;
}

.app-info-content h1 span {
    color: var(--primary-light, #064e56);
}


.qrcode-container {

    border-radius: 24px;
    padding: 28px 24px 24px;
    text-align: center;
    max-width: 320px;
    margin-top: auto;
      
}

.qrcode-box {
    background: white;
    padding: 16px;
    border-radius: 18px;
    margin-bottom: 20px;
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    
}
.qrcode-box:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.qrcode-box:active {
    transform: scale(0.98);
}

.qrcode-box img {
    width: 160px;
    height: 160px;
}

.qrcode-container h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.qrcode-container p {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 18px;
}

.pwa-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 250px;
    max-width: 400px;
    width: 100%;
    margin-bottom: 14px;
}

.step-card {
    background: var(--step-bg);
    color: var(--primary-light);
    padding: 10px 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.6);
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    -webkit-tap-highlight-color: transparent;
}

.step-card:hover {
    transform: translateX(4px);
    border-color: #facc15;
    background: rgba(15, 23, 42, 0.95);
}

.step-number {
    background: var(--primary-light, #064e56);
    color: #111827;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.step-text {
    color: #e5e7eb;
    font-size: 0.9rem;
    flex: 1;
}

.step-text i {
    color:var(--primary-light, #064e56);
    margin-right: 5px;
}
.step-card:active {
    transform: scale(0.98);
    opacity: 0.8;
}
/* ============================================
   MODO ESCURO/CLARO – TOGGLE DE TEMAS
============================================ */

.login-side {
    position: relative; /* para conter o posicionamento absoluto do toggle */
}

.theme-toggle {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.theme-toggle .material-icons {
    cursor: pointer;
    font-size: 24px;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.theme-toggle .material-icons.active {
    color: var(--primary);
}

/* Se quiser que o ícone inativo fique mais opaco */
.theme-toggle .material-icons.inactive {
    opacity: 0.5;
}

/* ============================================
   MEDIA QUERIES – TABLET / MOBILE
============================================ */
@media (max-width: 968px) {
    body {
        padding: 0;
    }

    .main-container {
        flex-direction: column;
        border-radius: 0;
        min-height: auto;
        box-shadow: none;
    }

    .app-info-section {
        padding: 36px 22px 28px;
    }

    .app-info-content h1 {
        font-size: 30px;
    }

    .qrcode-container {
        max-width: 100%;
        padding: 22px 18px;
        margin-top: 16px;
    }

    .qrcode-box img {
        width: 140px;
        height: 140px;
    }

    .login-side {
        padding: 32px 22px 40px;
        align-items: stretch;
    }

    .login-wrapper {
        max-width: 100%;
    }

    .welcome-header h1 {
        font-size: 24px;
    }

    .token-options {
        flex-direction: column;
        gap: 8px;
    }

    .token-option {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .app-info-content h1 {
        font-size: 26px;
    }

    .qrcode-box img {
        width: 120px;
        height: 120px;
    }

    .form-links {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}