/* login.css - Versão Híbrida (Mobile & Web) - FINAL CORRIGIDA */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden; /* Evita scrolls desnecessários no login */
}

/* O wrapper agora garante a centralização respeitando o recuo do topo e base */
.login-wrapper {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column; 
    justify-content: center; /* Centraliza verticalmente o container */
    align-items: center;     /* Centraliza horizontalmente o container */
    background: url('../assets/fundo.jpeg') no-repeat center center fixed;
    background-size: cover;

    /* APLICAÇÃO DOS RECUOS CAPACITOR (Safe Area) */
    /* Adicionamos 10px extras de respiro como solicitado */
    padding-top: calc(10px + var(--safe-top)) !important;
    padding-bottom: calc(10px + var(--safe-bottom)) !important;
}

/* Container de vidro (Glassmorphism) */
.login-container {
    background: rgba(255, 255, 255, 0.18); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 40px 30px; /* Reduzido levemente para caber melhor em telas menores */
    border-radius: 30px;
    width: 90%; 
    max-width: 420px; 
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

/* Logo com bordas arredondadas */
.logo {
    width: 130px;
    height: auto;
    border-radius: 25px; 
    margin-bottom: 15px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

h2 {
    color: white;
    font-size: 32px;
    margin-bottom: 25px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.input-group {
    margin-bottom: 15px;
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 18px;
    color: white;
    font-size: 18px;
}

.input-group input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    color: white;
    outline: none;
    font-size: 16px;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

/* Botão Entrar Principal */
.btn-primary {
    width: 100%;
    padding: 16px;
    background-color: #1d72d6; /* Azul aproximado da sua imagem */
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(29, 114, 214, 0.4);
}

/* Botões inferiores */
.actions-row {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.btn-glass {
    flex: 1;
    padding: 14px 5px;
    background: rgba(0, 0, 0, 0.4); 
    border: 2px solid #ffffff; 
    border-radius: 15px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800; 
    text-transform: uppercase; 
    cursor: pointer;
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-glass i { font-size: 18px; }

/* --- SISTEMA DE NOTIFICAÇÕES (TOASTS) --- */
#toast-container {
    position: fixed;
    top: calc(20px + var(--safe-top));
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 350px;
    pointer-events: none;
}

/* ============================================================
   REGRAS EXCLUSIVAS PARA WEB (DESKTOP) 
   ============================================================ */

@media (min-width: 1024px) {
    .login-wrapper {
        background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), 
                    url('../assets/fundo.jpeg') no-repeat center center fixed;
        background-size: cover;
        
        /* DESKTOP: Remove os recuos de Safe Area */
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .login-container {
        max-width: 460px;
        padding: 50px 45px;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .login-container:hover {
        transform: translateY(-5px);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    }

    .btn-primary:hover {
        background-color: #2563eb;
        transform: scale(1.02);
    }

    .btn-glass {
        flex-direction: row; 
        padding: 14px 10px;
    }
}