html[data-auth-recheck] {
    visibility: hidden;
}

.app-header[data-staff-header] {
    overflow: visible;
    gap: clamp(1rem, 2vw, 2rem);
}

[data-staff-header] [hidden] {
    display: none !important;
}

.app-header .staff-header-actions {
    gap: 1rem;
    align-self: stretch;
    padding-left: 1.1rem;
    border-left: 1px solid rgba(66, 122, 198, 0.34);
    margin-block: 1rem;
}

.staff-header-control {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.staff-user {
    padding-left: 1rem;
    border-left: 1px solid rgba(66, 122, 198, 0.34);
}

.staff-notification-toggle,
.staff-user-toggle,
.staff-panel-close,
.staff-candidate-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 0.7rem;
    color: #e5f0ff;
    background: transparent;
    cursor: pointer;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.staff-notification-toggle {
    position: relative;
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 50%;
    color: #c6e2ff;
}

.staff-notification-toggle > svg {
    width: 1.65rem;
    height: 1.8rem;
    filter: drop-shadow(0 0 5px rgba(23, 198, 255, 0.6));
}

.staff-notification-count {
    position: absolute;
    top: -0.05rem;
    right: -0.08rem;
    display: grid;
    place-items: center;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    color: #fff;
    background: #f6374c;
    box-shadow: 0 0 12px rgba(246, 55, 76, 0.4);
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
}

.staff-user-toggle {
    justify-content: flex-start;
    gap: 0.65rem;
    min-height: 3rem;
    text-align: left;
    border-radius: 999px;
}

.staff-user-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 2.8rem;
    width: 2.8rem;
    height: 2.8rem;
    border: 1.5px solid #24cfff;
    border-radius: 50%;
    color: #e9f3ff;
    background: radial-gradient(circle at 50% 30%, #102542, #061025 75%);
    box-shadow: 0 0 0 3px rgba(21, 194, 255, 0.06), 0 0 15px rgba(12, 191, 255, 0.17);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;
}

.staff-user-avatar svg {
    width: 1.45rem;
    height: 1.45rem;
}

.staff-user-summary {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
    max-width: 9.75rem;
}

.staff-user-name,
.staff-user-role {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.staff-user-name {
    color: #f2f6ff;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
}

.staff-user-role {
    color: #afbed6;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.25;
}

.staff-user-chevron {
    display: grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 50%;
    color: #13c9ff;
    background: rgba(8, 26, 57, 0.4);
}

.staff-user-chevron svg {
    width: 1.1rem;
    height: 1.1rem;
    transition: transform 160ms ease;
}

.staff-user-toggle[aria-expanded="true"] .staff-user-chevron svg {
    transform: rotate(180deg);
}

.staff-notification-toggle:hover,
.staff-notification-toggle[aria-expanded="true"],
.staff-user-toggle:hover,
.staff-user-toggle[aria-expanded="true"],
.staff-panel-close:hover {
    background: rgba(25, 83, 136, 0.2);
}

[data-staff-header] button:focus-visible,
[data-staff-header] a:focus-visible,
.staff-header-panel:focus-visible {
    outline: 2px solid #40d6ff;
    outline-offset: 3px;
}

.staff-header-panel {
    position: absolute;
    top: calc(100% + 1rem);
    right: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: min(25rem, calc(100vw - 2rem));
    max-height: min(36rem, calc(100vh - 6rem));
    max-height: min(36rem, calc(100dvh - 6rem));
    overflow: hidden;
    border: 1px solid rgba(56, 139, 214, 0.55);
    border-radius: 1rem;
    color: #e4edfc;
    background: #07152d;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.48), 0 0 25px rgba(0, 145, 255, 0.08);
    font-size: 0.84rem;
    line-height: 1.5;
    text-align: left;
}

.staff-user-panel {
    width: min(20rem, calc(100vw - 2rem));
}

.staff-panel-heading {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.5rem;
    min-height: 3.75rem;
    padding: 0.5rem 0.75rem 0.5rem 1.1rem;
    border-bottom: 1px solid rgba(72, 118, 178, 0.24);
    background: #0a1933;
}

.staff-panel-heading h2 {
    flex: 1 1 auto;
    margin: 0;
    color: #f1f6ff;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.3;
}

.staff-text-action {
    flex-shrink: 0;
    min-height: 2.75rem;
    padding: 0.35rem 0.2rem;
    border: 0;
    border-radius: 0.3rem;
    color: #48cfff;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.staff-text-action:hover:not(:disabled) {
    color: #a7eaff;
}

.staff-text-action:disabled {
    color: #73829a;
    cursor: default;
}

.staff-panel-close {
    width: 2.75rem;
    height: 2.75rem;
    color: #adbed8;
}

.staff-panel-close svg {
    width: 1.1rem;
    height: 1.1rem;
}

.staff-panel-content {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #31527b #07152d;
}

.staff-notification-status {
    margin: 0;
    padding: 1.6rem 1.1rem;
    color: #b4c5df;
    line-height: 1.65;
}

.staff-retry-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    margin: 0 1.1rem 1.1rem;
    padding: 0.5rem 1rem;
    border: 1px solid #28659b;
    border-radius: 0.55rem;
    color: #d8f3ff;
    background: #0d2c4d;
    cursor: pointer;
    font: inherit;
}

.staff-notification-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.staff-notification-item + .staff-notification-item {
    border-top: 1px solid rgba(72, 118, 178, 0.2);
}

.staff-notification-link {
    position: relative;
    display: grid;
    gap: 0.3rem;
    width: 100%;
    padding: 1rem 1.1rem 1rem 1.45rem;
    border: 0;
    color: #dfeafd;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.staff-notification-item.is-unread {
    background: rgba(20, 83, 139, 0.2);
}

.staff-notification-item.is-unread .staff-notification-link::before {
    position: absolute;
    top: 1.3rem;
    left: 0.55rem;
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 50%;
    background: #34d0ff;
    content: "";
}

.staff-notification-link:hover {
    background: rgba(32, 102, 165, 0.17);
}

.staff-header-actions button[aria-busy="true"] {
    cursor: progress;
    opacity: 0.65;
}

.staff-notification-link:focus-visible {
    outline-offset: -4px !important;
}

.staff-notification-type {
    color: #78cfff;
    font-size: 0.71rem;
    font-weight: 600;
}

.staff-notification-title {
    color: #eef4ff;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.4;
}

.staff-notification-detail {
    color: #b8c8df;
    font-size: 0.79rem;
}

.staff-notification-time {
    margin-top: 0.1rem;
    color: #8fa7c7;
    font-size: 0.7rem;
}

.staff-user-identity {
    display: grid;
    gap: 0.35rem;
    padding: 1.05rem 1.1rem;
    border-bottom: 1px solid rgba(72, 118, 178, 0.2);
    overflow-wrap: anywhere;
}

.staff-user-identity strong {
    color: #f2f6ff;
    font-size: 0.95rem;
    font-weight: 700;
}

.staff-user-login,
.staff-user-email {
    color: #aabbD4;
    font-size: 0.78rem;
}

.staff-user-role-label {
    justify-self: start;
    margin-top: 0.25rem;
    padding: 0.15rem 0.6rem;
    border: 1px solid rgba(53, 153, 206, 0.3);
    border-radius: 999px;
    color: #94dfff;
    background: rgba(17, 92, 134, 0.15);
    font-size: 0.7rem;
}

.staff-user-links {
    display: grid;
    gap: 0.15rem;
    padding: 0.5rem;
}

.staff-user-links a,
.staff-logout-button {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 2.85rem;
    padding: 0.6rem 0.7rem;
    border-radius: 0.55rem;
    color: #dce8fc;
    text-decoration: none;
    font: inherit;
    line-height: 1.4;
}

.staff-user-links a svg,
.staff-logout-button svg {
    flex: 0 0 1.2rem;
    width: 1.2rem;
    height: 1.2rem;
    color: #83b6df;
}

.staff-user-links a:hover {
    color: #fff;
    background: rgba(27, 94, 153, 0.23);
}

.staff-logout-form {
    margin: 0;
    padding: 0.5rem;
    border-top: 1px solid rgba(72, 118, 178, 0.2);
}

.staff-logout-button {
    width: 100%;
    border: 0;
    color: #f5b5be;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.staff-logout-button svg {
    color: #df9fae;
}

.staff-logout-button:hover {
    background: rgba(139, 53, 75, 0.2);
}

.staff-candidate-logout {
    padding-inline: 0.85rem;
    border-color: rgba(70, 135, 200, 0.4);
    font-size: 0.84rem;
}

.staff-profile-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.staff-profile-field {
    display: grid;
    align-content: start;
    gap: 0.5rem;
    min-width: 0;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(56, 139, 214, 0.4);
    border-radius: 0.8rem;
    background: rgba(6, 24, 53, 0.58);
}

.staff-profile-field dt {
    color: #afc2dc;
    font-size: 0.8rem;
}

.staff-profile-field dd {
    margin: 0;
    color: #edf4ff;
    font-size: 1rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

@media (max-width: 1400px) {
    .staff-user-summary {
        display: none;
    }

    .app-header .staff-header-actions {
        gap: 0.6rem;
        padding-left: 0.7rem;
    }

    .staff-user {
        padding-left: 0.6rem;
    }
}

@media (max-width: 1180px) {
    .app-header[data-staff-header] {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 0.65rem;
        height: 4rem;
    }

    .app-header[data-staff-header] > .site-logo {
        grid-column: 1;
        grid-row: 1;
    }

    .app-header[data-staff-header] .nav-toggle {
        grid-column: 3;
        grid-row: 1;
        width: 2.75rem;
        min-height: 2.75rem;
    }

    .app-header[data-staff-header] .app-header-actions,
    .app-header[data-staff-header].is-open .app-header-actions {
        display: flex;
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-end;
        flex-wrap: nowrap;
        align-self: center;
        margin-block: 0;
    }

    .app-header[data-staff-header] .main-nav {
        position: absolute;
        top: calc(100% + 0.5rem);
        right: 0.75rem;
        left: 0.75rem;
        max-height: calc(100dvh - 5.5rem);
        overflow: auto;
        padding: 1rem;
        border: 1px solid rgba(56, 139, 214, 0.55);
        border-radius: 0.8rem;
        background: #07152d;
        box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
    }

    .staff-header-panel {
        top: calc(100% + 0.75rem);
        max-height: calc(100vh - 5.5rem);
        max-height: calc(100dvh - 5.5rem);
    }
}

@media (max-width: 600px) {
    .staff-profile-details {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-header[data-staff-header] {
        gap: 0.35rem;
        padding-inline: 0.75rem;
    }

    .app-header[data-staff-header] .site-logo {
        width: auto;
        gap: 0.4rem;
    }

    .app-header[data-staff-header] .site-logo__text {
        font-size: 1.05rem;
    }

    .app-header[data-staff-header] .site-logo__icon {
        width: 1.85rem !important;
        height: 2.2rem !important;
    }

    .app-header .staff-header-actions {
        gap: 0.3rem;
        padding-left: 0;
        border-left: 0;
    }

    .staff-user {
        padding-left: 0;
        border-left: 0;
    }

    .staff-user-toggle {
        min-height: 2.75rem;
    }

    .staff-user-avatar {
        flex-basis: 2.6rem;
        width: 2.6rem;
        height: 2.6rem;
        font-size: 0.95rem;
    }

    .staff-user-chevron {
        display: none;
    }

    .staff-header-control {
        position: static;
    }

    .staff-header-panel {
        top: calc(100% + 0.5rem);
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
        max-width: none;
    }

    .staff-panel-heading {
        gap: 0.3rem;
        padding-left: 0.9rem;
        padding-right: 0.5rem;
    }

    .staff-panel-heading h2 {
        font-size: 0.87rem;
    }

    .staff-text-action {
        font-size: 0.71rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .staff-user-chevron svg {
        transition: none;
    }
}
