.app-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 90%;
    padding: 10px 28px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.45);
    box-shadow: 0 16px 45px rgba(40, 100, 180, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.app-header-welcome {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.app-header-avatar {
    display: grid;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border-radius: 10%;
    place-items: center;
    background: linear-gradient(135deg, #4d91ff, #55cfff);
    box-shadow: 0 10px 24px rgba(52, 120, 232, 0.24);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.app-header-avatar[href] {
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.app-header-avatar[href]:hover,
.app-header-avatar[href]:focus-visible {
    box-shadow: 0 14px 28px rgba(52, 120, 232, 0.34);
    outline: 2px solid rgba(52, 120, 232, 0.48);
    outline-offset: 3px;
    transform: translateY(-2px);
}
.app-header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.app-header-welcome h1 { margin: 0 0 6px; font-size: 1.3rem; color: #20324d; }
.app-header-welcome p { margin: 0; max-width: 580px; color: #5f6f86; font-size: 0.8rem; line-height: 1.7; }

.app-header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.app-header-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    color: #35506f;
    font-weight: 700;
    text-decoration: none;
    transition: 0.25s ease;
}
.app-header-actions a:hover { transform: translateY(-2px); background: transparent; color: #1f4a8f; }
.app-header-actions a.active {
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 10px 24px rgba(40, 100, 180, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.app-header-dropdown { position: relative; }
.app-header-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    color: #35506f;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}
.app-header-dropdown-toggle span { font-size: 0.8rem; transition: transform 0.2s ease; }
.app-header-dropdown.is-open .app-header-dropdown-toggle span { transform: rotate(180deg); }
.app-header-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: none;
    min-width: 190px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 35px rgba(40, 100, 180, 0.16);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.app-header-dropdown.is-open .app-header-dropdown-menu { display: grid; gap: 4px; }
.app-header-dropdown-menu a { justify-content: flex-start; padding: 9px 12px; box-shadow: none; }

.app-header-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
}
.app-header-toggle span { display: block; width: 22px; height: 3px; margin: 4px auto; border-radius: 999px; background: #284b77; }
.app-header-spacer { height: 116px; }

@media (max-width: 900px) {
    .app-header { flex-wrap: wrap; align-items: flex-start; }
    .app-header-toggle { display: block; }
    .app-header-actions { display: none; width: 100%; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.7); }
    .app-header.menu-open .app-header-actions { display: flex; flex-direction: column; align-items: stretch; }
    .app-header-actions a, .app-header-dropdown-toggle { justify-content: flex-start; width: 100%; }
    .app-header-dropdown { width: 100%; }
    .app-header-dropdown-menu { position: static; min-width: 0; margin-top: 8px; box-shadow: none; }
}

@media (max-width: 640px) {
    .app-header { width: 92%; padding: 14px; gap: 12px; border-radius: 20px; }
    .app-header-avatar { flex-basis: 40px; width: 40px; height: 40px; }
    .app-header-welcome { gap: 10px; }
    .app-header-welcome h1 { font-size: 1rem; }
    .app-header-welcome p { display: none; }
    .app-header-spacer { height: 94px; }
}