:root {
    --primary: #00205B; /* Azul Escuro BMW */
    --primary-light: #0066B1; /* Azul Claro BMW */
    --primary-hover: #001233; /* Hover Noturno */
    --bg-color: #F8FAFC; /* Branco/Cinza super claro */
    --text-main: #1E293B; /* Texto principal forte */
    --text-muted: #64748B; /* Textos secundários */
    --danger-red: #E02221; /* Vermelho BMW de alertas */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ==========================================
   FUNDOS E CONTAINERS (VISUAL CORPORATIVO)
   ========================================== */
html, body {
    overscroll-behavior: none;
    overscroll-behavior-y: none;
    overscroll-behavior-x: none;
}

body {
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
}
/* Adicione isso ao seu arquivo CSS ou numa tag <style> */
.camera-preview-circle {
    width: 280px; 
    height: 280px; 
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #10B981; /* Borda Verde de "Pronto para ler" */
    background-color: #000;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#video-facial {
    width: 100%;
    height: 100%;
    object-fit: cover; /* A MÁGICA: Preenche sem distorcer! */
    transform: scaleX(-1); /* Efeito espelho */
}
.login-container {
    width: 100%;
    max-width: 480px; 
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--bg-color);
}

.login-card {
    background: var(--bg-color);
    border: none;
    box-shadow: none;
    color: var(--text-main);
}

/* ==========================================
   TOPO: LOGO CENTRALIZADA E CLEAN
   ========================================== */
.header-visual {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 30px;
}

.skyline-svg {
    display: none; 
}

.logo-box {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 32, 91, 0.3);
    color: white;
    font-size: 36px;
}

/* ==========================================
   TEXTOS DE BOAS VINDAS
   ========================================== */
.brand-text {
    padding: 0 20px;
    text-align: center; 
}

.brand-text h2 {
    color: var(--primary);
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.brand-text p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

/* ==========================================
   ÁREA DE AÇÕES E ANIMAÇÕES
   ========================================== */
.action-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
}

.step {
    display: none;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.step.active {
    display: flex;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   INPUTS ESTILO CLEAN
   ========================================== */
input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    background-color: #FFFFFF; 
    color: var(--text-main);
    transition: all 0.3s;
    font-weight: 500;
}

input::placeholder {
    color: #94A3B8;
}

input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(0, 102, 177, 0.1); 
}

/* ==========================================
   BOTÕES DE ALTO PADRÃO
   ========================================== */
.btn-colored {
    background: var(--primary);
    color: white;
    font-weight: 700;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
    width: 100%;
    box-shadow: 0 8px 20px rgba(0, 32, 91, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-colored:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 32, 91, 0.35);
}

.btn-colored:active {
    transform: scale(0.98);
}

.btn-colored:disabled {
    background: #CBD5E1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-outline:hover {
    background-color: var(--primary); 
    color: white;
}

.btn-text-only {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    padding: 10px;
    cursor: pointer;
    width: 100%;
    transition: 0.2s;
}

.btn-text-only:hover {
    color: var(--primary-light);
}

/* ==========================================
   CÂMERA E MENSAGENS
   ========================================== */
.camera-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--primary-light);
    box-shadow: 0 0 25px rgba(0, 102, 177, 0.3);
}

.message {
    margin-top: 15px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

/* ==========================================
   RODAPÉ CLEAN
   ========================================== */
.app-footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #94A3B8;
    font-weight: 500;
}

/* ==========================================
   MÁGICA DO SPLASH SCREEN
   Sequência: fundo em degradê aparece -> emblema branco gira e "aterrissa"
   -> cantos em destaque acendem -> barra de carregamento desliza no topo e
   no rodapé -> nome e status entram por baixo. Tudo em display:none quando
   inativo, então reinicia do zero toda vez que ".active" é adicionado de
   novo (splash de abertura E splash de "Bem-vindo(a)" depois do login).
   ========================================== */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, var(--primary-hover) 0%, var(--primary) 55%, var(--primary-light) 100%);
    z-index: 99999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    overflow: hidden;
}

#splash-screen.active {
    display: flex;
    opacity: 1;
}

/* Barra de carregamento: desliza da esquerda pra direita no topo e no
   rodapé da tela, depois pulsa devagar (splash de login fica mais tempo
   aberto que o de abertura, então precisa continuar "vivo" na espera). */
.splash-bar {
    position: absolute;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--danger-red), #FF8A80);
    box-shadow: 0 0 14px rgba(224, 34, 33, 0.7);
    animation: splashBarSweep 0.9s cubic-bezier(.4,0,.2,1) 0.75s forwards,
               splashBarPulse 1.6s ease-in-out 1.75s infinite;
}
.splash-bar.top { top: 0; }
.splash-bar.bottom { bottom: 0; }

/* Moldura ao redor do emblema: as 4 "quinas" acendem como um viewfinder
   destacando o logo, igual referência. */
.splash-badge-wrap {
    position: relative;
    width: 110px;
    height: 110px;
    margin-bottom: 22px;
}
.splash-badge-wrap .corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid var(--danger-red);
    opacity: 0;
    animation: splashCornerIn 0.35s ease forwards;
}
.splash-badge-wrap .corner.tl { top: -9px; left: -9px; border-right: none; border-bottom: none; animation-delay: 0.85s; }
.splash-badge-wrap .corner.tr { top: -9px; right: -9px; border-left: none; border-bottom: none; animation-delay: 0.92s; }
.splash-badge-wrap .corner.bl { bottom: -9px; left: -9px; border-right: none; border-top: none; animation-delay: 0.99s; }
.splash-badge-wrap .corner.br { bottom: -9px; right: -9px; border-left: none; border-top: none; animation-delay: 1.06s; }

.splash-logo {
    font-size: 52px;
    color: var(--primary);
    background: #FFFFFF;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
    transform: scale(0) rotate(-55deg);
    animation: splashBadgeIn 0.55s cubic-bezier(.34,1.56,.64,1) 0.3s forwards;
}

.splash-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 10px;
    letter-spacing: -1px;
    color: #FFFFFF;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(8px);
    animation: splashTextIn 0.4s ease 1.15s forwards;
}

.splash-user {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    opacity: 0;
    transform: translateY(8px);
    animation: splashTextIn 0.4s ease 1.3s forwards;
}

@keyframes splashBadgeIn {
    to { transform: scale(1) rotate(0deg); }
}

@keyframes splashCornerIn {
    to { opacity: 1; }
}

@keyframes splashBarSweep {
    to { width: 100%; }
}

@keyframes splashBarPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

@keyframes splashTextIn {
    to { opacity: 1; transform: translateY(0); }
}