:root {
    --primary-gradient: linear-gradient(135deg, #b91d1d 0%, #0a2342 100%);
    --accent-color: #0a2342;
    --text-color: #333;
    --text-muted: #888;
    --bg-light: #f4f7f6;
    --white: #ffffff;
    --input-bg: #f0f2f5;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    height: 100vh;
    width: 100%;
    overflow: hidden; /* Evita rolagem na tela cheia */
}

.login-container {
    display: flex;
    height: 100%;
    width: 100%;
}

/* --- LADO ESQUERDO (Visual/Marca) --- */
.brand-section {
    flex: 1;
    background: var(--primary-gradient);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Efeito decorativo de fundo (círculos sutis) */
.brand-section::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}
.brand-section::after {
    content: '';
    position: absolute;
    bottom: -5%;
    right: -5%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.brand-content {
    z-index: 2;
    text-align: center;
}

.brand-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.brand-logo {
    max-width: 450px;
    width: 90%;
    height: auto;
    margin-bottom: 0;
    animation: float 3s ease-in-out infinite;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.brand-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 300;
}

/* Animação suave do ícone */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- LADO DIREITO (Formulário) --- */
.form-section {
    flex: 1; /* Ocupa metade da tela */
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.mobile-logo {
    display: none; /* Escondido em Desktop */
    text-align: center;
    margin-bottom: 2rem;
}

.brand-logo-mobile {
    max-width: 200px;
    height: auto;
}

.form-header {
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Estilo dos Inputs */
.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    transition: var(--transition);
}

.form-control {
    width: 100%;
    padding: 12px 15px 12px 45px; /* Espaço para o ícone */
    border: 2px solid transparent;
    background-color: var(--input-bg);
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

/* Estado de Foco */
.form-control:focus {
    background-color: #fff;
    border-color: #0a2342; /* Azul da marca */
    box-shadow: 0 0 0 4px rgba(10, 35, 66, 0.1);
}

.form-control:focus + i {
    color: #0a2342;
}

/* Links e Botão */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    cursor: pointer;
}

.forgot-password {
    color: #b91d1d; /* Vermelho da marca */
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}
.forgot-password:hover { text-decoration: underline; }

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(10, 35, 66, 0.2);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 35, 66, 0.3);
}

.footer-text {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 768px) {
    .brand-section {
        display: none; /* Esconde a parte colorida em telas pequenas */
    }

    .mobile-logo {
        display: block; /* Mostra logo no topo do form */
    }
    .mobile-logo i {
        font-size: 3rem;
        color: #b91d1d; /* Vermelho */
    }

    .form-section {
        background: var(--bg-light); /* Fundo levemente cinza no mobile */
    }

    .login-box {
        background: white;
        padding: 2rem;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    }
}

/* --- Install App Button --- */
.install-app-btn {
    display: none; /* Controlled by JS */
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #0a2342;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.install-app-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    background-color: #153c6b;
}

.install-app-btn i {
    font-size: 1.1rem;
}

/* --- iOS Install Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: modalSlideUp 0.3s ease-out;
}

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

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #333;
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-header i {
    font-size: 3rem;
    color: #333;
    margin-bottom: 10px;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
}

.modal-body ol {
    padding-left: 20px;
    color: #555;
    line-height: 1.6;
}

.modal-body li {
    margin-bottom: 10px;
}

/* --- Password Strength Meter --- */
.strength-meter-container {
    margin-bottom: 1rem;
}

.strength-bar-bg {
    width: 100%;
    height: 6px;
    background-color: #eee;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-bar {
    height: 100%;
    width: 0%;
    background-color: #dc3545; /* Starts Red */
    transition: width 0.3s, background-color 0.3s;
}

.strength-text {
    font-size: 0.8rem;
    color: #666;
    text-align: right;
}

/* --- Validation List --- */
.validation-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.validation-list li {
    margin-bottom: 5px;
    color: #dc3545; /* Invalid color */
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.validation-list li.valid {
    color: #198754; /* Success color */
}

.validation-list li i {
    font-size: 0.5rem;
}
