.fe-profile-wrap {
    max-width: 960px;
    margin: 0 auto;
}

.fe-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.fe-profile-header h1 {
    margin: 0.35rem 0 0.25rem;
    font-size: 1.5rem;
}

.fe-profile-header p {
    margin: 0;
    opacity: 0.85;
}

.fe-profile-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    font-size: 0.85rem;
    white-space: nowrap;
}

.fe-profile-setup-banner {
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    background: rgba(241, 196, 15, 0.12);
    border: 1px solid rgba(241, 196, 15, 0.35);
}

.fe-profile-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.fe-profile-tab {
    border: 1px solid var(--border-color, rgba(255,255,255,0.15));
    background: transparent;
    color: inherit;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    cursor: pointer;
}

.fe-profile-tab.is-active {
    background: var(--accent-color, #3b82f6);
    border-color: transparent;
    color: #fff;
}

.fe-profile-panel {
    display: none;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.fe-profile-panel.is-active {
    display: block;
}

/* 补全向导：不用 Tab 的 is-active，用 hidden 控制显隐 */
#stageSetupWizard.fe-profile-panel:not(.hidden) {
    display: block;
}

.fe-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.fe-form-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.fe-form-field input,
.fe-form-field select {
    width: 100%;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.2));
    background: var(--input-bg, rgba(0,0,0,0.2));
    color: inherit;
}

.fe-form-field--wide {
    grid-column: 1 / -1;
}

.fe-link-btn {
    margin-top: 0.35rem;
    background: none;
    border: none;
    color: var(--accent-color, #60a5fa);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
}

.fe-profile-actions {
    margin-top: 1rem;
}

.fe-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.fe-stat-card {
    padding: 0.85rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}

.fe-stat-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.75;
    margin-bottom: 0.25rem;
}

.fe-stat-card strong {
    font-size: 1rem;
}

.fe-profile-note {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0 0 1rem;
}

.fe-profile-future {
    padding: 1rem;
    background: rgba(59, 130, 246, 0.08);
}

.fe-profile-future h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.fe-leave-form h3,
.fe-leave-list-wrap h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.fe-leave-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.fe-leave-table th,
.fe-leave-table td {
    padding: 0.55rem 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: left;
}

.fe-leave-table .fe-empty {
    text-align: center;
    opacity: 0.7;
}

.fe-leave-delete {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
}

.fe-profile-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: #111;
    color: #fff;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.fe-profile-toast.is-error {
    background: #7f1d1d;
}

.hidden {
    display: none !important;
}

/* 补全资料弹窗 */
.fe-profile-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.fe-profile-modal {
    max-width: 440px;
    width: 100%;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid rgba(255,255,255,0.12);
    color: inherit;
}

.fe-profile-modal h2 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.fe-profile-modal p {
    margin: 0 0 1rem;
    font-size: 0.92rem;
    line-height: 1.5;
    opacity: 0.9;
}

.fe-profile-modal ul {
    margin: 0 0 1rem 1.1rem;
    padding: 0;
}

.fe-profile-modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.fe-profile-modal-actions .btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    border: none;
}

.fe-profile-modal-actions .btn-primary {
    background: var(--accent-color, #3b82f6);
    color: #fff;
}

.fe-profile-modal-actions .btn-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: inherit;
}

.fe-profile-locked-banner {
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.fe-panel-title {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

.fe-btn {
    padding: 0.55rem 1.1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.92rem;
    transition: opacity 0.2s, transform 0.15s;
}

.fe-btn--primary {
    background: var(--accent-color, var(--primary-color, #3b82f6));
    color: #fff;
}

.fe-btn--primary:hover {
    opacity: 0.92;
}

.fe-btn--ghost {
    background: transparent;
    border: 1px solid var(--border-color, rgba(255,255,255,0.25));
    color: inherit;
}

.fe-profile-actions--row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.fe-wizard-row {
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.fe-wizard-row__head {
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    opacity: 0.85;
}

.fe-enrollments-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.fe-enrollment-card {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
}

.fe-enrollment-card strong {
    margin-right: 0.5rem;
}

.fe-enrollment-status {
    font-size: 0.8rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
}

.fe-enrollment-status--ongoing {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.fe-enrollment-status--completed {
    background: rgba(149, 165, 166, 0.2);
    color: #bdc3c7;
}

.fe-enrollment-stats {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0.35rem 0 0;
}

.form-hint {
    display: block;
    font-size: 0.78rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.fe-empty {
    opacity: 0.7;
    text-align: center;
}

.admin-stage-rows .admin-stage-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.stage-summary-cell {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .fe-profile-header {
        flex-direction: column;
    }
}
