/* ============================================================
   login.css
   Estilos exclusivos da tela de login
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;600;700&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Barlow', 'Segoe UI', sans-serif;
    background: #e8f0fe;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Grade de fundo */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(13, 71, 161, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 71, 161, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

/* ── ORBES DECORATIVOS ── */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.22;
    z-index: 0;
    animation: orbFloat 9s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: #1565c0; top: -160px; left: -160px; }
.orb-2 { width: 380px; height: 380px; background: #42a5f5; bottom: -120px; right: -120px; animation-delay: -4.5s; }

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0); }
    50%       { transform: translate(25px, 18px); }
}

/* ── WRAPPER ── */
.login-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 860px;
    min-height: 520px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(13, 71, 161, 0.18), 0 4px 16px rgba(0, 0, 0, 0.08);
    animation: cardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    margin: 20px;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(28px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── PAINEL ESQUERDO (MARCA) ── */
.panel-brand {
    background: linear-gradient(160deg, #0d47a1 0%, #1565c0 55%, #1e88e5 100%);
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 36px;
    position: relative;
    overflow: hidden;
}

.panel-brand::before {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    top: -80px; right: -80px;
}
.panel-brand::after {
    content: '';
    position: absolute;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    bottom: -60px; left: -60px;
}

.brand-icon   { font-size: 52px; margin-bottom: 20px; }
.brand-name   { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: 1.5px; text-align: center; margin-bottom: 10px; }
.brand-penske { background: #fff; color: #0d47a1; font-size: 13px; font-weight: 800; padding: 5px 18px; border-radius: 8px; letter-spacing: 2px; margin-bottom: 28px; }
.brand-desc   { font-size: 13px; color: rgba(255, 255, 255, 0.7); text-align: center; line-height: 1.7; border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: 22px; }

/* ── PAINEL DIREITO (FORMULÁRIO) ── */
.panel-form {
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 52px 44px;
}

.form-title    { font-size: 24px; font-weight: 700; color: #0d1b2a; margin-bottom: 6px; }
.form-subtitle { font-size: 13px; color: #7a8fa6; margin-bottom: 32px; }

label { display: block; font-size: 12px; font-weight: 700; color: #0d47a1; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 7px; }
.form-group { margin-bottom: 22px; }

/* Inputs com ícone */
.input-wrapper { position: relative; }
.input-icon    { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 16px; pointer-events: none; }

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 14px 12px 44px;
    background: #f4f7ff;
    border: 1.5px solid #c5d5f0;
    border-radius: 10px;
    color: #0d1b2a;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
input[type="text"]::placeholder,
input[type="password"]::placeholder { color: #aab8d0; }
input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #1565c0;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
}

.toggle-senha {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    user-select: none;
    opacity: 0.4;
    transition: opacity 0.2s;
}
.toggle-senha:hover { opacity: 0.9; }

/* ── ALERTA DE ERRO ── */
.erro-login {
    display: none;
    align-items: center;
    gap: 8px;
    background: #fff3f3;
    border: 1.5px solid #f5c2c2;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #c62828;
    margin-bottom: 18px;
    animation: shake 0.4s ease;
}
.erro-login.visivel { display: flex; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60%  { transform: translateX(-5px); }
    40%, 80%  { transform: translateX(5px); }
}

/* ── BOTÃO ENTRAR ── */
.btn-entrar {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #0d47a1, #1e88e5);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(13, 71, 161, 0.3);
    margin-top: 4px;
}
.btn-entrar:hover         { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(13, 71, 161, 0.4); }
.btn-entrar:active        { transform: translateY(0); }
.btn-entrar.loading       { pointer-events: none; opacity: 0.7; }

/* ── RODAPÉ E AVISO ── */
.footer-text { text-align: center; font-size: 11px; color: #b0bec5; margin-top: 28px; letter-spacing: 0.5px; }

.aviso-sem-usuarios {
    background: #fffbea;
    border: 1.5px solid #ffe082;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: #7a5c00;
    margin-bottom: 18px;
    display: none;
}
.aviso-sem-usuarios.visivel { display: block; }

/* ── RESPONSIVO ── */
@media (max-width: 640px) {
    .login-wrapper { flex-direction: column; max-width: 420px; }
    .panel-brand   { flex: none; padding: 36px 24px 28px; }
    .panel-form    { padding: 36px 28px; }
}
