/* Staff teamet – directory + inspector */

main.staff-page {
    padding: 0 0 4rem;
    min-height: 100vh;
}

/* Hero (samme idé som applications-hero) */
.staff-hero {
    position: relative;
    padding: 5.5rem 0 2.5rem;
    margin-bottom: 1.75rem;
    overflow: hidden;
    text-align: center;
}

.staff-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 75% 55% at 50% -25%, rgba(0, 255, 136, 0.14), transparent 55%),
        radial-gradient(ellipse 45% 35% at 15% 55%, rgba(0, 200, 255, 0.05), transparent 50%),
        linear-gradient(180deg, rgba(11, 15, 13, 0.92) 0%, var(--charcoal) 100%);
    pointer-events: none;
}

.staff-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.02) 2px,
        rgba(255, 255, 255, 0.02) 3px
    );
    pointer-events: none;
}

.staff-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 40rem;
    margin: 0 auto;
}

.staff-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--matrix-green);
    margin: 0 0 0.75rem;
}

.staff-hero-kicker i {
    font-size: 0.9rem;
    opacity: 0.9;
}

.staff-hero .page-title,
.staff-hero-title {
    font-size: clamp(2rem, 5vw, 2.85rem);
    font-weight: 700;
    color: var(--white);
    margin: 0 0 0.65rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.staff-hero .page-intro,
.staff-hero-intro {
    color: var(--gray-light);
    text-align: center;
    margin: 0 auto;
    max-width: 34rem;
    line-height: 1.55;
    font-size: 1.05rem;
}

/* Shell + grid */
.staff-page-shell {
    max-width: 1120px;
}

.staff-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
    gap: 1.75rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .staff-page-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.staff-directory-card,
.staff-inspector-card {
    position: relative;
    background: linear-gradient(145deg, rgba(22, 28, 26, 0.98) 0%, rgba(11, 15, 13, 0.96) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    box-shadow:
        0 0 0 1px rgba(0, 255, 136, 0.04),
        0 18px 48px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.staff-directory-card::before,
.staff-inspector-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--matrix-green), rgba(0, 255, 136, 0.15));
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    opacity: 0.85;
    pointer-events: none;
}

.staff-directory-card {
    padding: 1.5rem 1.5rem 1.5rem 1.65rem;
}

.staff-inspector-card {
    padding: 1.5rem 1.5rem 1.5rem 1.65rem;
    position: sticky;
    top: 92px;
}

@media (max-width: 1024px) {
    .staff-inspector-card {
        position: relative;
        top: auto;
    }
}

.staff-directory-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.staff-directory-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.staff-directory-sub {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-light);
    line-height: 1.45;
}

.staff-tree-loading {
    color: var(--gray-light);
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.staff-tree-loading::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--matrix-green);
    box-shadow: 0 0 12px var(--matrix-green);
    animation: staff-pulse 1s ease-in-out infinite;
}

@keyframes staff-pulse {
    0%,
    100% {
        opacity: 0.35;
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.staff-tree-error {
    color: #ffb4b4;
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
}

.staff-tree-groups {
    display: flex;
    flex-direction: column;
    gap: 1.65rem;
    margin-top: 0.25rem;
}

.staff-group-title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--matrix-green);
    margin: 0 0 0.85rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(0, 255, 136, 0.22);
}

.staff-bubbles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.7rem;
}

@media (max-width: 520px) {
    .staff-bubbles {
        grid-template-columns: 1fr;
    }
}

.staff-bubble {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.95rem 0.55rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: radial-gradient(circle at 0% 0%, rgba(0, 255, 136, 0.12), rgba(8, 12, 10, 0.92));
    cursor: pointer;
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        transform 0.12s ease,
        box-shadow 0.18s ease;
    font-size: 0.92rem;
    color: var(--white);
    text-align: left;
    width: 100%;
    font-family: inherit;
}

.staff-bubble:hover {
    border-color: rgba(0, 255, 136, 0.45);
    background: radial-gradient(circle at 0% 0%, rgba(0, 255, 136, 0.22), rgba(5, 8, 7, 0.95));
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 255, 136, 0.12);
}

.staff-bubble:focus-visible {
    outline: none;
    border-color: var(--matrix-green);
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.35);
}

.staff-bubble.is-active {
    border-color: var(--matrix-green);
    background: radial-gradient(circle at 0% 0%, rgba(0, 255, 136, 0.38), rgba(0, 0, 0, 0.92));
    box-shadow:
        0 12px 32px rgba(0, 255, 136, 0.18),
        0 0 0 1px rgba(0, 255, 136, 0.25);
}

.staff-bubble-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(0, 255, 136, 0.2);
}

.staff-bubble.is-active .staff-bubble-avatar {
    border-color: rgba(0, 255, 136, 0.55);
}

.staff-bubble span {
    color: var(--white);
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.staff-tree-empty {
    margin: 0.5rem 0 0;
    color: var(--gray-light);
    font-size: 0.95rem;
}

/* Inspector */
.staff-inspector-inner {
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.staff-inspector-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.25rem;
    border-radius: var(--radius);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: var(--gray-light);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.5;
    gap: 0.75rem;
}

.staff-inspector-empty i {
    font-size: 1.35rem;
    color: rgba(0, 255, 136, 0.35);
}

.staff-inspector-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding: 0.25rem 0 0.5rem;
}

.staff-detail-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(0, 255, 136, 0.35);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.staff-detail-name {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--white);
    margin: 0.15rem 0 0;
    letter-spacing: -0.02em;
}

.staff-detail-role {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--matrix-green);
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.28);
}

.staff-detail-area-block {
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.staff-detail-area-label {
    font-size: 0.75rem;
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 0.4rem;
    font-weight: 600;
}

.staff-detail-area {
    color: var(--gray-light);
    white-space: pre-wrap;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
}
