/* assets/css/header.css */

/* Container do Header */
.metria-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: var(--header-h, 72px);
    background: rgba(2, 6, 23, 0.85); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-inner {
    width: 100%;
    max-width: 1200px;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Marca e Logo --- */
.brand-box {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.2s;
}
.brand-box:hover { opacity: 0.9; }

.brand-box img {
    height: 32px;
    width: auto;
    display: block;
}

.brand-text {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    color: #ffffff !important;
    letter-spacing: -0.03em;
    line-height: 1;
    position: relative;
    display: flex;
}

.brand-text .trademark {
    font-family: 'Inter', sans-serif;
    font-size: 0.4em;
    font-weight: 400;
    color: #94a3b8;
    vertical-align: super;
    margin-left: 2px;
    opacity: 0.8;
}

/* --- Menu de Navegação --- */
.main-nav { display: flex; gap: 32px; }

.main-nav a {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.main-nav a:hover { color: #ffffff; }

/* --- Botão Login (Visitante) --- */
.btn-header {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

/* HOVER ATUALIZADO: Fundo Roxo (Primary) com Brilho */
.btn-header:hover {
    background: #4f46e5; /* Cor Primary Sólida */
    border-color: #4f46e5;
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.4); /* Glow */
    transform: translateY(-1px);
    color: white;
}

/* =========================================
   DROPDOWN & PERFIL
   ========================================= */

.user-dropdown-wrapper {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: -10px;
}

/* Botão de Perfil */
.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 14px 6px 6px; 
    border-radius: 50px; 
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4, #4f46e5); 
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 0.9rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    padding-right: 4px;
}

.user-role { font-size: 0.7rem; color: #94a3b8; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.user-name { font-size: 0.85rem; color: white; font-weight: 600; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.arrow-icon { font-size: 0.75rem; color: #94a3b8; margin-left: 4px; transition: transform 0.3s; }

.user-dropdown-wrapper:hover .arrow-icon { transform: rotate(180deg); }

/* MENU SUSPENSO */
.profile-dropdown {
    position: absolute;
    top: 100%; 
    right: 0;
    width: 220px;
    background: #0f172a; 
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    padding: 8px;
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1010;
}

.user-dropdown-wrapper:hover .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.2s;
}

.dropdown-item i { width: 18px; text-align: center; color: #94a3b8; }

.dropdown-item:hover { background: rgba(255, 255, 255, 0.05); color: white; }
.dropdown-item:hover i { color: #6366f1; }

.dropdown-item.danger:hover { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.dropdown-item.danger:hover i { color: #ef4444; }

.dropdown-divider { height: 1px; background: rgba(255, 255, 255, 0.06); margin: 6px 0; }

@media (max-width: 900px) {
    .main-nav { display: none; }
    .metria-header { padding: 0 16px; }
    .user-info, .arrow-icon { display: none; }
    .user-profile-btn { padding: 0; border: none; background: transparent; pointer-events: none; }
    .user-avatar { width: 38px; height: 38px; border: none; }
    .user-dropdown-wrapper { margin: 0; padding: 0; }
    .profile-dropdown { display: none; } 
}