/* ========================================
   Header Compartilhado - ZEG Biogás
   ======================================== */
/* ORIGINAL
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(12, 16, 23, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #2a3444;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #f0f4f8;
}*/

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #2a3444;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #f05f45;
}

.header-logo-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Botão de Login (quando não está logado) */
.btn-header-login {
    padding: 0.625rem 1.25rem;
    background:#201e5f;
    border: 1px solid #333080;
    border-radius: 8px;
    color: #f0f4f8;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-header-login:hover {
    border-color: #f05f45;
    color: #f05f45;
}

/* Container do perfil do usuário */
.user-profile-container {
    position: relative;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background:#201e5f;
    border: 1px solid #333080;
    border-radius: 10px;
    color: #f0f4f8;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-profile-btn:hover {
    border-color: #f05f45;
}

.user-profile-btn.active {
    border-color: #f05f45;
    background: #4540cf96;
 
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f05f45, #e7563d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
}

.user-name {
    font-weight: 500;
    font-size: 0.9375rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chevron {
    transition: transform 0.2s ease;
    color: #8b97a8;
}

.user-profile-btn.active .user-chevron {
    transform: rotate(180deg);
}

/* Dropdown do perfil */
.user-profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    max-width: 400px;
    width: max-content;
    background:white;
    border: 1px solid #333080;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    opacity: 1;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.user-profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 1.25rem;
    border-bottom: 1px solid #2a3444;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg,  #f05f45, #e7563d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
}

.dropdown-user-info {
    flex: 1;
    overflow: hidden;
}

.dropdown-user-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-word;
}

.dropdown-user-email {
    color:  #333080;
    font-size: 0.8125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-all;
}

.dropdown-body {
    padding: 0.75rem;
}

.dropdown-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #333080;
    font-size: 0.9375rem;
    transition: background 0.2s ease;
    align-items: flex-start;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-item svg {
    color: #333080;
    flex-shrink: 0;    /* Ícone não encolhe */
    margin-top: 2px;
}

.dropdown-item-value {
    margin-left: auto;
    color: #f05f45;
    font-weight: 500;
    font-size: 0.875rem;
    text-align: right;
    word-break: break-word;
    max-width: 200px; 
}

.dropdown-divider {
    height: 1px;
    background: #2a3444;
    margin: 0.5rem 0;
}

.dropdown-footer {
    padding: 0.75rem;
    border-top: 1px solid #2a3444;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: rgb(239, 68, 68);
    border: 1px solid rgb(239, 68, 68);
    border-radius: 8px;
    color:  #fca5a5;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: rgba(185, 34, 34, 0.986);
    border-color: rgb(223, 54, 54);
}

/* Espaçador para compensar o header fixo */
.header-spacer {
    height: 72px;
}

/* Status badge */
.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid #cf4830;
    border-radius: 100px;
    font-size: 0.875rem;
    color:  #f05f45;
}

.status-dot {
    width: 8px;
    height: 8px;
    background:  #f05f45;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px transparent; }
}

/* Responsive */
@media (max-width: 640px) {
    .app-header {
        padding: 1rem;
    }

    .header-logo-text {
        display: none;
    }

    .user-name {
        display: none;
    }

    .user-profile-dropdown {
        width: calc(100vw - 2rem);
        right: -1rem;
    }
}
