.app-header {
    height: 120px;
    padding: 24px 36px;
    background: var(--panel, #282828);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
    border-bottom-right-radius: 14px;
    border-bottom-left-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    position: sticky;
    top: 0;
    z-index: 70;
}

.app-header-brand,
.app-header-brand:visited,
.app-header-brand:hover,
.app-header-brand:focus {
    text-decoration: none;
    font-family: var(--serif, "Yeseva One", Georgia, serif);
    font-size: clamp(72px, 7vw, 96px);
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 22px var(--orange, #f4864d);
    user-select: none;
}

.app-header-menu-btn,
.app-header-profile-btn,
.app-header-notify-btn {
    position: absolute;
    top: 42px;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: var(--orange, #f4864d);
    cursor: pointer;
    z-index: 75;
}

.app-header-menu-btn {
    left: 36px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 0 6px;
}

.app-header-menu-btn[hidden] {
    display: none;
}

.app-header-menu-btn span {
    width: 28px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
}

.app-header-actions {
    position: absolute;
    top: 42px;
    right: 36px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.app-header-profile-btn,
.app-header-notify-btn {
    position: relative;
    top: auto;
    right: auto;
}

.app-header-profile-btn {
    display: grid;
    place-items: center;
    padding: 3px;
}

.app-header-profile-btn svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notify-btn {
    display: grid;
    place-items: center;
    padding: 0;
}

.notify-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: filter 0.18s ease;
}

.notify-btn .notify-count {
    position: absolute;
    right: -8px;
    top: -8px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--green, #407d52);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: var(--label, Raleway, Inter, Arial, sans-serif);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.notify-btn.has-unread .notify-count {
    display: inline-flex;
}

.notify-btn:hover img {
    filter: drop-shadow(0 0 10px rgba(57, 247, 89, 0.42));
}

.notification-overlay {
    position: fixed;
    inset: 0;
    z-index: 180;

    display: grid;
    place-items: center;

    padding: 24px;
    background: rgba(0, 0, 0, 0.48);

    opacity: 0;
    pointer-events: none;

    transition: opacity 0.22s ease;
}

.notification-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.notification-panel {
    width: min(755px, calc(100vw - 32px));
    height: min(600px, calc(100vh - 40px));
    position: relative;

    padding: 30px 45px 32px;
    outline: none;
    border-radius: 20px;
    background: #282828;
    color: white;
    box-shadow: 0 4px 2px 7px rgba(0, 0, 0, 0.25);

    display: flex;
    flex-direction: column;

    transform: translateY(18px) scale(0.98);
    transition: transform 0.22s ease;
}

.notification-overlay.is-open .notification-panel {
    transform: translateY(0) scale(1);
}

.notification-panel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 36px;
    align-items: center;
    gap: 24px;
}

.notification-panel h2 {
    margin: 0;
    font-family: var(--serif, "Yeseva One", Georgia, serif);
    font-size: clamp(34px, 4vw, 48px);
    font-weight: 400;
    line-height: 1;
}

.notification-filter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: white;
    cursor: pointer;
    user-select: none;
    font-family: var(--label, Raleway, Inter, Arial, sans-serif);
    font-size: 16px;
    line-height: 1.1;
}

.notification-filter > span:first-child {
    width: 147px;
}

.notification-filter input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.notification-switch {
    width: 64px;
    height: 28px;
    position: relative;
    border-radius: 999px;
    background: #353535;
}

.notification-switch::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 9px;
    width: 1px;
    height: 10px;
    background: white;
    opacity: 0.7;
}

.notification-switch::after {
    content: "";
    position: absolute;
    left: 2px;
    top: 2px;
    width: 34px;
    height: 24px;
    border-radius: 999px;
    background: white;
    transition: transform 0.2s ease;
}

.notification-filter input:checked + .notification-switch {
    background: var(--green, #407d52);
}

.notification-filter input:checked + .notification-switch::after {
    transform: translateX(26px);
}

.notification-close {
    width: 36px;
    height: 36px;
    position: relative;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.notification-close span {
    position: absolute;
    left: 5px;
    top: 16px;
    width: 26px;
    height: 3px;
    border-radius: 999px;
    background: white;
    transition:
            background 0.18s ease,
            transform 0.18s ease;
}

.notification-close span:first-child {
    transform: rotate(45deg);
}

.notification-close span:last-child {
    transform: rotate(-45deg);
}

.notification-close:hover span {
    background: var(--orange, #f4864d);
}

.notification-line {
    width: calc(100% - 30px);
    height: 1px;
    margin: 28px auto 24px;
    background: white;
}

.notification-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.notification-read-all {
    min-height: 34px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    background: transparent;
    color: white;
    cursor: pointer;
    font-family: var(--label, Raleway, Inter, Arial, sans-serif);
    font-size: 14px;
    font-weight: 700;
}

.notification-read-all:hover:not(:disabled) {
    border-color: var(--green, #407d52);
    background: rgba(64, 125, 82, 0.22);
}

.notification-read-all:disabled {
    opacity: 0.45;
    cursor: default;
}

.notification-list {
    flex: 1;
    min-height: 0;
    padding: 20px 0;
    border: 1px solid white;
    border-radius: 20px;

    display: flex;
    flex-direction: column;
    gap: 0;

    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--green, #407d52) #353535;
}

.notification-list::-webkit-scrollbar {
    width: 8px;
}

.notification-list::-webkit-scrollbar-track {
    background: #353535;
    border-radius: 999px;
}

.notification-list::-webkit-scrollbar-thumb {
    background: var(--green, #407d52);
    border-radius: 999px;
}

.notification-item {
    width: 100%;
    min-height: 84px;
    padding: 0 20px;
    border: 0;
    background: transparent;
    color: white;
    cursor: pointer;

    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: start;
    gap: 12px;

    text-align: left;
    font-family: var(--label, Raleway, Inter, Arial, sans-serif);
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.045);
}

.notification-item + .notification-item {
    margin-top: 19px;
}

.notification-check {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    border: 1px solid white;
    border-radius: 4px;
    background: #2c2c2c;
    display: grid;
    place-items: center;
}

.notification-check::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: #39f759;
    opacity: 0;
}

.notification-item.is-unread .notification-check::after {
    opacity: 1;
}

.notification-item.is-read {
    opacity: 0.64;
}

.notification-content {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.notification-title-row {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.notification-name {
    min-width: 0;
    color: white;
    overflow-wrap: anywhere;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
}

.notification-time {
    flex: 0 0 auto;
    color: #d9d9d9;
    font-size: 14px;
    line-height: 1.1;
}

.notification-message {
    margin: 0;
    color: white;
    overflow-wrap: anywhere;
    font-size: 16px;
    line-height: 1.25;
}

.notification-empty,
.notification-error {
    margin: auto;
    padding: 18px 22px;
    color: #d9d9d9;
    text-align: center;
    font-family: var(--label, Raleway, Inter, Arial, sans-serif);
    font-size: 16px;
    line-height: 1.35;
}

.notification-error {
    color: var(--peach, #ffe3d8);
}

@media (max-width: 780px) {
    .app-header {
        height: 86px;
        padding: 18px 20px;
    }

    .app-header-brand {
        font-size: clamp(44px, 14vw, 64px);
    }

    .app-header-menu-btn {
        left: 20px;
        top: 24px;
    }

    .app-header-actions {
        top: 24px;
        right: 20px;
        gap: 10px;
    }

    .app-header-profile-btn,
    .app-header-notify-btn {
        width: 34px;
        height: 34px;
    }

    .notification-panel {
        height: min(620px, calc(100vh - 24px));
        padding: 24px 20px;
    }

    .notification-panel-head {
        grid-template-columns: minmax(0, 1fr) 36px;
        gap: 16px;
    }

    .notification-filter {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: start;
    }

    .notification-close {
        grid-column: 2;
        grid-row: 1;
    }

    .notification-line {
        width: 100%;
        margin: 22px 0 18px;
    }

    .notification-list {
        padding: 16px 0;
    }

    .notification-item {
        min-height: 76px;
        padding: 0 16px;
    }
}

@media (max-width: 560px) {
    .app-header {
        justify-content: center;
    }

    .app-header-brand {
        font-size: 38px;
    }

    .notification-panel h2 {
        font-size: 34px;
    }

    .notification-filter {
        width: 100%;
        justify-content: space-between;
        font-size: 14px;
    }

    .notification-title-row {
        flex-direction: column;
        gap: 3px;
    }

    .notification-name {
        font-size: 18px;
    }

    .notification-message {
        font-size: 14px;
    }
}
