/* ── Staff Profile View (sfp-*) ── */
.sfp-shell {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    padding-bottom: var(--space-10);
}

.sfp-back-bar {
    display: flex;
    align-items: center;
}

.sfp-back-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: transparent;
    border: none;
    color: var(--primary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    cursor: pointer;
    transition: var(--transition-fast);
}

.sfp-back-btn:hover {
    background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.sfp-back-btn:focus-visible,
.sfp-inline-action:focus-visible,
.sfp-profile-cta:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.sfp-hero-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-full);
    background: var(--surface-container-lowest);
    border: var(--ghost-border);
    box-shadow: var(--shadow-sm);
    padding: var(--space-10);
}

.sfp-hero-card::after {
    content: '';
    position: absolute;
    top: -72px;
    right: -72px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 6%, transparent);
    filter: blur(2px);
    pointer-events: none;
}

.sfp-hero-main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: var(--space-10);
}

.sfp-hero-avatar-frame {
    width: 120px;
    height: 120px;
    padding: 4px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--outline-variant) 35%, transparent);
    background: var(--surface-container-high);
    flex-shrink: 0;
}

.sfp-hero-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary), var(--primary-container));
    color: var(--fg-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sfp-hero-avatar-initials {
    font-family: var(--font-headline);
    font-size: 40px;
    font-weight: var(--weight-extrabold);
    letter-spacing: var(--tracking-tight);
}

.sfp-hero-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.sfp-role-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
    border-radius: var(--radius-full);
    padding: 4px var(--space-3);
    font-size: 10px;
    font-weight: var(--weight-extrabold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sfp-hero-name {
    margin: 0;
    font-family: var(--font-headline);
    font-size: clamp(36px, 4.3vw, 54px);
    font-weight: var(--weight-extrabold);
    letter-spacing: var(--tracking-tight);
    line-height: 1;
    color: var(--on-surface);
}

.sfp-hero-title,
.sfp-hero-meta {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--on-surface-variant);
}

.sfp-hero-summary {
    margin: var(--space-2) 0 0;
    font-family: var(--font-body);
    font-size: var(--text-body);
    color: var(--on-surface-variant);
    max-width: 70ch;
    line-height: 1.6;
}

.sfp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
}

.sfp-kpi-card {
    background: var(--surface-container-lowest);
    border: var(--ghost-border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    padding: var(--space-6) var(--space-8);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.sfp-kpi-text {
    min-width: 0;
}

.sfp-kpi-label {
    margin: 0;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--on-surface-variant);
}

.sfp-kpi-value {
    margin: var(--space-1) 0 0;
    font-family: var(--font-headline);
    font-size: 42px;
    font-weight: var(--weight-extrabold);
    line-height: 1;
    letter-spacing: var(--tracking-tight);
    color: var(--on-surface);
}

.sfp-kpi-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--surface-container-low);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sfp-kpi-icon {
    color: var(--primary);
    font-size: 30px;
}

.sfp-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: var(--space-8);
    align-items: start;
}

.sfp-assigned-panel,
.sfp-profile-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.sfp-section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 0 var(--space-1);
}

.sfp-section-title {
    margin: 0;
    font-family: var(--font-headline);
    font-size: var(--text-h1);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-tight);
    color: var(--on-surface);
}

.sfp-inline-action {
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    cursor: pointer;
}

.sfp-inline-action:hover {
    text-decoration: underline;
}

.sfp-inline-action:focus-visible {
    text-decoration: underline;
}

.sfp-students-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.sfp-empty-state {
    margin: 0;
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border: var(--ghost-border);
    background: var(--surface-container-lowest);
}

.sfp-student-card {
    background: var(--surface-container-low);
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    padding: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    cursor: pointer;
    transition: var(--transition-base);
}

.sfp-student-card:hover {
    background: var(--surface-container-lowest);
    border-color: color-mix(in srgb, var(--primary) 20%, transparent);
    box-shadow: var(--shadow-sm);
}

.sfp-student-card:focus-visible {
    outline: none;
    border-color: color-mix(in srgb, var(--primary) 35%, transparent);
    box-shadow: var(--shadow-focus);
}

.sfp-student-main {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
}

.sfp-student-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary-container), var(--primary));
    color: var(--fg-on-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-headline);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-tight);
    flex-shrink: 0;
}

.sfp-student-text {
    min-width: 0;
}

.sfp-student-name {
    margin: 0;
    font-family: var(--font-headline);
    font-size: 28px;
    font-weight: var(--weight-extrabold);
    letter-spacing: var(--tracking-tight);
    line-height: 1;
    color: var(--on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sfp-student-meta {
    margin: var(--space-1) 0 0;
    font-size: var(--text-h2);
    font-weight: var(--weight-medium);
    color: var(--on-surface-variant);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sfp-student-affordance {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--surface-container-lowest);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sfp-student-affordance .material-symbols-outlined {
    font-size: 16px;
}

.sfp-profile-card {
    background: var(--surface-container-lowest);
    border-radius: 32px;
    border: var(--ghost-border);
    box-shadow: var(--shadow-sm);
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.sfp-profile-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.sfp-profile-row-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sfp-profile-row-icon .material-symbols-outlined {
    font-size: 20px;
}

.sfp-profile-row-text {
    min-width: 0;
}

.sfp-profile-row-label {
    margin: 0;
    font-size: 11px;
    font-weight: var(--weight-extrabold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--on-surface-variant);
}

.sfp-profile-row-value {
    margin: var(--space-1) 0 0;
    font-family: var(--font-headline);
    font-size: var(--text-h2);
    font-weight: var(--weight-bold);
    color: var(--on-surface);
    overflow-wrap: anywhere;
}

.sfp-profile-row-detail {
    margin: var(--space-1) 0 0;
    font-size: var(--text-xs);
    color: var(--primary);
    font-weight: var(--weight-medium);
}

.sfp-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.sfp-chip {
    padding: 4px var(--space-3);
    border-radius: var(--radius-full);
    background: var(--surface-container-low);
    color: var(--on-surface);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
}

.sfp-profile-cta {
    margin-top: var(--space-2);
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--surface-container-high);
    color: var(--on-surface);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    cursor: pointer;
    transition: var(--transition-base);
}

.sfp-profile-cta:hover {
    background: color-mix(in srgb, var(--outline-variant) 20%, transparent);
}

.sfp-profile-cta:focus-visible {
    box-shadow: var(--shadow-focus);
}

.sfp-profile-cta:disabled,
.sfp-profile-cta[data-loading="true"] {
    opacity: 0.7;
    cursor: not-allowed;
}

.sfp-profile-cta:disabled:hover,
.sfp-profile-cta[data-loading="true"]:hover {
    background: var(--surface-container-high);
}

.sfp-shell .skeleton-line--short {
    width: 120px;
}

.sfp-shell .skeleton-line--medium {
    width: min(18rem, 60%);
}

.sfp-shell .skeleton-line--long {
    width: min(34rem, 85%);
}

.sfp-shell .skeleton-line--title {
    width: min(16rem, 45%);
    height: 18px;
}
