/* --- TELA DE AUTENTICAÇÃO (O PORTÃO) --- */
#auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(175, 144, 97, 0.04) 0%, transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(100, 100, 100, 0.05) 0%, transparent 30%);
}

.auth-card {
    width: 400px;
    max-width: 90%;
    background: rgba(20, 20, 20, 0.7); /* Cinza translúcido */
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
    text-align: center;
    position: relative;
    overflow: hidden;
}
[data-theme="light"] .auth-card {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 16px 48px rgba(0,0,0,0.1);
}

[data-theme="light"] #auth-screen {
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 0, 0, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(175, 144, 97, 0.04) 0%, transparent 20%);
}

[data-theme="light"] .auth-logo {
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.2));
}

/* Linha Topo (Bege Executivo) */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #444, var(--accent-color), #444);
}

.auth-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(175, 144, 97, 0.3));
}
[data-theme="dark"] .auth-logo { filter: invert(1); }

.auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Formulário */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-input-group {
    position: relative;
    text-align: left;
}

.auth-input-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 600;
}

.auth-input {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.auth-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 12px rgba(var(--accent-color-rgb), 0.15);
}

.auth-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

.btn-auth {
    margin-top: 10px;
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Switcher (Login vs Registro) */
.auth-switch {
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-link {
    color: var(--text-primary);
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    margin-left: 5px;
    border-bottom: 1px dotted var(--text-secondary);
}
.auth-link:hover { color: var(--accent-color); border-bottom-color: var(--accent-color); }

.password-wrapper {
    position: relative;
}
.password-wrapper .auth-input {
    padding-right: 42px;
}
.eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.eye-btn:hover { color: var(--text-primary); }

.error-msg {
    color: #d9534f;
    font-size: 0.85rem;
    margin-top: 10px;
    display: none;
    background: rgba(217, 83, 79, 0.1);
    padding: 10px;
    border-radius: 6px;
    border: 1px solid rgba(217, 83, 79, 0.3);
}