/* ============================================
   RESET E VARIÁVEIS
   ============================================ */
:root {
    --maple-red: #B31B1B;
    --maple-gold: #FFD700;
    --maple-white: #FFFFFF;
    --maple-gray: #F5F5F5;
    --maple-dark-gray: #333333;
    --maple-light-gray: #E0E0E0;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--maple-gray);
    color: var(--maple-dark-gray);
    line-height: 1.6;
}

/* ============================================
   TELA DE LOGIN
   ============================================ */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #B31B1B 0%, #8B0000 50%, #6B0000 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 960px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    min-height: 540px;
}

.login-left {
    flex: 0 0 45%;
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #e0e0e0;
}

.logo-section {
    text-align: center;
}

.logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.logo-bear {
    position: relative;
}

.bear-icon {
    font-size: 120px;
    filter: drop-shadow(0 4px 8px rgba(179, 27, 27, 0.2));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.logo-text-wrapper {
    text-align: center;
}

.brand-name {
    font-size: 2.8rem;
    font-weight: 700;
    color: #B31B1B;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: #666;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-right {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    align-items: center;
}

.login-content {
    width: 100%;
}

.login-title {
    font-size: 1.6rem;
    color: #333;
    margin-bottom: 40px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.login-form .form-group {
    margin-bottom: 25px;
}

.login-form label {
    display: block;
    margin-bottom: 10px;
    color: #555;
    font-weight: 500;
    font-size: 0.9rem;
}

.login-form label i {
    margin-right: 6px;
    color: #B31B1B;
}

.input-wrapper {
    position: relative;
}

.login-form input {
    width: 100%;
    padding: 14px 45px 14px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    background: #fafafa;
}

.login-form input:focus {
    outline: none;
    border-color: #B31B1B;
    background: white;
    box-shadow: 0 0 0 4px rgba(179, 27, 27, 0.1);
}

.login-form input::placeholder {
    color: #999;
}

.login-form input.error {
    border-color: var(--danger);
    background: #fff5f5;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
    z-index: 10;
}

.toggle-password:hover {
    color: #B31B1B;
}

.error-message {
    display: block;
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 6px;
    min-height: 18px;
    font-weight: 500;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    margin-top: 10px;
}

.btn-login:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 30px;
    text-align: center;
}

.login-footer p {
    color: #888;
    font-size: 0.85rem;
}

.login-footer i {
    color: #B31B1B;
    margin-right: 5px;
}

/* ============================================
   MODAIS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--maple-white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    color: var(--maple-red);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
}

.lgpd-content {
    margin-bottom: 25px;
}

.lgpd-content p {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.6;
}

.lgpd-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.lgpd-content li {
    margin-bottom: 10px;
    color: #666;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    padding: 12px 30px;
    background: var(--maple-gold);
    color: var(--maple-dark-gray);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: #E6C200;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Modal de Alerta */
.modal-alert {
    text-align: center;
    max-width: 400px;
}

.alert-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.alert-icon.success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.alert-icon.error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.alert-icon.warning {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning);
}

.alert-icon.info {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info);
}

.modal-alert h3 {
    margin-bottom: 15px;
    color: var(--maple-dark-gray);
}

.modal-alert p {
    margin-bottom: 25px;
    color: #666;
    line-height: 1.6;
}

/* Responsividade */
@media (max-width: 768px) {
    .login-box {
        flex-direction: column;
        min-height: auto;
    }
    
    .login-left {
        flex: none;
        padding: 40px 20px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .bear-icon {
        font-size: 80px;
    }
    
    .brand-name {
        font-size: 2rem;
    }
    
    .brand-subtitle {
        font-size: 0.65rem;
    }
    
    .login-right {
        padding: 40px 30px;
    }
    
    .login-title {
        font-size: 1.3rem;
        margin-bottom: 30px;
    }

    .modal-content {
        padding: 30px 20px;
    }
}

/* Smartphones (até 480px) */
@media (max-width: 480px) {
    .login-right {
        padding: 30px 20px;
    }
    
    .login-left {
        padding: 30px 15px;
    }
    
    .bear-icon {
        font-size: 60px;
    }
    
    .brand-name {
        font-size: 1.6rem;
    }
    
    .login-title {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .form-group input {
        font-size: 16px; /* Evita zoom automático no iOS */
        padding: 14px 16px;
    }
    
    .btn-login {
        padding: 14px;
        font-size: 1rem;
    }
    
    .brand-subtitle {
        font-size: 0.6rem;
    }
}
