/* ------------- Estilos header -------------  */

.header {
    height: 64px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(15, 142, 162, 0.2);
    background: transparent;
    backdrop-filter: none;

}

.header-heading {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    max-width: 520px;
    gap: 10px;
    color: var(--primary-color);
}

.header-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
}

.header-back:hover {
    background: var(--primary-100);
}

.header-back:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.header-title {
    margin: 0;
    min-width: 0;
    color: inherit;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #445268;
}

.icon-button {
        background: white;
        border: 1px solid rgba(15, 142, 162, 0.18);
        padding: 6px;
        border-radius: var(--radius-md);
        color: inherit;
        box-shadow: 0 8px 14px rgba(16, 24, 40, 0.08);
        transition:
            transform 0.2s ease,
            border-color 0.2s ease,
            box-shadow 0.2s ease;
    }

.icon-button:hover {
        border-color: rgba(15, 142, 162, 0.45);
        transform: translateY(-1px);
}

.nav-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: auto;
    padding: 0;
}

.nav-mobile-toggle svg {
    display: block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-mobile-toggle .icon {
    stroke-width: 2;
}

.settings-menu,
.account-menu {
    position: relative;
}

.settings-menu summary,
.account-menu summary {
    list-style: none;
}

.settings-menu summary::-webkit-details-marker,
.account-menu summary::-webkit-details-marker {
    display: none;
}

.settings-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.settings-toggle svg {
    display: block;
}

.settings-dropdown,
.account-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: white;
    border: 1px solid var(--border-color-gray);
    border-radius: var(--radius-md);
    box-shadow: 0 14px 30px var(--shadow-100);
    padding: 8px;
    z-index: 90040;
}

.settings-dropdown {
    min-width: 230px;
}

.account-dropdown {
    min-width: 180px;
}

.settings-action,
.account-action {
    width: 100%;
    border: 0;
    background: transparent;
    color: #1f2937;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
}

.settings-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.account-action {
    padding: 8px 12px;
}

.settings-action:hover,
.settings-action.active,
.account-action:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

.header-divider {
    width: 1px;
    height: 24px;
    background-color: rgba(15, 142, 162, 0.28);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    background: white;
    border: 1px solid rgba(15, 142, 162, 0.18);
    padding: 4px;
    border-radius: 999px;
    box-shadow: 0 8px 16px rgba(16, 24, 40, 0.08);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.header-user:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 142, 162, 0.48);
    box-shadow: 0 12px 20px rgba(16, 24, 40, 0.12);
}

.header-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.header-avatar-photo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.header-caret {
    width: 16px;
    height: 16px;
}

.header-user::after {
    display: none;
}

@media screen and (max-width: 600px) {
    .header {
        height: auto;
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .header-actions {
        order: -1;
        justify-content: flex-end;
    }

    .nav-mobile-toggle {
        display: inline-flex;
    }

    .header-name,
    .header-caret,
    .header-divider {
        display: none;
    }

    .settings-dropdown {
        right: auto;
        left: 50%;
        min-width: 220px;
        transform: translateX(-50%);
    }

    .header-heading {
        max-width: 100%;
    }

    .header-title {
        max-width: 100%;
        font-size: 1.15rem;
    }
}
