/* ============================================================
   ESTILOS DE AUTENTICAÇÃO - Login/Cadastro
   ============================================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0f16 0%, #1a2a3a 50%, #0f1722 100%);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-box {
    background: var(--bg-panel);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

/* ============ Header ============ */
.auth-header {
    padding: 30px 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, #2a4a6a 0%, #1a3a5a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-header h1 {
    font-size: 22px;
    font-weight: 600;
    color: white;
    margin: 0 0 8px 0;
}

.auth-header p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* ============ Tabs ============ */
.auth-tabs {
    display: flex;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.auth-tab:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.03);
}

.auth-tab.active {
    color: var(--primary-color);
    background: var(--bg-panel);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

/* ============ Form ============ */
.auth-form {
    display: none;
    padding: 25px 30px;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 14px;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.15);
}

.form-group input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* ============ Options ============ */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
}

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

.remember-me input,
.terms-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.forgot-link,
.terms-check a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

.forgot-link:hover,
.terms-check a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ============ Button ============ */
.auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a7bd5 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.35);
}

.auth-btn:active:not(:disabled) {
    transform: translateY(0);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============ Messages ============ */
.auth-message {
    margin-top: 15px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    display: none;
}

.auth-message:not(:empty) {
    display: block;
}

.auth-message.success {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.auth-message.error {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* ============ Footer ============ */
.auth-footer {
    padding: 15px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-dark);
}

.auth-footer p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============ User Menu (para index.html) ============ */
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-dark);
    border-radius: 8px;
    margin: 10px 16px;
    border: 1px solid var(--border-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a7bd5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    padding: 6px 10px;
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 6px;
    color: #f44336;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(244, 67, 54, 0.25);
}

/* ============ Responsivo ============ */
@media screen and (max-width: 480px) {
    .auth-container {
        max-width: 100%;
    }
    
    .auth-box {
        border-radius: 12px;
    }
    
    .auth-header {
        padding: 25px 20px 18px;
    }
    
    .auth-header h1 {
        font-size: 20px;
    }
    
    .auth-form {
        padding: 20px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
