:root {
    /* Paleta de Cores Sofisticada */
    --color-primary: #7A1E3C;     /* Vinho principal (Botão e Foco) */
    --color-dark: #5E1830;        /* Vinho escuro (Títulos e Hover do botão) */
    --color-muted: #A56A7E;       /* Rosa velho (Subtítulos e labels leves) */
    --color-offwhite: #F7F1F3;    /* Fundo do card de vidro (levemente rosado) */
    --color-accent: #C8B08A;      /* Dourado (Link de 'Esqueceu a senha') */
    
    --text-dark: #1a1a1a;
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body, html {
    height: 100%;
    width: 100%;
}

/* Background com a CORREÇÃO do arquivo .png */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center; /* Centraliza perfeitamente o formulário */
    background: url('../assets/login-background.png') no-repeat center center/cover;
    position: relative;
    padding: 2rem;
}

.login-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glassmorphism Card Atualizado */
.glass-card {
    /* Usando a cor offwhite da paleta com transparência (0.65) */
    background: rgba(247, 241, 243, 0.65); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4); /* Borda sutil */
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 12px 40px rgba(94, 24, 48, 0.12); /* Sombra baseada no tom escuro */
}

/* Header & Logo */
.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-logo {
    width: 70px; /* Ajuste este tamanho conforme sua logo original */
    height: auto;
    object-fit: contain;
    margin-bottom: 1rem;
}

.card-header h1 {
    font-size: 1.5rem;
    color: var(--color-dark); /* Vinho escuro no título */
    margin-bottom: 0.25rem;
}

.card-header p {
    font-size: 0.85rem;
    color: var(--color-muted); /* Rosa velho no subtítulo */
}

/* Form Inputs */
.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-dark); /* Label em vinho escuro */
    margin-bottom: 0.4rem;
}

.input-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 25px;
    border: 1px solid transparent;
    background: #ffffff;
    font-size: 0.85rem;
    color: var(--text-dark);
    outline: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--color-primary); /* Borda vinho ao focar */
}

.input-group input::placeholder {
    color: #a0a0a0;
}

/* Password Visibility Toggle */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 2.75rem; /* Evita que o texto da senha sobreponha o ícone */
}

.toggle-password-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: color 0.2s;
    outline: none;
}

.toggle-password-btn:hover {
    color: var(--color-primary);
}

/* Submit Button com as cores da paleta */
.btn-submit {
    width: 100%;
    background: var(--color-primary); /* Vinho principal */
    color: #ffffff;
    border: none;
    border-radius: 25px;
    padding: 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(122, 30, 60, 0.3); /* Sombra suave na cor primária */
}

.btn-submit:hover {
    background: var(--color-dark); /* Vinho mais escuro no hover */
}

.btn-submit:active {
    transform: scale(0.98); /* Efeito de clique */
}

/* Card Footer */
.card-footer {
    text-align: center;
    font-size: 0.85rem;
}

.forgot-password {
    color: var(--color-accent); /* Dourado para o link */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: var(--color-dark); /* Vinho escuro ao passar o mouse */
}

/* Login Error Message */
.login-error {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideInError 0.3s ease-out;
    transition: opacity 0.3s;
}

@keyframes slideInError {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading spinner for button */
.btn-submit .fa-spinner {
    margin-right: 6px;
}

.btn-submit .fa-check {
    margin-right: 6px;
}