/* ---- Profile header ---- */
.profile-view-card {
    padding: 0;
    max-width: 780px;
    margin-bottom: 24px;
    border-color: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.profile-view-body {
    padding: 24px 20px;
    text-align: center;
    background: linear-gradient(180deg, rgba(24, 39, 47, 0.98) 0%, rgba(20, 33, 40, 0.98) 100%);
}

.profile-view-avatar-wrap {
    margin-bottom: 14px;
    display: flex;
    justify-content: center;
}

.profile-view-avatar,
.profile-view-avatar-img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
}

.profile-view-avatar {
    border: 2px solid rgba(84, 196, 175, 0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #245e88 100%);
    color: var(--white);
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 0 0 4px rgba(37, 95, 136, 0.16), 0 12px 30px rgba(0, 0, 0, 0.35);
}

.profile-view-avatar-img {
    border: 2px solid rgba(84, 196, 175, 0.45);
    object-fit: cover;
    box-shadow: 0 0 0 4px rgba(37, 95, 136, 0.16), 0 12px 30px rgba(0, 0, 0, 0.35);
}

.profile-view-name {
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.55rem, 2.8vw, 2rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 6px;
    color: #f6fbff;
}

.profile-view-username {
    font-size: 0.9rem;
    margin: 0 0 8px;
    color: rgba(229, 238, 244, 0.72);
}

.profile-view-status {
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: #d8e7ee;
}

.profile-view-interests {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 10px;
}

.profile-interest-pill {
    padding: 5px 10px;
    font-size: 0.78rem;
    border-radius: 999px;
    color: #d5e4eb;
    background: rgba(131, 170, 188, 0.16);
    border: 1px solid rgba(166, 199, 213, 0.2);
}

.profile-view-join {
    margin: 0 0 14px;
    font-size: 0.8rem;
    color: rgba(206, 219, 227, 0.56);
}

.profile-view-actions {
    display: flex;
    justify-content: center;
    margin-top: 2px;
}

.profile-collapsible summary.profile-collapsible-title {
    cursor: default;
}

.profile-collapsible summary.profile-collapsible-title::after {
    display: none;
}

@media (max-width: 1024px) {
    .profile-collapsible summary.profile-collapsible-title {
        cursor: pointer;
    }
    .profile-collapsible summary.profile-collapsible-title::after {
        display: block;
    }
}

.profile-edit-lite {
    padding: 8px 12px;
    border-color: rgba(84, 196, 175, 0.44);
    color: #bdded6;
    background: transparent;
}

.profile-edit-lite:hover {
    background: rgba(84, 196, 175, 0.12);
}

.btn-icon {
    margin-right: 6px;
    display: inline-flex;
    width: 1rem;
    height: 1rem;
}

/* ---- Professional panel (control panel when in Professional mode) ---- */
.professional-panel {
    max-width: 780px;
    padding: 0;
    overflow: hidden;
}

.professional-panel-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border);
}

.professional-panel-title {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--text);
}

.professional-panel-subtitle {
    font-size: 0.9rem;
    margin: 0 0 16px;
}

.professional-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.professional-panel-sections {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.professional-section {
    padding: 16px;
}

.professional-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text);
}

.professional-section p {
    margin: 0;
    font-size: 0.9rem;
}

.professional-panel-header-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.professional-panel-headline {
    font-size: 0.95rem;
    margin: 0 0 2px;
}

.professional-badge-placeholder {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

.professional-dashboard-shortcuts {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.professional-shortcut {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    transition: background var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out);
}

.professional-shortcut:hover {
    background: var(--hover);
    transform: translateY(-1px);
}

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

.professional-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.professional-list li:last-child {
    border-bottom: none;
}

.professional-skills-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.professional-skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-soft);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.professional-skill-tag .endorsement-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.professional-portfolio-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.professional-portfolio-card {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.professional-portfolio-card a {
    font-weight: 600;
}

.professional-insight-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.professional-insight-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.professional-insight-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.professional-edit-section hr.professional-edit-divider {
    margin: 20px 0;
    border: none;
    border-top: 1px solid var(--border);
}

.empty-hint {
    font-size: 0.85rem;
}

.professional-about-text {
    white-space: pre-wrap;
}

/* ---- Jobs page ---- */
.jobs-toolbar {
    margin-bottom: 20px;
    padding: 14px 18px;
}

.jobs-tabs,
.events-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.jobs-tabs .jobs-tab.active,
.events-tabs .events-tab.active {
    font-weight: 600;
}

.jobs-search-row.hidden {
    display: none;
}

.group-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.group-item-row .avatar {
    flex-shrink: 0;
}

.group-item-row > div {
    flex: 1;
    min-width: 0;
}

.jobs-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.jobs-search-row .input {
    flex: 1;
    min-width: 200px;
}

.jobs-filter-remote {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.job-card {
    padding: 18px;
}

.job-card-header {
    margin-bottom: 8px;
}

.job-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.job-card-company {
    font-size: 0.9rem;
    margin: 0;
}

.job-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
}

.job-remote {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.job-card-description {
    font-size: 0.9rem;
    margin: 0 0 14px;
    line-height: 1.45;
    color: var(--text-secondary);
}

.job-card-actions {
    display: flex;
    gap: 10px;
}

/* Legacy preview (kept for any refs) */
.profile-preview-card {
    padding: 0;
    max-width: 780px;
    overflow: hidden;
    margin-bottom: 20px;
}

.profile-preview-cover {
    height: 200px;
    background: linear-gradient(130deg, #1f6f5f 0%, #245e88 56%, #173d57 100%);
}

.profile-preview-body {
    padding: 0 20px 20px;
    position: relative;
}

.profile-preview-avatar-wrap {
    position: relative;
    margin-top: -64px;
    margin-bottom: 12px;
}

.profile-preview-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: var(--shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #245e88 100%);
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 700;
}

.profile-preview-avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: var(--shadow);
    object-fit: cover;
}

.profile-preview-name {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.56rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--text);
}

.profile-preview-bio {
    color: var(--text);
    line-height: 1.5;
    margin: 0 0 8px;
    white-space: pre-wrap;
}

.profile-preview-bio:empty::before {
    content: "No bio yet.";
    color: var(--text-secondary);
    font-style: italic;
}

.profile-preview-hint {
    font-size: 0.82rem;
}

.profile-card {
    max-width: 780px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.profile-header-avatar-wrap {
    position: relative;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.profile-header-avatar-wrap .avatar,
.profile-header-avatar-wrap .profile-edit-avatar-img {
    display: inline-flex;
}

.profile-header-avatar-wrap .profile-edit-avatar-img {
    position: absolute;
    left: 0;
    top: 0;
}

.profile-header .profile-edit-avatar-img {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-edit-avatar-preview {
    margin-top: 6px;
}

.profile-edit-avatar-preview-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.profile-form {
    display: grid;
    gap: 12px;
}

.profile-form textarea {
    min-height: 112px;
    resize: vertical;
}

.profile-save-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 1024px) {
    .profile-view-avatar,
    .profile-view-avatar-img {
        width: 76px;
        height: 76px;
        font-size: 1.8rem;
    }

    .profile-view-name {
        font-size: 1.38rem;
    }

    .profile-view-body {
        padding: 20px 14px;
    }

    .profile-account {
        padding: 16px;
    }

    .profile-preview-cover {
        height: 160px;
    }

    .profile-preview-avatar,
    .profile-preview-avatar-img {
        width: 100px;
        height: 100px;
        font-size: 2rem;
    }

    .profile-preview-avatar-wrap {
        margin-top: -50px;
    }

    .profile-preview-name {
        font-size: 1.3rem;
    }

    .profile-save-row .form-status {
        width: 100%;
        margin-top: 2px;
    }
}

/* ---- Account section ---- */
.profile-account {
    max-width: 780px;
    margin-top: 24px;
    padding: 20px;
    background: rgba(17, 27, 33, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-account-title {
    margin: 0 0 14px;
    font-size: 1.05rem;
    font-weight: 700;
}

.profile-account-items {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.profile-account-item {
    width: 100%;
    text-align: left;
    border: 1px solid var(--border);
    background: rgba(26, 42, 52, 0.75);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font: inherit;
    cursor: pointer;
}

.profile-account-arrow {
    color: var(--text-secondary);
    width: 0.95rem;
    height: 0.95rem;
}

.profile-danger-zone {
    border: 1px solid rgba(154, 71, 71, 0.35);
    border-radius: var(--radius-sm);
    background: rgba(77, 31, 31, 0.3);
}

.profile-danger-zone-toggle {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
}

.profile-danger-zone-toggle::-webkit-details-marker {
    display: none;
}

.profile-danger-zone-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(241, 187, 187, 0.92);
}

.profile-danger-zone-chevron {
    color: rgba(241, 187, 187, 0.8);
    width: 0.95rem;
    height: 0.95rem;
    transition: transform var(--motion-fast) var(--ease-out);
}

.profile-danger-zone[open] .profile-danger-zone-chevron {
    transform: rotate(90deg);
}

.profile-danger-zone-content {
    border-top: 1px solid rgba(154, 71, 71, 0.3);
    padding: 12px;
    background: rgba(87, 28, 28, 0.34);
}

.profile-danger-zone-desc {
    margin: 0 0 10px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: rgba(240, 197, 197, 0.78);
}

.profile-danger-delete-btn {
    border-color: rgba(186, 105, 105, 0.4);
    color: rgba(240, 197, 197, 0.92);
    background: rgba(99, 37, 37, 0.24);
}

.profile-danger-delete-btn:hover {
    background: rgba(120, 38, 38, 0.34);
}

.profile-delete-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.profile-delete-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.profile-delete-modal-panel {
    position: relative;
    max-width: 420px;
    width: 100%;
    padding: 24px;
}

.profile-delete-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text);
}

.profile-delete-modal-text {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 12px;
    color: var(--text);
}

.profile-delete-modal-confirm {
    font-size: 0.9rem;
    margin: 0 0 8px;
}

.profile-delete-confirm-input {
    width: 100%;
    margin-bottom: 12px;
}

.profile-delete-modal-error {
    font-size: 0.9rem;
    color: var(--danger);
    margin: 0 0 12px;
}

.profile-delete-modal-error.hidden {
    display: none;
}

.profile-delete-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

/* ---- User Status (MySpace-inspired) ---- */
.profile-user-status-wrap {
    margin: 0 0 12px;
    text-align: center;
}
.profile-user-status-text {
    margin: 0 0 4px;
    font-size: 0.95rem;
    color: #d8e7ee;
}
.profile-user-status-mood {
    font-size: 0.88rem;
    margin: 0 0 4px;
}
.profile-user-status-updated {
    font-size: 0.78rem;
    margin: 0;
}
.profile-status-empty {
    margin: 0 0 12px;
    text-align: center;
}
.profile-status-empty .muted {
    display: block;
    margin-bottom: 10px;
}
.profile-status-actions {
    margin: 0 0 12px;
    display: flex;
    justify-content: center;
}
.status-modal-panel .profile-form > div {
    margin-bottom: 14px;
}
.status-mood-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.status-mood-chip {
    padding: 6px 12px;
    font-size: 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(166, 199, 213, 0.25);
    background: rgba(131, 170, 188, 0.08);
    color: #d5e4eb;
    cursor: pointer;
}
.status-mood-chip:hover {
    background: rgba(131, 170, 188, 0.18);
}
.status-mood-chip.active {
    border-color: rgba(84, 196, 175, 0.5);
    background: rgba(84, 196, 175, 0.15);
}
.status-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}
.status-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    padding: 10px 20px;
    background: rgba(32, 44, 51, 0.95);
    border-radius: 8px;
    color: #e9edef;
    font-size: 0.9rem;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
}
.status-toast.status-toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- Profile Music ---- */
.profile-music-section {
    max-width: 780px;
    margin-bottom: 24px;
}
.profile-music-title {
    font-size: 1.1rem;
    margin: 0 0 14px;
    color: var(--text);
}
.profile-music-slots {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.profile-music-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(24, 39, 47, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.profile-music-slot-empty {
    justify-content: flex-start;
}
.profile-music-slot-info {
    flex: 1;
    min-width: 0;
}
.profile-music-slot-title {
    font-weight: 600;
    color: var(--text);
}
.profile-music-slot-artist {
    font-size: 0.9rem;
    margin-top: 2px;
}
.profile-music-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 8px;
    font-size: 0.72rem;
    border-radius: 4px;
    background: rgba(84, 196, 175, 0.2);
    color: #6ed4c4;
}
.profile-music-slot-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.music-modal-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.music-tab {
    padding: 8px 16px;
    border: 1px solid rgba(166, 199, 213, 0.25);
    background: rgba(131, 170, 188, 0.08);
    color: #d5e4eb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}
.music-tab:hover {
    background: rgba(131, 170, 188, 0.18);
}
.music-tab.active {
    border-color: rgba(84, 196, 175, 0.5);
    background: rgba(84, 196, 175, 0.15);
}

.profile-logout-btn {
    justify-content: center;
    width: 100%;
}
