/**
 * Profile page — Professional, high-depth design.
 * Blue, black, grey palette. Bold typography, italics, layered shadows.
 * Scoped to .profile-page. Load after styles.css.
 */

/* Prevent horizontal scroll from full-bleed sections using 100vw */
body.profile-body {
    overflow-x: hidden;
}

/* --- Profile design system: bold gradients, vivid fills --- */
.profile-page {
    --profile-banner-height: 100px;
    --profile-accent: #003366;
    --profile-accent-mid: #0066b3;
    --profile-accent-bright: #00a3e0;
    --profile-accent-dark: #002244;
    --profile-accent-light: rgba(0, 51, 102, 0.12);
    --profile-ink: #0a0a0a;
    --profile-ink-muted: var(--color-grey-600);
    --profile-ink-subtle: var(--color-grey-500);
    --profile-surface: #ffffff;
    --profile-surface-elevated: #ffffff;
    --profile-border: var(--color-grey-200);
    --profile-border-strong: var(--color-grey-300);
    --profile-shadow-sm: 0 2px 8px rgba(0, 51, 102, 0.08), 0 1px 3px rgba(0,0,0,0.06);
    --profile-shadow-md: 0 8px 24px rgba(0, 51, 102, 0.12), 0 4px 12px rgba(0,0,0,0.08);
    --profile-shadow-lg: 0 16px 40px rgba(0, 51, 102, 0.15), 0 6px 20px rgba(0,0,0,0.1);
    --profile-shadow-xl: 0 24px 48px rgba(0, 51, 102, 0.18), 0 12px 24px rgba(0,0,0,0.12);
    --profile-radius-sm: 10px;
    --profile-radius-md: 14px;
    --profile-radius-lg: 20px;
    --profile-font-heading: 'Roboto Slab', Georgia, serif;
    --profile-font-body: 'Inter', system-ui, sans-serif;
    --profile-heading-weight: 800;
    --profile-subhead-weight: 600;
    --profile-body-weight: 400;
    --profile-label-weight: 600;
    /* Spacing scale (align with global --spacing-* where used) */
    --profile-space-1: 0.25rem;
    --profile-space-2: 0.5rem;
    --profile-space-3: 0.75rem;
    --profile-space-4: 1rem;
    --profile-space-5: 1.25rem;
    --profile-space-6: 1.5rem;
    --profile-space-8: 2rem;
    --profile-space-10: 2.5rem;
    --profile-space-12: 3rem;
    --profile-line-tight: 1.25;
    --profile-line-normal: 1.5;
    --profile-line-relaxed: 1.6;
}

/* --- Page --- */
.profile-page {
    /* Soft neutral background that fills the whole viewport edge‑to‑edge, even when zoomed out */
    background: #e5e7eb;
    min-height: 100vh;
    padding: var(--profile-space-6) 0 var(--profile-space-12);
    font-family: var(--profile-font-body);
    font-size: 1rem;
    line-height: var(--profile-line-normal);
    color: var(--profile-ink);
    /* Break out of any centered container so grey reaches full browser width */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Settings focus: cooler shell behind nav + sheet (light mode only wins via specificity) */
.profile-page.profile-page--settings-mode {
    background: #e8eaef;
}

.profile-page .profile-container {
    max-width: 1128px;
    width: 100%;
    margin: 0 auto;
    padding-left: clamp(0.75rem, 2.4vw, 1.5rem);
    padding-right: clamp(0.75rem, 2.4vw, 1.5rem);
    box-sizing: border-box;
}
@supports selector(:has(*)) {
    .profile-page .profile-container:has(.profile-layout--settings) {
        max-width: min(1280px, calc(100vw - 1.5rem));
    }
}

/* --- Loading / Error --- */
.profile-page .profile-loading,
.profile-page .profile-error {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    background: var(--profile-surface);
    border-radius: 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--profile-ink-muted);
    box-shadow: var(--profile-shadow-md);
    border: 1px solid var(--profile-border-strong);
}

.profile-page .profile-error {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-4);
    color: #b91c1c;
    font-weight: 600;
    border: 1px solid rgba(185, 28, 28, 0.4);
    background: var(--profile-surface);
}

.profile-page .profile-toast {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-width: 90vw;
    min-width: 12rem;
    transition: opacity 0.25s ease;
}
.profile-page .profile-toast.success {
    background: #059669;
    color: #fff;
    border: 1px solid #047857;
}
.profile-page .profile-toast.error {
    background: #dc2626;
    color: #fff;
    border: 1px solid #b91c1c;
}

/* Dark mode: toast stays readable */
[data-theme="dark"] .profile-page .profile-toast.success,
html.dark-mode .profile-page .profile-toast.success {
    background: #047857;
    color: #d1fae5;
}
[data-theme="dark"] .profile-page .profile-toast.error,
html.dark-mode .profile-page .profile-toast.error {
    background: #b91c1c;
    color: #fecaca;
}

/* --- Intro card: vivid gradient cover, bold widget feel --- */
.profile-page .profile-intro-card {
    background: var(--profile-surface);
    border-radius: var(--profile-radius-lg);
    margin-bottom: var(--profile-space-6);
    overflow: hidden;
    box-shadow: var(--profile-shadow-lg), inset 0 1px 0 rgba(255,255,255,0.9), 0 0 0 2px rgba(0, 102, 179, 0.08);
    border: none;
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}
.profile-page .profile-intro-card:hover {
    box-shadow: var(--profile-shadow-xl), inset 0 1px 0 rgba(255,255,255,0.9), 0 0 0 2px rgba(0, 102, 179, 0.15);
}

.profile-page .profile-cover {
    min-height: 280px;
    height: 280px;
    background: linear-gradient(135deg, #001a33 0%, #002244 20%, #003d6b 45%, #0066b3 70%, #00a3e0 100%);
    position: relative;
}
.profile-page .profile-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
    pointer-events: none;
}
.profile-page .profile-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.35) 100%);
    pointer-events: none;
}

.profile-page .profile-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-page .profile-intro-inner {
    display: flex;
    align-items: flex-end;
    gap: var(--profile-space-8);
    padding: 0 var(--profile-space-8) var(--profile-space-8);
    flex-wrap: wrap;
}

.profile-page .profile-avatar-wrap {
    margin-top: -72px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.profile-page .profile-avatar {
    width: 176px;
    height: 176px;
    border-radius: 50%;
    border: 5px solid var(--profile-surface);
    background: var(--color-grey-300);
    color: var(--profile-ink-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.25rem;
    font-weight: 800;
    overflow: hidden;
    box-shadow: var(--profile-shadow-lg), 0 0 0 1px rgba(0, 51, 102, 0.15);
    font-family: var(--profile-font-heading);
    letter-spacing: -0.03em;
}

.profile-page .profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-page .profile-avatar-initials {
    font-size: 3rem;
    font-weight: 800;
    color: var(--profile-ink-muted);
    letter-spacing: -0.03em;
    font-family: var(--profile-font-heading);
}

.profile-page .profile-public-card .profile-cover {
    min-height: 220px;
    height: 220px;
    background: linear-gradient(145deg, #001a2e 0%, #002244 40%, #003366 70%, #0d3255 100%);
}

.profile-page .profile-readonly-location {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--profile-ink-muted);
    margin: 0;
    letter-spacing: 0.02em;
}

.profile-page .profile-actions {
    margin: 0;
}

.profile-page .profile-message-btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    background: linear-gradient(145deg, #003366 0%, #004d99 50%, #0066b3 100%);
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 16px rgba(0, 51, 102, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.25s ease;
}
.profile-page .profile-message-btn:hover {
    background: linear-gradient(145deg, #004d99 0%, #0066b3 50%, #0088cc 100%);
    color: #fff;
    box-shadow: 0 8px 28px rgba(0, 102, 179, 0.45), inset 0 1px 0 rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

.profile-page .profile-intro-text {
    flex: 1;
    min-width: 0;
    padding-bottom: 0.25rem;
}

.profile-page .profile-name {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--profile-ink);
    margin: 0 0 var(--profile-space-2);
    letter-spacing: -0.03em;
    line-height: var(--profile-line-tight);
    font-family: var(--profile-font-heading);
}

.profile-page .profile-headline {
    font-size: 1rem;
    font-weight: 500;
    font-style: italic;
    color: var(--profile-ink-muted);
    margin: 0 0 var(--profile-space-2);
    line-height: var(--profile-line-relaxed);
    max-width: 32em;
}

.profile-page .profile-role-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
}

.profile-page .profile-role-badge.student {
    background: rgba(0, 51, 102, 0.12);
    color: var(--profile-accent-dark);
}

.profile-page .profile-role-badge.master {
    background: rgba(0, 71, 40, 0.12);
    color: #034a28;
}

.profile-page .profile-role-badge.educator {
    background: rgba(64, 32, 0, 0.08);
    color: #5c2e0a;
}

.profile-page .profile-location {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--profile-ink-subtle);
    margin: 0 0 0.2rem;
    letter-spacing: 0.02em;
}

.profile-page .profile-industry {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--profile-ink-subtle);
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.profile-page .profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.profile-page .profile-actions-note {
    font-size: 0.8125rem;
    color: #666;
    margin: 0 0.5rem 0 0;
}

.profile-page .profile-btn {
    padding: 0.6rem 1.35rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
    letter-spacing: 0.02em;
}

.profile-page .profile-btn-primary {
    background: linear-gradient(145deg, #003366 0%, #004d99 50%, #0066b3 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 51, 102, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}

.profile-page .profile-btn-primary:hover {
    background: linear-gradient(145deg, #004d99 0%, #0066b3 50%, #0088cc 100%);
    box-shadow: 0 8px 24px rgba(0, 102, 179, 0.4), inset 0 1px 0 rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

.profile-page .profile-btn-secondary {
    background: var(--profile-surface);
    color: var(--profile-accent);
    border: 2px solid var(--profile-accent);
}

.profile-page .profile-btn-secondary:hover {
    background: var(--profile-accent-light);
}

.profile-page .profile-btn-outline {
    background: var(--profile-surface);
    color: var(--profile-ink);
    border: 2px solid var(--profile-border-strong);
}

.profile-page .profile-btn-outline:hover {
    background: var(--color-grey-100);
    border-color: var(--profile-ink-muted);
}

/* --- Layout: sidebar + main --- */
.profile-page .profile-layout {
    display: flex;
    gap: var(--profile-space-8);
    margin-top: var(--profile-space-6);
    align-items: flex-start;
}

.profile-page .profile-sidebar {
    flex-shrink: 0;
    width: 220px;
    position: sticky;
    top: 1.5rem;
}

.profile-page .profile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-page .profile-nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-black);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.profile-page .profile-nav-link:hover {
    background: var(--color-grey-100);
    color: var(--color-black);
}

.profile-page .profile-nav-link.active {
    font-weight: 600;
    color: var(--color-blue);
    background: var(--profile-accent-light);
}

.profile-page .profile-main {
    flex: 1;
    min-width: 0;
}

/* --- Single-column main (no left nav) --- */
.profile-page .profile-main-inline {
    flex: 1;
    min-width: 0;
    padding: 0 var(--spacing-sm);
}

.profile-page .profile-readonly-column,
.profile-page .profile-own-edit-column {
    display: block;
    max-width: 720px;
    margin: 0 auto;
    padding: var(--profile-space-6) 0 var(--profile-space-10);
}

.profile-page .profile-inline-section {
    background: var(--profile-surface);
    border-radius: var(--profile-radius-lg);
    padding: var(--profile-space-8) var(--profile-space-10);
    margin-bottom: var(--profile-space-6);
    box-shadow: var(--profile-shadow-md), inset 0 1px 0 rgba(255,255,255,0.7);
    border: 1px solid var(--profile-border);
    border-left: 6px solid #0066b3;
    transition: box-shadow 0.3s ease, transform 0.25s ease;
}
.profile-page .profile-inline-section:last-child {
    margin-bottom: 0;
}
.profile-page .profile-inline-section:hover {
    box-shadow: var(--profile-shadow-lg), inset 0 1px 0 rgba(255,255,255,0.7), 0 0 24px rgba(0, 102, 179, 0.12);
    border-left-color: #00a3e0;
}
.profile-page .profile-inline-section-title::first-letter {
    text-transform: uppercase;
}

.profile-page .profile-inline-section-title {
    font-size: 1.1875rem;
    font-weight: 800;
    color: var(--profile-ink);
    margin: 0 0 var(--profile-space-4);
    padding-bottom: var(--profile-space-3);
    border-bottom: 2px solid var(--profile-border);
    letter-spacing: -0.01em;
    line-height: var(--profile-line-tight);
    font-family: var(--profile-font-heading);
}
.profile-page .profile-inline-section .profile-section-body {
    line-height: var(--profile-line-relaxed);
    margin-top: var(--profile-space-4);
    padding-top: var(--profile-space-1);
}
.profile-page .profile-inline-section .profile-section-body:empty {
    min-height: 0;
}

.profile-page .profile-form-inline .profile-edit-section {
    margin-bottom: var(--profile-space-10);
    padding-top: var(--profile-space-1);
}
.profile-page .profile-form-inline .profile-edit-section:first-child {
    padding-top: 0;
}
.profile-page .profile-form-inline .profile-edit-section:last-of-type {
    margin-bottom: var(--profile-space-4);
}

.profile-page .profile-form-inline .profile-form-actions {
    margin-top: var(--profile-space-10);
    padding-top: var(--profile-space-6);
    border-top: 2px solid var(--profile-border);
}

.profile-page .profile-settings-only .tab-panel {
    display: block;
}

/* --- Top banner: calm strip (no gradient / accent); hidden entirely in settings --- */
.profile-page.profile-page--settings-mode .profile-top-banner {
    display: none;
}
.profile-page .profile-top-banner {
    margin: 0 0 1.5rem;
    padding: 0;
    background: #f1f5f9;
    min-height: 0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: none;
    border: 2px solid #e2e8f0;
    width: 100%;
}
.profile-page .profile-top-banner::before {
    display: none;
}
.profile-page .profile-top-banner-shape {
    display: none;
}
.profile-page .profile-top-banner-inner {
    height: auto;
    min-height: var(--profile-banner-height);
    padding: 0.95rem 1.25rem 1rem var(--profile-space-8);
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    position: relative;
    z-index: 1;
    background: transparent;
}
.profile-page .profile-top-banner-label {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: var(--profile-line-tight);
    font-family: var(--profile-font-heading);
    text-shadow: none;
    margin: 0;
}
.profile-page .profile-top-banner-tagline {
    font-size: 0.875rem;
    font-weight: 500;
    font-style: normal;
    color: #64748b;
    letter-spacing: 0;
    line-height: 1.45;
    margin: 0;
}
.profile-page .profile-top-banner-accent {
    display: none;
}

/* --- Left settings nav: solid dark blue, pill active state (reference style) --- */
.profile-page .profile-layout {
    flex-wrap: nowrap;
}
.profile-page .profile-left-settings-nav {
    order: -1;
    flex-shrink: 0;
    width: 288px;
    min-height: 320px;
    background: #2C3E50;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: none;
    padding: 0;
    position: sticky;
    top: 1.5rem;
    align-self: flex-start;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.profile-page .profile-layout--settings .profile-left-settings-nav .sidebar-nav-main.sidebar-nav-main-combined {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Settings sidebar widgets (fill space under nav) */
.profile-page .profile-sidebar-widgets {
    padding: 0.85rem 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
}
.profile-page .profile-sidebar-widget {
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    padding: 0.85rem 0.85rem 0.75rem;
}
.profile-page .profile-sidebar-widget-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}
.profile-page .profile-sidebar-widget-head {
    font-size: 0.6875rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.68);
}
.profile-page .profile-sidebar-widget-body {
    color: rgba(255,255,255,0.92);
}
.profile-page .profile-sidebar-mini-avatar {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    border: 2px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1;
}
.profile-page .profile-sidebar-you-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.profile-page .profile-sidebar-mini-meta strong {
    display: block;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 900;
    margin-bottom: 0.1rem;
}
.profile-page .profile-sidebar-mini-meta span {
    display: block;
    color: rgba(255,255,255,0.74);
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 11rem;
}
.profile-page .profile-sidebar-widget-links {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.profile-page .profile-sidebar-linkbtn {
    width: 100%;
    text-align: left;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 800;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
}
.profile-page .profile-sidebar-linkbtn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
}
.profile-page .profile-sidebar-linkbtn--anchor {
    padding: 0.58rem 0.75rem;
}
.profile-page .profile-sidebar-widget-head--tip {
    margin-bottom: 0.55rem;
}
.profile-page .profile-sidebar-tip-next {
    appearance: none;
    border: 2px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 900;
    width: 34px;
    height: 30px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.profile-page .profile-sidebar-tip-next:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.10);
}
.profile-page .profile-sidebar-tip-text {
    margin: 0;
    color: rgba(255,255,255,0.82);
    font-size: 0.8125rem;
    line-height: 1.45;
    font-weight: 600;
}

.profile-page .profile-left-settings-nav.minimized .profile-sidebar-widgets {
    display: none;
}
.profile-page .profile-left-settings-nav.minimized {
    width: 56px;
    padding: 1rem 0.5rem;
}
.profile-page .profile-left-settings-nav.minimized .sidebar-settings-title-text,
.profile-page .profile-left-settings-nav.minimized .nav-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    padding: 0;
    margin: 0;
}
.profile-page .profile-left-settings-nav.minimized .sidebar-nav-item {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.profile-page .profile-left-settings-nav.minimized .sidebar-nav-item.active {
    margin-left: 0;
    padding-left: 0.5rem;
}
.profile-page .profile-left-settings-nav.minimized .sidebar-nav-item .nav-icon {
    margin: 0;
}
.profile-page .profile-left-settings-nav .sidebar-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.profile-page .sidebar-settings-title-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
    transition: opacity 0.2s;
    letter-spacing: 0;
    line-height: 1.3;
    font-family: var(--profile-font-body);
}
.profile-page .sidebar-settings-header-btns {
    display: flex;
    gap: 0.5rem;
}
.profile-page .sidebar-header-btn,
.profile-page .sidebar-minimize-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: #1a252f;
    color: rgba(255,255,255,0.9);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.profile-page .sidebar-header-btn:hover,
.profile-page .sidebar-minimize-btn:hover {
    background: #34495e;
    color: #fff;
}
.profile-page .sidebar-nav-main.sidebar-nav-main-combined {
    gap: 6px;
    padding: 0.65rem 0.65rem 1rem;
}
.profile-page .sidebar-nav-main.sidebar-nav-main-combined .sidebar-nav-item {
    align-items: flex-start;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}
.profile-page .sidebar-nav-main.sidebar-nav-main-combined .nav-label {
    white-space: normal;
    line-height: 1.3;
    font-size: 0.8125rem;
    font-weight: 500;
}
.profile-page .sidebar-nav-main {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0.75rem 1rem;
}
.profile-page .sidebar-nav-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 0.875rem;
}
.profile-page .sidebar-nav-group:first-child {
    margin-top: 0;
}
.profile-page .sidebar-nav-group-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
    padding: 0.35rem 1rem 0.4rem;
    line-height: 1.25;
    user-select: none;
}
.profile-page .profile-left-settings-nav.minimized .sidebar-nav-group-label {
    display: none;
}
.profile-page .profile-left-settings-nav .sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.15s, color 0.15s;
    text-align: left;
    line-height: 1.4;
}
.profile-page .profile-left-settings-nav .sidebar-nav-item .nav-icon {
    flex-shrink: 0;
    font-style: normal;
    opacity: 0.95;
}
.profile-page .profile-left-settings-nav .sidebar-nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.profile-page .profile-left-settings-nav .sidebar-nav-item.active {
    color: #fff;
    background: #34495e;
    font-weight: 500;
}
.profile-page .profile-left-settings-nav .sidebar-nav-item-link {
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}
.profile-page .profile-left-settings-nav .sidebar-nav-item-link:hover {
    color: rgba(255,255,255,0.95);
}
.profile-page .sidebar-nav-item-profile-setup {
    margin-bottom: 0.25rem;
    padding: 0.75rem 1rem !important;
    text-align: left;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.4;
}
.profile-page .sidebar-nav-item-profile-setup:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.profile-page .sidebar-nav-item-profile-setup.active {
    background: #34495e;
    color: #fff;
}

/* Settings content (main area, right of left nav) */
.profile-page .profile-settings-main {
    flex: 1;
    min-width: 0;
    order: 0;
    padding-left: var(--profile-space-5);
}
.profile-page .profile-settings-main .settings-content-inner {
    border-radius: 12px;
    padding: 2.5rem 2rem;
    background: transparent;
    box-shadow: none;
    border: none;
}
/* Studio: no extra wrapper padding — grid gap + panel padding only */
.profile-page .profile-settings-main .settings-content-inner.profile-settings-studio {
    /* Keep consistent padding for studio content */
    padding: 1.05rem 1.05rem 2rem;
    margin: 0;
    border-radius: 0;
}
.profile-page .profile-main-inline {
    order: 0;
}
.profile-page .settings-content-inner {
    overflow-y: auto;
}
.profile-page .profile-settings-main .sidebar-panel {
    display: none;
}
.profile-page .profile-settings-main .sidebar-panel.active {
    display: block;
    animation: profilePanelFade 0.2s ease;
}
@keyframes profilePanelFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Profile dashboard: setting cards + photo + change user info --- */
.profile-page .profile-dashboard-panel .profile-panel-inner,
.profile-page .profile-combined-panel .profile-panel-inner {
    max-width: 820px;
}
.profile-page .profile-combined-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.profile-page .profile-combined-page-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
    color: #0f172a;
}
.profile-page .profile-combined-page-desc {
    margin: 0.4rem 0 0;
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.45;
}
.profile-page .profile-combined-section {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(15, 23, 42, 0.07);
}
.profile-page .profile-combined-section:first-of-type {
    margin-top: 1.25rem;
}
.profile-page .profile-combined-section-title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: #0f172a;
}
.profile-page .profile-combined-section-desc {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0 0 1rem;
    line-height: 1.45;
}
.profile-page .profile-combined-subhead {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
    color: #334155;
}
.profile-page .profile-combined-muted {
    font-size: 0.8125rem;
    color: #64748b;
}
.profile-page .profile-setting-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
    .profile-page .profile-setting-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}
.profile-page .profile-setting-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1.5rem;
    background: #ffffff;
    border: 1px solid #1a1a1a;
    border-radius: 10px;
    box-shadow: none;
    text-decoration: none;
    color: #1a1a1a;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.profile-page .profile-setting-card:hover {
    background: #fafafa;
    border-color: #1a1a1a;
}
.profile-page .profile-setting-card-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}
.profile-page .profile-setting-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    font-family: var(--profile-font-heading);
    line-height: 1.3;
    color: #1a1a1a;
}
.profile-page .profile-setting-card-desc {
    font-size: 0.8125rem;
    color: #444;
    margin: 0;
    line-height: 1.45;
}

.profile-page .profile-upload-photo-block {
    background: #ffffff;
    border: 1px solid #1a1a1a;
    border-radius: 10px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: none;
}
.profile-page .profile-upload-photo-wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.profile-page .profile-upload-photo-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: #e8e8e8;
    border: 2px solid #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s;
}
.profile-page .profile-upload-photo-circle:hover {
    border-color: #1a1a1a;
    background: #f0f0f0;
}
.profile-page .profile-upload-photo-circle .profile-photo-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.profile-page .profile-upload-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
.profile-page .profile-upload-photo-img.has-photo {
    display: block;
}
.profile-page .profile-upload-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.profile-page .profile-upload-photo-placeholder.hidden {
    display: none;
}
.profile-page .profile-upload-photo-placeholder-icon {
    font-size: 3rem;
    opacity: 0.6;
}
.profile-page .profile-upload-photo-meta {
    flex: 1;
    min-width: 0;
}
.profile-page .profile-upload-photo-label {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 var(--profile-space-1);
    color: #111827;
}
.profile-page .profile-upload-photo-filename {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 1rem;
}
.profile-page .profile-upload-photo-meta .profile-btn-primary {
    min-width: 100px;
}
.profile-page .profile-upload-photo-block .profile-btn-primary {
    background: #f0f0f0;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
    box-shadow: none;
}
.profile-page .profile-upload-photo-block .profile-btn-primary:hover {
    background: #e0e0e0;
    color: #1a1a1a;
    border-color: #1a1a1a;
}

.profile-page .profile-change-info-section {
    background: #ffffff;
    border: 1px solid #1a1a1a;
    border-radius: 10px;
    padding: 2rem 2rem;
    box-shadow: none;
}
.profile-page .profile-change-info-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    font-family: var(--profile-font-heading);
    color: #1a1a1a;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.15);
}
.profile-page .profile-change-info-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.5rem;
}
.profile-page .profile-change-info-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.profile-page .profile-change-info-row-wide {
    grid-column: 1 / -1;
}
.profile-page .profile-change-info-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
}
.profile-page .profile-change-info-input {
    padding: 0.65rem 0.85rem;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: var(--profile-font-body);
    transition: border-color 0.2s, background 0.2s;
    background: #ffffff;
    color: #1a1a1a;
}
.profile-page .profile-change-info-input::placeholder {
    color: #666;
}
.profile-page .profile-change-info-input:focus {
    outline: none;
    border-color: #1a1a1a;
    background: #fafafa;
}
.profile-page .profile-change-info-select {
    cursor: pointer;
    background: #ffffff;
    color: #1a1a1a;
}
.profile-page .profile-change-info-select option {
    background: #ffffff;
    color: #1a1a1a;
}
.profile-page .profile-change-info-actions {
    grid-column: 1 / -1;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}
.profile-page .profile-btn-update-info {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    min-width: 180px;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #1a1a1a;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
}
.profile-page .profile-btn-update-info:hover {
    background: #333;
    color: #fff;
    border-color: #333;
}

.profile-page .sidebar-nav-item-link {
    color: var(--color-grey-600);
    font-weight: 500;
}
.profile-page .sidebar-nav-item-link:hover {
    color: var(--color-blue);
}

/* --- Profile overview / analytics strip (dynamic) --- */
.profile-page .profile-overview-strip {
    margin-bottom: var(--profile-space-6);
}
.profile-page .profile-overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--profile-space-4);
}
.profile-page .profile-overview-card {
    background: var(--profile-surface);
    border: 1px solid var(--profile-border);
    border-radius: 14px;
    padding: var(--profile-space-5);
    text-align: center;
    box-shadow: var(--profile-shadow-sm);
}
.profile-page .profile-overview-card-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--profile-accent);
    line-height: var(--profile-line-tight);
    font-family: var(--profile-font-heading);
}
.profile-page .profile-overview-card-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--profile-ink-muted);
    margin-top: var(--profile-space-1);
    letter-spacing: 0.02em;
    line-height: 1.3;
}
[data-theme="dark"] .profile-page .profile-overview-card,
html.dark-mode .profile-page .profile-overview-card {
    background: var(--color-grey-800);
    border-color: var(--color-grey-700);
}
[data-theme="dark"] .profile-page .profile-overview-card-label,
html.dark-mode .profile-page .profile-overview-card-label {
    color: var(--color-grey-400);
}

/* --- In-page profile settings (Profile decisions) --- */
.profile-page .profile-inpage-settings {
    max-width: 560px;
}
.profile-page .profile-inpage-settings-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-black);
    margin: 0 0 0.25rem;
}
.profile-page .profile-inpage-settings-desc {
    font-size: 0.9375rem;
    color: var(--color-grey-600);
    margin: 0 0 var(--spacing-lg);
    line-height: 1.5;
}
.profile-page .profile-inpage-settings-card {
    background: var(--color-white);
    border: 1px solid var(--color-grey-200);
    border-radius: 12px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}
.profile-page .profile-inpage-settings-heading {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-black);
    margin: 0 0 var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--color-grey-200);
}
.profile-page .profile-inpage-row {
    margin-bottom: var(--spacing-md);
}
.profile-page .profile-inpage-row:last-child {
    margin-bottom: 0;
}
.profile-page .profile-inpage-row label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-black);
    margin-bottom: 4px;
}
.profile-page .profile-inpage-row select {
    width: 100%;
    max-width: 280px;
    padding: 8px 12px;
    border: 1px solid var(--color-grey-300);
    border-radius: 8px;
    font-size: 0.9375rem;
    background: var(--color-white);
    color: var(--color-black);
}
.profile-page .profile-inpage-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}
.profile-page .profile-inpage-toggle-row label {
    margin-bottom: 0;
    flex: 1 1 200px;
}
.profile-page .profile-inpage-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}
.profile-page .profile-inpage-settings-actions .settings-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
}

/* --- Profile settings panels: light grey bg, soft white boxes, modern outlines --- */
.profile-page .profile-settings-main .settings-content-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.profile-page .profile-panel-card {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
}
.profile-page .profile-panel-card .profile-panel-inner {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}
/* Panel title/desc: black text, black divider */
.profile-page .profile-panel-card:not(.profile-dashboard-panel) .profile-panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
    font-family: var(--profile-font-heading);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.15);
}
.profile-page .profile-panel-card:not(.profile-dashboard-panel) .profile-panel-desc {
    font-size: 0.875rem;
    color: #444;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}
/* Content boxes: white, soft dark-grey outline, generous spacing */
.profile-page .profile-panel-card .profile-card {
    background: #f9fafb;
    border: 1px solid #d4d4d8;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06);
}
.profile-page .profile-panel-card .profile-card:last-of-type {
    margin-bottom: 0;
}
.profile-page .profile-panel-card .profile-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.12);
    letter-spacing: 0;
    line-height: 1.4;
    font-family: var(--profile-font-heading);
}
/* Rows: label above control, subtle row divider */
.profile-page .profile-panel-card .profile-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid #e4e4e7;
}
.profile-page .profile-panel-card .profile-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.profile-page .profile-panel-card .profile-row:first-child {
    padding-top: 0;
}
.profile-page .profile-panel-card .profile-row label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.5;
}
.profile-page .profile-panel-card .profile-row select,
.profile-page .profile-panel-card .profile-row input[type="text"],
.profile-page .profile-panel-card .profile-row input[type="time"] {
    max-width: 100%;
    width: 100%;
    padding: 0.65rem 0.85rem;
    min-height: 2.5rem;
    border: 1px solid #d4d4d8;
    border-radius: 8px;
    font-size: 0.9375rem;
    line-height: 1.4;
    background: #ffffff;
    color: #1a1a1a;
}
.profile-page .profile-panel-card .profile-row select:focus,
.profile-page .profile-panel-card .profile-row input:focus {
    outline: none;
    border-color: #0f172a;
    box-shadow: 0 0 0 1px rgba(15,23,42,0.35);
}
.profile-page .profile-panel-card .profile-row-toggle {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 0;
    border-bottom: 1px solid #e4e4e7;
    gap: 0.75rem;
}
.profile-page .profile-panel-card .profile-row-toggle:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.profile-page .profile-panel-card .profile-row-toggle label {
    margin-bottom: 0;
    flex: 1 1 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.5;
}
.profile-page .profile-toggle {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: #e5e7eb;
    border: 1px solid #d4d4d8;
    cursor: pointer;
    position: relative;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.profile-page .profile-toggle::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    top: 2px;
    left: 2px;
    border: 1px solid rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}
.profile-page .profile-toggle.on,
.profile-page .profile-toggle[aria-checked="true"] {
    background: #111827;
    border-color: #111827;
}
.profile-page .profile-toggle.on::after,
.profile-page .profile-toggle[aria-checked="true"]::after {
    transform: translateX(20px);
    background: #fff;
    border-color: rgba(255,255,255,0.5);
}
.profile-page .profile-panel-actions {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0,0,0,0.12);
}
.profile-page .profile-panel-actions .profile-btn-primary {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    min-width: 180px;
    border-radius: 10px;
    font-weight: 600;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #1a1a1a;
}
.profile-page .profile-panel-actions .profile-btn-primary:hover {
    background: #333;
    color: #fff;
    border-color: #333;
}
.profile-page .profile-panel-actions .profile-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.4;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s;
}
.profile-page .profile-settings-main .profile-btn-primary {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}
.profile-page .profile-settings-main .profile-btn-primary:hover {
    background: #333;
    color: #fff;
    border-color: #333;
}
.profile-page .profile-btn-secondary {
    background: var(--color-white);
    color: var(--color-grey-700);
    border-color: var(--color-grey-300);
}
.profile-page .profile-btn-sm {
    padding: 6px 12px;
    font-size: 0.8125rem;
}
.profile-page .profile-card-placeholder {
    padding: 2rem 2rem;
    text-align: center;
    background: #ffffff;
    border: 1px solid #1a1a1a;
    border-radius: 10px;
    box-shadow: none;
}
.profile-page .profile-card-placeholder p,
.profile-page .profile-card-placeholder .profile-card-placeholder-text {
    margin: 0 0 1.25rem;
    color: #444;
    font-size: 0.9375rem;
    line-height: 1.5;
    max-width: 36ch;
    margin-left: auto;
    margin-right: auto;
}
.profile-page .profile-card-placeholder .profile-card-placeholder-cta {
    margin-top: 1.25rem;
}
.profile-page .profile-card-placeholder .profile-card-placeholder-cta .profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #1a1a1a;
    background: #1a1a1a;
    color: #fff;
}
.profile-page .profile-card-placeholder .profile-card-placeholder-cta .profile-btn:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}
.profile-page .profile-empty {
    padding: 1.25rem;
    color: #444;
    font-size: 0.9375rem;
}
.profile-page .profile-safety-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-grey-200);
    gap: var(--spacing-sm);
    transition: background 0.2s ease;
}
.profile-page .profile-safety-row:hover {
    background: rgba(0, 51, 102, 0.04);
}
.profile-page .profile-safety-row:last-child {
    border-bottom: none;
}
.profile-page .profile-safety-name {
    font-size: 0.9375rem;
    color: var(--color-black);
}
.profile-page .profile-toast-global {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.profile-page .profile-toast-global.show {
    opacity: 1;
}
.profile-page .profile-toast-global.success {
    background: var(--color-blue);
    color: var(--color-white);
}
.profile-page .profile-toast-global.error {
    background: var(--color-grey-800);
    color: var(--color-white);
}
.profile-page .profile-moderation-banner {
    padding: var(--spacing-md);
    border-radius: 8px;
    margin-bottom: var(--spacing-md);
    background: var(--color-grey-100);
    border: 1px solid var(--color-grey-200);
}

[data-theme="dark"] .profile-page .profile-panel-card .profile-card,
html.dark-mode .profile-page .profile-panel-card .profile-card {
    background: var(--color-grey-800);
    border-color: var(--color-grey-700);
}
[data-theme="dark"] .profile-page .profile-panel-card .profile-card-title,
html.dark-mode .profile-page .profile-panel-card .profile-card-title,
[data-theme="dark"] .profile-page .profile-panel-title,
html.dark-mode .profile-page .profile-panel-title {
    color: var(--color-grey-100);
}
[data-theme="dark"] .profile-page .profile-panel-card .profile-row label,
html.dark-mode .profile-page .profile-panel-card .profile-row label,
[data-theme="dark"] .profile-page .profile-panel-desc,
html.dark-mode .profile-page .profile-panel-desc {
    color: var(--color-grey-400);
}
[data-theme="dark"] .profile-page .profile-panel-card .profile-row select,
[data-theme="dark"] .profile-page .profile-panel-card .profile-row input,
html.dark-mode .profile-page .profile-panel-card .profile-row select,
html.dark-mode .profile-page .profile-panel-card .profile-row input {
    background: var(--color-grey-800);
    border-color: var(--color-grey-600);
    color: var(--color-grey-100);
}
[data-theme="dark"] .profile-page .profile-toggle,
html.dark-mode .profile-page .profile-toggle {
    background: var(--color-grey-600);
}
[data-theme="dark"] .profile-page .profile-safety-row,
html.dark-mode .profile-page .profile-safety-row {
    border-bottom-color: var(--color-grey-700);
}
[data-theme="dark"] .profile-page .profile-safety-name,
html.dark-mode .profile-page .profile-safety-name {
    color: var(--color-grey-200);
}
[data-theme="dark"] .profile-page .profile-empty,
html.dark-mode .profile-page .profile-empty {
    color: var(--color-grey-500);
}

[data-theme="dark"] .profile-page .profile-inpage-settings-card,
html.dark-mode .profile-page .profile-inpage-settings-card {
    background: var(--color-grey-100);
    border-color: var(--color-grey-200);
}
[data-theme="dark"] .profile-page .profile-inpage-row select,
html.dark-mode .profile-page .profile-inpage-row select {
    background: var(--color-grey-100);
    border-color: var(--color-grey-300);
    color: var(--color-black);
}

/* --- Account preferences: sections with boxes and arrows --- */
.profile-page .account-preferences-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.profile-page .preferences-section {
    margin-bottom: 0;
}
.profile-page .preferences-section-header {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-grey-600);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.5rem;
    padding: 0 0.25rem;
}
.profile-page .preferences-section-box {
    background: var(--color-white);
    border-radius: 12px;
    border: 1px solid var(--color-grey-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.profile-page .preferences-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 1.25rem;
    text-decoration: none;
    color: var(--color-black);
    font-size: 0.9375rem;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
    border-bottom: 1px solid var(--color-grey-200);
}
.profile-page .preferences-item:last-child {
    border-bottom: none;
}
.profile-page .preferences-item:hover {
    background: var(--profile-accent-light);
}
.profile-page .preferences-item-label {
    flex: 1;
    min-width: 0;
}
.profile-page .preferences-item-arrow {
    flex-shrink: 0;
    margin-left: 0.75rem;
    color: var(--color-grey-600);
    font-size: 1rem;
}
.profile-page .preferences-item:hover .preferences-item-arrow {
    color: var(--profile-accent);
}
.profile-page .preferences-item-danger .preferences-item-label {
    color: #b91c1c;
}
.profile-page .preferences-item-danger:hover {
    background: rgba(185, 28, 28, 0.06);
}
.profile-page .preferences-item-danger .preferences-item-arrow {
    color: #b91c1c;
}

/* Subsection panels (shown when clicking a preference item) */
.profile-page .preferences-subsection-panels {
    width: 100%;
}
.profile-page .preferences-subsection {
    animation: profile-subsection-in 0.2s ease-out;
}
@keyframes profile-subsection-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
.profile-page .preferences-back-btn {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.4rem 0;
    background: none;
    border: none;
    color: var(--profile-accent);
    font-size: 0.9375rem;
    cursor: pointer;
    font-family: inherit;
}
.profile-page .preferences-back-btn:hover {
    text-decoration: underline;
}
.profile-page .preferences-subsection-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-black);
    margin: 0 0 1.25rem;
}
.profile-page .profile-btn-danger {
    background: linear-gradient(180deg, #b91c1c 0%, #991b1b 100%);
    color: #fff;
    border: 1px solid rgba(185, 28, 28, 0.4);
}
.profile-page .profile-btn-danger:hover {
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);
}

/* Personal demographic information & Verifications content */
.profile-page .profile-setting-grey {
    color: var(--color-grey-600);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin: 0 0 1rem;
}
.profile-page .profile-setting-grey-small {
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.profile-page .profile-setting-blue-box {
    background: rgba(0, 51, 102, 0.08);
    border: 1px solid rgba(0, 51, 102, 0.2);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}
.profile-page .profile-btn-link {
    background: none;
    border: none;
    color: var(--profile-accent);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}
.profile-page .profile-btn-link:hover {
    text-decoration: underline;
}
.profile-page .profile-btn-remove {
    margin-top: 0.25rem;
}
.profile-page .profile-link-dynamic {
    color: var(--profile-accent);
    text-decoration: none;
    font-weight: 500;
}
.profile-page .profile-link-dynamic:hover {
    text-decoration: underline;
}
.profile-page .preferences-subsection-subtitle {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 0.75rem;
}
.profile-page .demographic-view {
    margin-top: 0.5rem;
}

/* Verifications card (white and grey box) */
.profile-page .profile-setting-white {
    color: #171717;
    font-size: 0.9375rem;
    line-height: 1.5;
    margin: 0 0 1rem;
}
.profile-page .profile-setting-white-small {
    font-size: 0.875rem;
    margin-bottom: 0;
}
.profile-page .verification-card {
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
    border: 1px solid rgba(0, 51, 102, 0.12);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 51, 102, 0.06);
}
.profile-page .verification-card-row {
    padding: 0.25rem 0;
    font-size: 0.9375rem;
}
.profile-page .verification-card-row:first-child {
    padding-top: 0;
}
.profile-page .verification-card-label {
    font-weight: 600;
    color: #171717;
}
.profile-page .verification-card-muted {
    color: #64748b;
    font-size: 0.875rem;
}
.profile-page .verification-card-actions {
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(0, 51, 102, 0.08);
}
.profile-page .profile-btn-verification-delete {
    background: #f1f5f9;
    color: var(--profile-accent);
    border: 1px solid rgba(0, 51, 102, 0.2);
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}
.profile-page .profile-btn-verification-delete:hover {
    background: rgba(0, 51, 102, 0.08);
}

.profile-page .account-sidebar-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-page .account-sidebar-block {
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
    border-radius: 14px;
    padding: 1.25rem 1.5rem 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 51, 102, 0.06), inset 0 1px 0 rgba(255,255,255,0.8);
    border: 1px solid rgba(0, 51, 102, 0.1);
}
/* In settings panels: same as other content boxes (white, black outline) */
.profile-page .profile-panel-card .account-sidebar-block {
    background: #ffffff;
    border: 1px solid #1a1a1a;
    border-radius: 10px;
    padding: 1.5rem 2rem;
    box-shadow: none;
}
.profile-page .account-sidebar-block + .account-sidebar-block {
    margin-top: 1rem;
}

/* Profile photo in name/location/industry subsection */
.profile-page .account-sidebar-block-profile-photo .profile-photo-subsection-wrap {
    margin-bottom: 0;
}
.profile-page .profile-photo-subsection-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}
.profile-page .profile-photo-subsection-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}
.profile-page .profile-photo-subsection-avatar {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(180deg, #e8eef4 0%, #e0e6ec 100%);
    border: 2px solid rgba(0, 51, 102, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.profile-page .profile-photo-subsection-avatar:hover {
    border-color: var(--profile-accent);
    box-shadow: 0 2px 12px rgba(0, 51, 102, 0.15);
}
.profile-page .profile-photo-subsection-avatar .profile-photo-file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}
.profile-page .profile-photo-subsection-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
.profile-page .profile-photo-subsection-avatar.has-photo .profile-photo-subsection-preview {
    display: block;
}
.profile-page .profile-photo-subsection-avatar.has-photo .profile-photo-subsection-placeholder {
    display: none;
}
.profile-page .profile-photo-subsection-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: #64748b;
    font-size: 0.75rem;
    text-align: center;
    padding: 0.5rem;
}
.profile-page .profile-photo-subsection-placeholder-icon {
    font-size: 1.75rem;
    line-height: 1;
}
.profile-page .profile-photo-subsection-hint {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.profile-page .account-sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 1rem;
}

.profile-page .account-sidebar-desc {
    font-size: 0.8125rem;
    color: #666;
    margin: 0 0 0.75rem;
    line-height: 1.4;
}

/* Security level: 5 option buttons */
.profile-page .security-level-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.profile-page .security-level-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(0, 51, 102, 0.2);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.profile-page .security-level-btn:hover {
    border-color: rgba(0, 51, 102, 0.45);
    background: rgba(0, 51, 102, 0.04);
}
.profile-page .security-level-btn.selected {
    border-color: var(--profile-accent, #003366);
    background: rgba(0, 51, 102, 0.08);
    box-shadow: 0 0 0 1px var(--profile-accent, #003366);
}
.profile-page .security-level-btn-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #1a1a1a;
}
.profile-page .security-level-btn-desc {
    font-size: 0.8125rem;
    color: #52525b;
    margin-top: 0.25rem;
    line-height: 1.35;
}
.profile-page .security-level-btn.selected .security-level-btn-name { color: var(--profile-accent, #003366); }
.profile-page .security-level-btn.selected .security-level-btn-desc { color: #374151; }
.profile-page .security-level-btn:focus-visible,
.profile-page .profile-btn:focus-visible {
    outline: 2px solid var(--profile-accent, #003366);
    outline-offset: 2px;
}

.profile-page .account-sidebar-form .form-group {
    margin-bottom: 0.75rem;
}

.profile-page .account-sidebar-form .form-group:last-child {
    margin-bottom: 0;
}

.profile-page .account-sidebar-form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.35rem;
}

.profile-page .account-sidebar-form input[type="text"],
.profile-page .account-sidebar-form input[type="tel"],
.profile-page .account-sidebar-form input[type="url"],
.profile-page .account-sidebar-form select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.875rem;
    background: #fff;
    color: #000;
}

.profile-page .account-sidebar-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.profile-page .account-sidebar-form .form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
}

.profile-page .name-pronunciation-box .pronunciation-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border: 1px dashed #003366;
    border-radius: 8px;
    background: rgba(10, 102, 194, 0.06);
}

.profile-page .pronunciation-icon {
    font-size: 1.1rem;
}

.profile-page .name-pronunciation-box input {
    border: none;
    background: transparent;
    padding: 0;
}

.profile-page .btn-add-new {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.4rem 0.9rem;
    background: #003366;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.profile-page .btn-add-new:hover {
    background: #004182;
}

.profile-page .account-sidebar-form .settings-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
    font-size: 0.8125rem;
}

.profile-page .directory-block {
    margin-bottom: 1rem;
}
.profile-page .directory-block.directory-card {
    padding: 1.25rem;
    border-radius: 14px;
    border: 1px solid rgba(0, 51, 102, 0.15);
    border-left: 4px solid var(--profile-accent);
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.08) 0%, rgba(0, 34, 68, 0.05) 100%);
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.06), inset 0 1px 0 rgba(255,255,255,0.6);
}
.profile-page .directory-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}
.profile-page .directory-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.18) 0%, rgba(0, 34, 68, 0.12) 100%);
    color: var(--profile-accent-dark);
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0, 51, 102, 0.12);
}
.profile-page .directory-title {
    font-weight: 700;
    color: var(--profile-accent-dark);
    font-size: 1rem;
    letter-spacing: 0.01em;
}
.profile-page .directory-block .account-sidebar-desc {
    margin-bottom: 0.85rem;
    font-size: 0.8125rem;
    color: #52525b;
    line-height: 1.45;
}
.profile-page .directory-saved-hint {
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
    color: #71717a;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.profile-page .directory-saved-hint::before {
    content: '✓';
    color: #22c55e;
    font-weight: 700;
}
.profile-page .btn-directory-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #003366;
    background: rgba(0, 51, 102, 0.1);
    border: 1px solid rgba(0, 51, 102, 0.35);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.profile-page .btn-directory-toggle:hover {
    background: rgba(0, 51, 102, 0.18);
    border-color: #003366;
    box-shadow: 0 2px 10px rgba(0, 51, 102, 0.18);
}
.profile-page .btn-directory-toggle:active {
    transform: scale(0.98);
}
.profile-page .btn-directory-toggle.in-directory {
    color: #047857;
    background: rgba(5, 150, 105, 0.12);
    border-color: rgba(5, 150, 105, 0.45);
}
.profile-page .btn-directory-toggle.in-directory:hover {
    background: rgba(5, 150, 105, 0.2);
    border-color: #047857;
    box-shadow: 0 2px 10px rgba(5, 150, 105, 0.18);
}

.profile-page .contact-info-block {
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

.profile-page .btn-sidebar-save {
    width: 100%;
    margin-top: 0.5rem;
}

/* Verifications block */
.profile-page .verification-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.profile-page .verification-item:last-child {
    border-bottom: none;
}

.profile-page .verification-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #057642;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.profile-page .verification-icon.verification-pending {
    background: #ccc;
    color: #666;
}

.profile-page .verification-item div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.profile-page .verification-status {
    font-size: 0.75rem;
    color: #057642;
}

.profile-page .verification-status.verification-pending {
    color: #666;
}

.profile-page .verification-link {
    font-size: 0.8125rem;
    color: #057642;
    text-decoration: none;
    margin-top: 0.2rem;
    display: inline-block;
}
.profile-page .verification-link:hover {
    text-decoration: underline;
}

/* Sign in & security panel: list uses .preferences-section-box + .preferences-item (same as Account preferences); subsections use blocks below */
.profile-page .security-block-label {
    font-size: 0.875rem;
    color: #52525b;
    margin: 0 0 0.35rem;
}
.profile-page .security-block-row {
    font-size: 0.9375rem;
    margin: 0 0 0.75rem;
    color: #333;
}
.profile-page .security-email-value {
    font-weight: 400;
    color: #52525b;
}
.profile-page .security-btn-add {
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}
.profile-page .security-hint {
    margin-top: 0.5rem;
    margin-bottom: 0;
}
.profile-page .security-new-password-hint {
    margin-bottom: 1rem;
}
.profile-page .security-check-require-devices {
    margin-bottom: 1rem;
}
.profile-page .security-forgot-wrap {
    margin: 0.75rem 0 0;
    font-size: 0.875rem;
}
.profile-page .security-forgot-wrap a {
    color: var(--profile-accent);
}

/* Where you're signed in – session cards */
.profile-page .security-sessions-summary {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #171717;
    margin: 0 0 1rem;
}
.profile-page .security-session-card {
    background: rgba(0, 51, 102, 0.04);
    border: 1px solid rgba(0, 51, 102, 0.1);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}
.profile-page .security-session-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #171717;
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 51, 102, 0.1);
}
.profile-page .security-session-details {
    display: grid;
    gap: 0.35rem;
    margin: 0;
}
.profile-page .security-session-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.5rem;
    font-size: 0.8125rem;
    align-items: baseline;
}
.profile-page .security-session-row dt {
    margin: 0;
    color: #64748b;
    font-weight: 500;
}
.profile-page .security-session-row dd {
    margin: 0;
    color: #171717;
}
.profile-page .security-session-list-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #171717;
    margin: 1rem 0 0.5rem;
}
.profile-page .security-session-list {
    margin-top: 0.25rem;
}
.profile-page .security-session-list .security-session-card {
    margin-bottom: 0.75rem;
}
.profile-page .security-session-list .security-session-card:last-child {
    margin-bottom: 0;
}

/* Display / Theme */
.profile-page .theme-toggle {
    display: flex;
    gap: 0.35rem;
}

.profile-page .theme-option {
    padding: 0.5rem 0.85rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.profile-page .theme-option:hover {
    border-color: #003366;
    color: #003366;
}

.profile-page .theme-option.active {
    background: #003366;
    border-color: #003366;
    color: #fff;
}

/* Sidebar spacers between sections */
.profile-page .sidebar-spacer {
    height: 1.25rem;
    flex-shrink: 0;
}

.profile-page .sidebar-link {
    display: inline-block;
    font-size: 0.875rem;
    color: #003366;
    text-decoration: none;
    margin-top: 0.35rem;
}

.profile-page .sidebar-link:hover {
    text-decoration: underline;
}

.profile-page .sidebar-link-danger {
    color: #b91c1c;
}

.profile-page .sidebar-link-danger:hover {
    color: #991b1b;
}

.profile-page .sidebar-select {
    width: 100%;
    padding: 0.45rem 0.65rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.875rem;
    background: #fff;
    color: #000;
}

/* Sidebar footer: grey line + small links */
.profile-page .sidebar-footer-divider {
    height: 1px;
    background: #ccc;
    margin: 1.5rem 0 1rem;
}

.profile-page .sidebar-footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-bottom: 1rem;
}

.profile-page .sidebar-footer-links a,
.profile-page .sidebar-footer-version {
    font-size: 0.75rem;
    color: #666;
    text-decoration: none;
}

.profile-page .sidebar-footer-links a:hover {
    color: #003366;
    text-decoration: underline;
}

.profile-page .sidebar-footer-signout {
    font-weight: 600;
    color: #333;
}

.profile-page .sidebar-footer-signout:hover {
    color: #003366;
}

.profile-page .sidebar-footer-version {
    margin-top: 0.5rem;
    color: #999;
}

/* Dark mode (profile page) */
.profile-page.theme-dark {
    background: #1a1a1a;
}

.profile-page.theme-dark .profile-intro-card,
.profile-page.theme-dark .profile-section-card,
.profile-page.theme-dark .account-sidebar-block {
    background: #2d2d2d;
    border-color: #444;
}

.profile-page.theme-dark .profile-name,
.profile-page.theme-dark .profile-section-title,
.profile-page.theme-dark .account-sidebar-title,
.profile-page.theme-dark .profile-edit-title,
.profile-page.theme-dark h2, .profile-page.theme-dark h3 {
    color: #fff;
}

.profile-page.theme-dark .profile-headline,
.profile-page.theme-dark .profile-location,
.profile-page.theme-dark .profile-industry,
.profile-page.theme-dark .profile-section-body,
.profile-page.theme-dark .profile-empty,
.profile-page.theme-dark .account-sidebar-desc,
.profile-page.theme-dark .exp-item .company,
.profile-page.theme-dark .edu-item .meta,
.profile-page.theme-dark .cert-item .meta,
.profile-page.theme-dark .exp-item .dates,
.profile-page.theme-dark .edu-item .dates,
.profile-page.theme-dark .cert-item .dates {
    color: #e0e0e0;
}

.profile-page.theme-dark .profile-nav-link {
    color: #e0e0e0;
}

.profile-page.theme-dark .profile-nav-link:hover,
.profile-page.theme-dark .profile-nav-link.active {
    color: #fff;
}

.profile-page.theme-dark .sidebar-settings-title-text {
    color: #fff;
}
.profile-page.theme-dark .sidebar-nav-main {
    border-bottom-color: #444;
    border-right-color: #444;
}
.profile-page.theme-dark .sidebar-nav-group-label {
    color: rgba(255, 255, 255, 0.38);
}
.profile-page.theme-dark .profile-combined-page-title,
.profile-page.theme-dark .profile-combined-section-title {
    color: #e2e8f0;
}
.profile-page.theme-dark .profile-combined-page-desc,
.profile-page.theme-dark .profile-combined-section-desc,
.profile-page.theme-dark .profile-combined-muted {
    color: #94a3b8;
}
.profile-page.theme-dark .profile-combined-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
.profile-page.theme-dark .profile-combined-section {
    border-top-color: rgba(255, 255, 255, 0.08);
}
.profile-page.theme-dark .profile-combined-subhead {
    color: #cbd5e1;
}
.profile-page.theme-dark .sidebar-nav-item {
    color: #b0b0b0;
}
.profile-page.theme-dark .sidebar-nav-item:hover {
    color: #7eb8ff;
    background: rgba(126, 184, 255, 0.12);
}
.profile-page.theme-dark .sidebar-nav-item.active {
    color: #7eb8ff;
    background: rgba(126, 184, 255, 0.18);
}

.profile-page.theme-dark .profile-loading,
.profile-page.theme-dark .profile-error {
    background: #2d2d2d;
    color: #e0e0e0;
}

.profile-page.theme-dark .account-sidebar-form input,
.profile-page.theme-dark .account-sidebar-form select,
.profile-page.theme-dark .profile-form input,
.profile-page.theme-dark .profile-form select,
.profile-page.theme-dark .profile-form textarea {
    background: #3d3d3d;
    border-color: #555;
    color: #fff;
}

.profile-page.theme-dark .account-sidebar-form input::placeholder,
.profile-page.theme-dark .profile-form input::placeholder {
    color: rgba(255,255,255,0.5);
}

.profile-page.theme-dark .skill-tag {
    background: #3d3d3d;
    color: #e0e0e0;
}

.profile-page.theme-dark #profileContactWrap a {
    color: #7eb8ff;
}

.profile-page.theme-dark .theme-option:not(.active) {
    background: #3d3d3d;
    border-color: #555;
    color: #e0e0e0;
}

.profile-page.theme-dark .theme-option.active {
    background: #003366;
    color: #fff;
}

.profile-page.theme-dark .sidebar-link {
    color: #7eb8ff;
}

.profile-page.theme-dark .sidebar-footer-divider {
    background: #555;
}

.profile-page.theme-dark .sidebar-footer-links a,
.profile-page.theme-dark .sidebar-footer-version {
    color: #b0b0b0;
}

.profile-page.theme-dark .sidebar-footer-links a:hover {
    color: #7eb8ff;
}

.profile-page.theme-dark .sidebar-footer-signout {
    color: #e0e0e0;
}

.profile-page .profile-section-panel {
    display: none;
}

.profile-page .profile-section-panel.active {
    display: block;
}

/* --- Section card (content panel) --- */
.profile-page .profile-section-card {
    background: var(--profile-surface);
    border-radius: var(--profile-radius-md);
    padding: var(--profile-space-6) var(--profile-space-8);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s ease;
}

.profile-page .profile-section-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.profile-page .profile-section-card .profile-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--profile-ink);
    margin: 0 0 var(--profile-space-4);
    line-height: var(--profile-line-tight);
}

.profile-page .profile-section-body {
    font-size: 0.9375rem;
    line-height: var(--profile-line-relaxed);
    color: var(--profile-ink);
    font-weight: 400;
}
.profile-page .profile-section-body p {
    margin: 0 0 var(--profile-space-3);
    padding-left: var(--profile-space-3);
    border-left: 2px solid transparent;
    transition: border-color 0.2s ease;
}
.profile-page .profile-section-body p:last-child {
    margin-bottom: 0;
}
.profile-page .profile-inline-section:hover .profile-section-body p {
    border-left-color: var(--profile-accent-light);
}

.profile-page .profile-section-card p {
    margin: 0;
    line-height: var(--profile-line-relaxed);
    color: var(--profile-ink-muted);
    font-size: 0.9375rem;
}

.profile-page .profile-empty {
    color: var(--profile-ink-muted);
    font-size: 0.875rem;
    margin: 0;
    padding: var(--profile-space-4) 0;
    line-height: var(--profile-line-normal);
}

/* --- List items (exp, edu, cert) --- */
.profile-page .exp-item,
.profile-page .edu-item,
.profile-page .cert-item {
    padding: var(--profile-space-5) 0;
    border-bottom: 1px solid var(--profile-border);
}

.profile-page .exp-item:last-child,
.profile-page .edu-item:last-child,
.profile-page .cert-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-page .exp-item:first-child,
.profile-page .edu-item:first-child,
.profile-page .cert-item:first-child {
    padding-top: 0;
}

.profile-page .exp-item h3,
.profile-page .edu-item h3,
.profile-page .cert-item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--profile-ink);
    margin: 0 0 var(--profile-space-1);
    line-height: var(--profile-line-tight);
}

.profile-page .exp-item .company,
.profile-page .edu-item .meta,
.profile-page .cert-item .meta {
    font-size: 0.875rem;
    color: var(--profile-ink-muted);
    line-height: 1.4;
}

.profile-page .exp-item .employment-type {
    font-size: 0.8125rem;
    color: var(--profile-ink-muted);
}

.profile-page .exp-item .dates,
.profile-page .edu-item .dates,
.profile-page .cert-item .dates {
    font-size: 0.8125rem;
    color: var(--profile-ink-subtle);
}

.profile-page .exp-item .description,
.profile-page .edu-item .description {
    margin-top: var(--profile-space-3);
    font-size: 0.875rem;
    color: var(--profile-ink);
    line-height: var(--profile-line-relaxed);
}

.profile-page .edu-item .grade {
    font-size: 0.875rem;
    color: var(--profile-ink-muted);
    margin-top: var(--profile-space-1);
}

.profile-page .edu-item .activities {
    font-size: 0.875rem;
    color: var(--profile-ink);
    margin-top: var(--profile-space-2);
    line-height: var(--profile-line-relaxed);
}

.profile-page .cert-item .cert-credential-id {
    font-size: 0.8125rem;
    color: var(--profile-ink-muted);
    margin-top: var(--profile-space-2);
}

.profile-page .cert-item .cert-credential-url {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--profile-accent);
    text-decoration: none;
    margin-top: var(--profile-space-2);
}

.profile-page .cert-item .cert-credential-url:hover {
    text-decoration: underline;
}

/* --- Skills --- */
.profile-page .profile-section-body.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--profile-space-3);
}

.profile-page .skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--profile-space-3);
}

.profile-page .skill-tag {
    background: linear-gradient(145deg, rgba(0, 51, 102, 0.12) 0%, rgba(0, 102, 179, 0.08) 100%);
    color: #002244;
    padding: var(--profile-space-2) var(--profile-space-4);
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 700;
    border: 1px solid rgba(0, 102, 179, 0.25);
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.1), inset 0 1px 0 rgba(255,255,255,0.5);
    transition: all 0.25s ease;
}
.profile-page .skill-tag:hover {
    background: linear-gradient(145deg, rgba(0, 102, 179, 0.2) 0%, rgba(0, 136, 224, 0.15) 100%);
    border-color: rgba(0, 102, 179, 0.4);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
}

/* --- Contact --- */
.profile-page .profile-contact-list {
    display: flex;
    flex-direction: column;
    gap: var(--profile-space-4);
}

.profile-page .profile-contact-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--profile-space-3);
}

.profile-page .profile-contact-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--profile-ink-muted);
    min-width: 4.5rem;
    line-height: 1.4;
}

.profile-page #profileContactWrap a {
    color: #003366;
    text-decoration: none;
}

.profile-page #profileContactWrap a:hover {
    text-decoration: underline;
}

/* --- Edit mode --- */
.profile-page .profile-edit-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.profile-page .profile-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 1.5rem;
}

.profile-page .profile-tab {
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #666;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color 0.15s;
}

.profile-page .profile-tab.active {
    color: #003366;
    border-bottom-color: #003366;
}

.profile-page .profile-tab:hover {
    color: #003366;
}

.profile-page .tab-panel {
    padding: var(--profile-space-8) var(--profile-space-6);
}

.profile-page .profile-edit-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--profile-ink);
    margin: 0 0 var(--profile-space-2);
    line-height: var(--profile-line-tight);
}

.profile-page .profile-edit-desc {
    font-size: 0.9375rem;
    color: var(--profile-ink-muted);
    margin: 0 0 var(--profile-space-6);
    line-height: var(--profile-line-relaxed);
}

.profile-page .profile-edit-section {
    margin-bottom: var(--profile-space-10);
}

.profile-page .profile-edit-section-title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--profile-ink);
    margin: 0 0 var(--profile-space-4);
    letter-spacing: -0.01em;
    line-height: var(--profile-line-tight);
    font-family: var(--profile-font-heading);
    padding-bottom: var(--profile-space-3);
    border-bottom: 2px solid var(--profile-border);
}

.profile-page .profile-edit-section-hint {
    font-size: 0.875rem;
    font-style: italic;
    color: var(--profile-ink-muted);
    margin: 0 0 var(--profile-space-5);
    line-height: var(--profile-line-relaxed);
}

.profile-page .profile-form .form-group {
    margin-bottom: var(--profile-space-5);
}

.profile-page .profile-form .form-group:last-child {
    margin-bottom: 0;
}

.profile-page .profile-form label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: var(--profile-space-2);
    color: var(--profile-ink);
    line-height: var(--profile-line-normal);
}

.profile-page .profile-form label.required::after {
    content: ' *';
    color: #b91c1c;
    font-weight: 700;
}

.profile-page .profile-form input,
.profile-page .profile-form textarea,
.profile-page .profile-form select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--profile-border-strong);
    border-radius: 10px;
    font-size: 0.9375rem;
    line-height: 1.4;
    background: var(--profile-surface);
    color: var(--profile-ink);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.profile-page .profile-form input:focus,
.profile-page .profile-form textarea:focus,
.profile-page .profile-form select:focus {
    outline: none;
    border-color: var(--profile-accent);
    box-shadow: 0 0 0 3px var(--profile-accent-light);
}

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

.profile-page .profile-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--profile-space-5);
}

/* --- Profile & cover photo upload (tap to choose from device) --- */
.profile-page .profile-photos-upload {
    margin: var(--profile-space-6) 0;
}
.profile-page .profile-photos-upload-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--profile-accent-dark);
    margin-bottom: var(--profile-space-3);
}
.profile-page .profile-photos-upload-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--profile-space-6);
    align-items: start;
}
@media (max-width: 640px) {
    .profile-page .profile-photos-upload-row {
        grid-template-columns: 1fr;
    }
}
.profile-page .profile-photo-upload-wrap,
.profile-page .cover-photo-upload-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.profile-page .profile-photo-upload-label,
.profile-page .cover-photo-upload-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #52525b;
}
.profile-page .profile-photo-upload,
.profile-page .cover-photo-upload {
    position: relative;
    border: 2px dashed rgba(0, 51, 102, 0.35);
    border-radius: 12px;
    background: rgba(0, 51, 102, 0.04);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden;
}
.profile-page .profile-photo-upload:hover,
.profile-page .cover-photo-upload:hover {
    border-color: var(--profile-accent);
    background: rgba(0, 51, 102, 0.08);
}
.profile-page .profile-photo-upload {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 50%;
}
.profile-page .profile-photo-file-input,
.profile-page .cover-photo-file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}
.profile-page .profile-photo-preview,
.profile-page .cover-photo-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
.profile-page .profile-photo-upload .profile-photo-preview {
    border-radius: 50%;
}
.profile-page .cover-photo-upload {
    width: 100%;
    min-height: 120px;
    max-height: 160px;
    aspect-ratio: 3 / 1;
}
.profile-page .cover-photo-preview {
    object-fit: cover;
}
.profile-page .profile-photo-placeholder,
.profile-page .cover-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    position: absolute;
    inset: 0;
    color: rgba(0, 51, 102, 0.7);
    font-size: 0.8125rem;
    font-weight: 500;
}
.profile-page .profile-photo-placeholder-icon,
.profile-page .cover-photo-placeholder-icon {
    font-size: 2rem;
    line-height: 1;
    opacity: 0.9;
}
.profile-page .cover-photo-placeholder {
    padding: 1rem;
}
.profile-page .cover-photo-placeholder-text,
.profile-page .profile-photo-placeholder-text {
    text-align: center;
    max-width: 100%;
}

.profile-page .block-list {
    display: flex;
    flex-direction: column;
    gap: var(--profile-space-4);
}

.profile-page .block-item {
    background: linear-gradient(165deg, #f8fafc 0%, #f0f4f8 100%);
    border: 1px solid var(--profile-border);
    border-left: 5px solid #0066b3;
    border-radius: var(--profile-radius-sm);
    padding: var(--profile-space-5);
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.06), inset 0 1px 0 rgba(255,255,255,0.7);
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}
.profile-page .block-item:hover {
    box-shadow: 0 8px 24px rgba(0, 51, 102, 0.12), inset 0 1px 0 rgba(255,255,255,0.7);
    border-left-color: #00a3e0;
}

.profile-page .block-item h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--profile-ink-muted);
    margin: 0 0 var(--profile-space-3);
    line-height: 1.3;
}

.profile-page .block-item .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--profile-space-4);
    margin-bottom: var(--profile-space-3);
}
.profile-page .block-item .row:last-child {
    margin-bottom: 0;
}

.profile-page .block-item .full {
    grid-column: 1 / -1;
}

.profile-page .btn-remove-block {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.8125rem;
    padding: 0.25rem 0;
    margin-top: 0.5rem;
}

.profile-page .btn-remove-block:hover {
    color: #b91c1c;
}

.profile-page .btn-add-block {
    padding: var(--profile-space-2) var(--profile-space-4);
    margin-top: var(--profile-space-3);
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 600;
    background: #fff;
    color: var(--profile-accent);
    border: 1px solid var(--profile-accent);
    cursor: pointer;
    transition: background 0.15s;
}

.profile-page .btn-add-block:hover {
    background: #e8f4fd;
}

.profile-page .settings-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.profile-page .settings-check input {
    width: auto;
}

/* Profile photos scope: radio options (circles to click) */
.profile-page .profile-photos-radio-group {
    margin-bottom: 1rem;
}
.profile-page .profile-radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: #333;
}
.profile-page .profile-radio-option:last-child {
    margin-bottom: 0;
}
.profile-page .profile-radio-option input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    margin: 0;
    accent-color: var(--profile-accent, #003366);
    cursor: pointer;
    flex-shrink: 0;
}
.profile-page .profile-radio-option .profile-radio-circle {
    display: none; /* use native radio circle */
}

.profile-page .edit-skills-input,
.profile-page #editSkillsInput {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9375rem;
    width: 100%;
}

.profile-page .profile-form-actions {
    margin-top: var(--profile-space-8);
    padding-top: var(--profile-space-5);
    border-top: 1px solid rgba(0, 51, 102, 0.12);
    display: flex;
    gap: var(--profile-space-4);
    flex-wrap: wrap;
}

.profile-page .profile-form-actions .profile-btn {
    padding: 0.65rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
}

.profile-page .profile-btn-primary {
    padding: 0.65rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    background: linear-gradient(180deg, var(--profile-accent) 0%, var(--profile-accent-dark) 100%);
    color: #fff;
    border: 1px solid rgba(0, 51, 102, 0.3);
    box-shadow: 0 2px 6px rgba(0, 34, 68, 0.3);
    transition: box-shadow 0.2s, transform 0.1s;
}
.profile-page .profile-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(0, 34, 68, 0.4);
}
.profile-page .profile-btn-primary:active {
    transform: scale(0.98);
}

.profile-page .profile-btn-secondary {
    padding: 0.65rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    background: #fff;
    color: var(--profile-accent-dark);
    border: 1px solid rgba(0, 51, 102, 0.3);
    transition: background 0.2s, border-color 0.2s;
}
.profile-page .profile-btn-secondary:hover {
    background: var(--profile-accent-light);
    border-color: var(--profile-accent);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .profile-page {
        padding: 1rem;
        --profile-banner-height: auto;
    }
    .profile-page .profile-top-banner-inner {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .profile-page .profile-layout {
        flex-direction: column;
        gap: 1rem;
    }
    .profile-page .profile-left-settings-nav {
        width: 100%;
        max-width: 100%;
        position: static;
        order: -1;
    }
    .profile-page .profile-left-settings-nav.minimized {
        width: 100%;
    }
    .profile-page .profile-left-settings-nav .sidebar-nav-main {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0.5rem;
    }
    .profile-page .settings-content-inner {
        max-height: none;
    }
    .profile-page .profile-sidebar {
        width: 100%;
        position: static;
    }
    .profile-page .account-sidebar-form .form-row-3 {
        grid-template-columns: 1fr;
    }
    .profile-page .profile-nav-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .profile-page .profile-nav-link {
        padding: 0.5rem 0.75rem;
        background: #f4f4f5;
        border-radius: 6px;
    }
    .profile-page .profile-nav-link.active {
        background: #e4e4e7;
    }
    .profile-page .profile-avatar {
        width: 80px;
        height: 80px;
        font-size: 1.5rem;
    }
    .profile-page .profile-avatar-wrap {
        margin-top: -40px;
    }
    .profile-page .profile-cover {
        min-height: 160px;
        height: 160px;
    }
    .profile-page .profile-actions {
        flex-direction: column;
    }
    .profile-page .profile-actions .btn-primary,
    .profile-page .profile-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }
    .profile-page .profile-form .form-row,
    .profile-page .block-item .row {
        grid-template-columns: 1fr;
    }
    .profile-page .profile-card-inner,
    .profile-page .tab-panel {
        padding: 1rem;
    }
}

/* ========== Dark mode: profile page – all white space black, text white/grey ========== */
[data-theme="dark"] .profile-page,
html.dark-mode .profile-page {
    background: #0d0d0d !important;
    min-height: 100vh;
}
[data-theme="dark"] .profile-page .profile-container,
[data-theme="dark"] .profile-page .profile-layout,
html.dark-mode .profile-page .profile-container,
html.dark-mode .profile-page .profile-layout {
    background: #0d0d0d !important;
}
[data-theme="dark"] .profile-page .profile-loading,
html.dark-mode .profile-page .profile-loading,
[data-theme="dark"] .profile-page .profile-error,
html.dark-mode .profile-page .profile-error {
    background: #1a1a1a !important;
    color: var(--color-grey-600);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-color: var(--color-grey-200);
}
[data-theme="dark"] .profile-page .profile-error,
html.dark-mode .profile-page .profile-error {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(30, 30, 30, 0.95) !important;
}
[data-theme="dark"] .profile-page .profile-intro-card,
html.dark-mode .profile-page .profile-intro-card {
    background: #1a1a1a !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .profile-page .profile-cover,
html.dark-mode .profile-page .profile-cover {
    background: linear-gradient(135deg, #001a33 0%, #0d2137 50%, #002244 100%);
}
[data-theme="dark"] .profile-page .profile-avatar,
html.dark-mode .profile-page .profile-avatar {
    border-color: var(--color-grey-200);
    background: var(--color-grey-300);
    color: var(--color-grey-600);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .profile-page .profile-name,
html.dark-mode .profile-page .profile-name {
    color: #f0f0f0 !important;
}
[data-theme="dark"] .profile-page .profile-headline,
html.dark-mode .profile-page .profile-headline {
    color: var(--color-grey-600);
}
/* Left sidebar – same dark blue style in dark mode */
[data-theme="dark"] .profile-page .profile-left-settings-nav,
html.dark-mode .profile-page .profile-left-settings-nav {
    background: #0f172a;
    border: 2px solid rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .profile-page .sidebar-settings-title-text,
html.dark-mode .profile-page .sidebar-settings-title-text,
[data-theme="dark"] .profile-page .profile-left-settings-nav .sidebar-nav-item,
html.dark-mode .profile-page .profile-left-settings-nav .sidebar-nav-item {
    color: rgba(255,255,255,0.9);
}
[data-theme="dark"] .profile-page .profile-left-settings-nav .sidebar-nav-item:hover,
html.dark-mode .profile-page .profile-left-settings-nav .sidebar-nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
[data-theme="dark"] .profile-page .profile-left-settings-nav .sidebar-nav-item.active,
html.dark-mode .profile-page .profile-left-settings-nav .sidebar-nav-item.active {
    color: #fff;
    background: #34495e;
}
[data-theme="dark"] .profile-page .sidebar-nav-group-label,
html.dark-mode .profile-page .sidebar-nav-group-label {
    color: rgba(255, 255, 255, 0.42);
}
[data-theme="dark"] .profile-page .profile-top-banner,
html.dark-mode .profile-page .profile-top-banner {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .profile-page .profile-top-banner-label,
html.dark-mode .profile-page .profile-top-banner-label {
    color: #f1f5f9;
}
[data-theme="dark"] .profile-page .profile-top-banner-tagline,
html.dark-mode .profile-page .profile-top-banner-tagline {
    color: #94a3b8;
}
[data-theme="dark"] .profile-page .sidebar-settings-header,
html.dark-mode .profile-page .sidebar-settings-header {
    border-bottom-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .profile-page .sidebar-header-btn,
[data-theme="dark"] .profile-page .sidebar-minimize-btn,
html.dark-mode .profile-page .sidebar-header-btn,
html.dark-mode .profile-page .sidebar-minimize-btn {
    background: #1a252f;
    color: rgba(255,255,255,0.9);
}
[data-theme="dark"] .profile-page .sidebar-header-btn:hover,
[data-theme="dark"] .profile-page .sidebar-minimize-btn:hover,
html.dark-mode .profile-page .sidebar-header-btn:hover,
html.dark-mode .profile-page .sidebar-minimize-btn:hover {
    background: #34495e;
}
/* Main content area (right of sidebar) – dark grey bg */
[data-theme="dark"] .profile-page .profile-settings-main .settings-content-inner,
html.dark-mode .profile-page .profile-settings-main .settings-content-inner {
    background: #1a1a1a !important;
    box-shadow: none;
    border: none;
}
/* Settings content boxes: dark boxes with light outline (inverse of light theme) */
[data-theme="dark"] .profile-page .profile-setting-card,
html.dark-mode .profile-page .profile-setting-card,
[data-theme="dark"] .profile-page .profile-upload-photo-block,
html.dark-mode .profile-page .profile-upload-photo-block,
[data-theme="dark"] .profile-page .profile-change-info-section,
html.dark-mode .profile-page .profile-change-info-section,
[data-theme="dark"] .profile-page .profile-panel-card .profile-card,
html.dark-mode .profile-page .profile-panel-card .profile-card,
[data-theme="dark"] .profile-page .profile-panel-card .account-sidebar-block,
html.dark-mode .profile-page .profile-panel-card .account-sidebar-block,
[data-theme="dark"] .profile-page .profile-card-placeholder,
html.dark-mode .profile-page .profile-card-placeholder {
    background: #262626 !important;
    border: 1px solid rgba(255,255,255,0.2);
}
[data-theme="dark"] .profile-page .profile-setting-card:hover,
html.dark-mode .profile-page .profile-setting-card:hover {
    background: #2d2d2d !important;
}
[data-theme="dark"] .profile-page .profile-setting-card-title,
[data-theme="dark"] .profile-page .profile-change-info-title,
[data-theme="dark"] .profile-page .profile-panel-card .profile-panel-title,
[data-theme="dark"] .profile-page .profile-panel-card .profile-card-title,
html.dark-mode .profile-page .profile-setting-card-title,
html.dark-mode .profile-page .profile-change-info-title,
html.dark-mode .profile-page .profile-panel-card .profile-panel-title,
html.dark-mode .profile-page .profile-panel-card .profile-card-title {
    color: #f0f0f0 !important;
    border-bottom-color: rgba(255,255,255,0.2);
}
[data-theme="dark"] .profile-page .profile-panel-card .profile-panel-desc,
html.dark-mode .profile-page .profile-panel-card .profile-panel-desc {
    color: #b0b0b0;
}
[data-theme="dark"] .profile-page .profile-panel-card .profile-row label,
[data-theme="dark"] .profile-page .profile-change-info-label,
html.dark-mode .profile-page .profile-panel-card .profile-row label,
html.dark-mode .profile-page .profile-change-info-label {
    color: #e0e0e0 !important;
}
[data-theme="dark"] .profile-page .profile-panel-card .profile-row select,
[data-theme="dark"] .profile-page .profile-panel-card .profile-row input,
[data-theme="dark"] .profile-page .profile-change-info-input,
html.dark-mode .profile-page .profile-panel-card .profile-row select,
html.dark-mode .profile-page .profile-panel-card .profile-row input,
html.dark-mode .profile-page .profile-change-info-input {
    background: #1a1a1a !important;
    border-color: rgba(255,255,255,0.25);
    color: #f0f0f0 !important;
}
[data-theme="dark"] .profile-page .profile-panel-actions,
[data-theme="dark"] .profile-page .profile-change-info-actions,
html.dark-mode .profile-page .profile-panel-actions,
html.dark-mode .profile-page .profile-change-info-actions {
    border-top-color: rgba(255,255,255,0.2);
}
[data-theme="dark"] .profile-page .profile-toggle,
html.dark-mode .profile-page .profile-toggle {
    background: #404040;
    border-color: rgba(255,255,255,0.3);
}
[data-theme="dark"] .profile-page .profile-toggle.on,
[data-theme="dark"] .profile-page .profile-toggle[aria-checked="true"],
html.dark-mode .profile-page .profile-toggle.on,
html.dark-mode .profile-page .profile-toggle[aria-checked="true"] {
    background: #e0e0e0;
    border-color: #e0e0e0;
}
[data-theme="dark"] .profile-page .profile-settings-main .profile-btn-primary,
[data-theme="dark"] .profile-page .profile-btn-update-info,
html.dark-mode .profile-page .profile-settings-main .profile-btn-primary,
html.dark-mode .profile-page .profile-btn-update-info {
    background: #e0e0e0 !important;
    color: #1a1a1a !important;
    border-color: #e0e0e0;
}
[data-theme="dark"] .profile-page .profile-upload-photo-block .profile-btn-primary,
html.dark-mode .profile-page .profile-upload-photo-block .profile-btn-primary {
    background: #404040 !important;
    color: #e0e0e0 !important;
    border-color: rgba(255,255,255,0.3);
}
[data-theme="dark"] .profile-page .profile-setting-card-desc,
[data-theme="dark"] .profile-page .profile-upload-photo-label,
[data-theme="dark"] .profile-page .profile-upload-photo-filename,
[data-theme="dark"] .profile-page .profile-card-placeholder .profile-card-placeholder-text,
[data-theme="dark"] .profile-page .profile-empty,
html.dark-mode .profile-page .profile-setting-card-desc,
html.dark-mode .profile-page .profile-upload-photo-label,
html.dark-mode .profile-page .profile-upload-photo-filename,
html.dark-mode .profile-page .profile-card-placeholder .profile-card-placeholder-text,
html.dark-mode .profile-page .profile-empty {
    color: #b0b0b0 !important;
}
[data-theme="dark"] .profile-page .profile-upload-photo-circle,
html.dark-mode .profile-page .profile-upload-photo-circle {
    background: #404040;
    border-color: rgba(255,255,255,0.3);
}
[data-theme="dark"] .profile-page .profile-upload-photo-circle:hover,
html.dark-mode .profile-page .profile-upload-photo-circle:hover {
    background: #505050;
    border-color: rgba(255,255,255,0.4);
}
[data-theme="dark"] .profile-page .profile-panel-card .profile-row,
[data-theme="dark"] .profile-page .profile-panel-card .profile-row-toggle,
html.dark-mode .profile-page .profile-panel-card .profile-row,
html.dark-mode .profile-page .profile-panel-card .profile-row-toggle {
    border-bottom-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .profile-page .verification-item,
html.dark-mode .profile-page .verification-item {
    border-bottom-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .profile-page .profile-inline-section,
html.dark-mode .profile-page .profile-inline-section {
    background: #1a1a1a !important;
    border-color: var(--color-grey-200);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .profile-page .profile-inline-section-title,
html.dark-mode .profile-page .profile-inline-section-title {
    color: #e5e5e5 !important;
    border-bottom-color: var(--color-grey-200);
}
[data-theme="dark"] .profile-page .profile-card,
html.dark-mode .profile-page .profile-card,
[data-theme="dark"] .profile-page .profile-card-inner,
html.dark-mode .profile-page .profile-card-inner,
[data-theme="dark"] .profile-page .preferences-section-box,
html.dark-mode .profile-page .preferences-section-box,
[data-theme="dark"] .profile-page .tab-panel,
html.dark-mode .profile-page .tab-panel {
    background: #1a1a1a !important;
    border-color: var(--color-grey-200);
}
[data-theme="dark"] .profile-page .preferences-section-header,
html.dark-mode .profile-page .preferences-section-header {
    color: #a3a3a3 !important;
}
[data-theme="dark"] .profile-page .preferences-item,
html.dark-mode .profile-page .preferences-item,
[data-theme="dark"] .profile-page .pg-card-desc,
html.dark-mode .profile-page .pg-card-desc,
[data-theme="dark"] .profile-page .profile-setting-grey,
html.dark-mode .profile-page .profile-setting-grey,
[data-theme="dark"] .profile-page .profile-setting-white,
html.dark-mode .profile-page .profile-setting-white {
    color: #e5e5e5 !important;
}
[data-theme="dark"] .profile-page .preferences-item,
html.dark-mode .profile-page .preferences-item {
    border-bottom-color: var(--color-grey-200);
}
[data-theme="dark"] .profile-page .preferences-item:hover,
html.dark-mode .profile-page .preferences-item:hover {
    background: #262626 !important;
}
[data-theme="dark"] .profile-page .preferences-item-arrow,
html.dark-mode .profile-page .preferences-item-arrow {
    color: #a3a3a3 !important;
}
[data-theme="dark"] .profile-page .profile-setting-blue-box,
html.dark-mode .profile-page .profile-setting-blue-box {
    background: #1a1a1a !important;
    border-color: var(--color-blue);
}
[data-theme="dark"] .profile-page .verification-card,
html.dark-mode .profile-page .verification-card {
    background: #1a1a1a !important;
    border-color: var(--color-grey-200);
}
[data-theme="dark"] .profile-page .preferences-section-header,
html.dark-mode .profile-page .preferences-section-header,
[data-theme="dark"] .profile-page .pg-card-title,
html.dark-mode .profile-page .pg-card-title {
    color: #f0f0f0 !important;
}
[data-theme="dark"] .profile-page input:not([type="checkbox"]):not([type="radio"]),
html.dark-mode .profile-page input:not([type="checkbox"]):not([type="radio"]),
[data-theme="dark"] .profile-page select,
html.dark-mode .profile-page select,
[data-theme="dark"] .profile-page textarea,
html.dark-mode .profile-page textarea {
    background: #262626 !important;
    border-color: var(--color-grey-200);
    color: #f0f0f0 !important;
}
[data-theme="dark"] .profile-page input::placeholder,
html.dark-mode .profile-page input::placeholder,
[data-theme="dark"] .profile-page textarea::placeholder,
html.dark-mode .profile-page textarea::placeholder {
    color: var(--color-grey-500);
}
[data-theme="dark"] .profile-page .form-label,
html.dark-mode .profile-page .form-label,
[data-theme="dark"] .profile-page label,
html.dark-mode .profile-page label {
    color: #d4d4d4 !important;
}
[data-theme="dark"] .profile-page .account-sidebar-block,
html.dark-mode .profile-page .account-sidebar-block,
[data-theme="dark"] .profile-page .account-sidebar-title,
html.dark-mode .profile-page .account-sidebar-title,
[data-theme="dark"] .profile-page .account-sidebar-desc,
html.dark-mode .profile-page .account-sidebar-desc {
    color: #e5e5e5 !important;
}
[data-theme="dark"] .profile-page .profile-form-inline .profile-edit-section,
html.dark-mode .profile-page .profile-form-inline .profile-edit-section,
[data-theme="dark"] .profile-page .profile-form-inline .profile-form-actions,
html.dark-mode .profile-page .profile-form-inline .profile-form-actions {
    border-color: var(--color-grey-200);
}

/* =============================================================================
   Settings studio — combined settings panels (modern / editorial polish)
   Scoped to .profile-settings-studio inside .profile-settings-main only.
   ============================================================================= */
.profile-page .profile-settings-main {
    padding-left: clamp(1rem, 2.5vw, 1.75rem);
}
.profile-page .profile-layout--settings .profile-settings-main {
    padding-left: 0;
    padding-right: 0;
}

.profile-page .profile-settings-studio {
    --ps-radius-shell: 16px;
    --ps-radius-card: 14px;
    --ps-radius-control: 10px;
    --ps-ink: #0f172a;
    --ps-ink-secondary: #1f2937;
    --ps-ink-muted: #475569;
    --ps-line: rgba(15, 23, 42, 0.22);
    --ps-line-strong: rgba(15, 23, 42, 0.45);
    --ps-surface: #ffffff;
    --ps-surface-subtle: #f8fafc;
    --ps-accent-soft: rgba(15, 23, 42, 0.06);
    --ps-shadow-float: 0 1px 0 rgba(15, 23, 42, 0.06), 0 10px 32px rgba(15, 23, 42, 0.06);
    --ps-shadow-card: 0 1px 0 rgba(15, 23, 42, 0.05), 0 6px 20px rgba(15, 23, 42, 0.04);
    /* Outer padding so all switched panels align with the toolbar/overview edges */
    padding: 1.05rem 1.05rem 2rem;
    max-height: min(82vh, 920px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, 0.22) transparent;
}
.profile-page .profile-settings-studio::-webkit-scrollbar {
    width: 7px;
}
.profile-page .profile-settings-studio::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.16);
    border-radius: 8px;
}

/* Sticky toolbar + quick nav (inside scroll area) */
.profile-page .profile-settings-studio .profile-settings-studio-toolbar {
    position: sticky;
    top: 0;
    z-index: 12;
    margin: 0 0 1.35rem;
    padding: 0.9rem 1rem 1rem;
    background: var(--ps-surface-subtle);
    background: color-mix(in srgb, var(--ps-surface-subtle) 92%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 3px solid var(--ps-line);
    border-radius: var(--ps-radius-shell);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05);
}
.profile-page .profile-settings-studio .profile-settings-toolbar-row--chips {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}
.profile-page .profile-settings-studio .profile-settings-toolbar-label {
    flex: 0 0 auto;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ps-ink-muted);
    padding-top: 0.35rem;
}
.profile-page .profile-settings-studio .profile-settings-quick-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    flex: 1;
    min-width: 0;
}
.profile-page .profile-settings-studio .profile-quick-nav-chip {
    appearance: none;
    border: 3px solid var(--ps-line-strong);
    background: var(--ps-surface);
    color: var(--ps-ink-secondary);
    font-family: var(--profile-font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    padding: 0.42rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.profile-page .profile-settings-studio .profile-quick-nav-chip:hover {
    border-color: #0f172a;
    color: #0f172a;
    background: #fff;
    background: color-mix(in srgb, var(--ps-surface) 88%, var(--ps-surface-subtle));
}
.profile-page .profile-settings-studio .profile-quick-nav-chip.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}
.profile-page .profile-settings-studio .profile-settings-toolbar-row--actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.85rem 1.25rem;
}
.profile-page .profile-settings-studio .profile-settings-toolbar-hint {
    flex: 1 1 220px;
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    font-weight: 500;
    color: var(--ps-ink-muted);
    max-width: 42rem;
}
.profile-page .profile-settings-studio .profile-settings-toolbar-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
    align-items: center;
}
.profile-page .profile-settings-studio .profile-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-family: var(--profile-font-body);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    padding: 0.5rem 0.95rem;
    border-radius: 10px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    white-space: nowrap;
}
.profile-page .profile-settings-studio .profile-toolbar-btn--primary {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}
.profile-page .profile-settings-studio .profile-toolbar-btn--primary:hover {
    filter: brightness(1.06);
}
.profile-page .profile-settings-studio .profile-toolbar-btn--secondary {
    background: var(--ps-surface);
    border-color: var(--ps-line-strong);
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.profile-page .profile-settings-studio .profile-toolbar-btn--secondary:hover {
    border-color: #0f172a;
    background: var(--ps-surface-subtle);
}
.profile-page .profile-settings-studio .profile-toolbar-btn--ghost {
    background: transparent;
    border-color: var(--ps-line-strong);
    color: var(--ps-ink-secondary);
    min-width: 3.25rem;
}
.profile-page .profile-settings-studio .profile-toolbar-btn--ghost:hover {
    border-color: #0f172a;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.65);
}
.profile-page .profile-settings-studio .profile-toolbar-btn--ghost.is-at-top {
    opacity: 0.45;
    pointer-events: none;
}
@media (max-width: 640px) {
    .profile-page .profile-settings-studio .profile-settings-toolbar-row--actions {
        flex-direction: column;
        align-items: stretch;
    }
    .profile-page .profile-settings-studio .profile-settings-toolbar-buttons {
        justify-content: stretch;
    }
    .profile-page .profile-settings-studio .profile-toolbar-btn,
    .profile-page .profile-settings-studio .profile-toolbar-btn--primary {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* Settings overview (uses the blank space under toolbar) */
.profile-page .profile-settings-overview {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 0 0 1.25rem;
}
.profile-page .profile-settings-overview-card {
    background: var(--ps-surface-subtle);
    border: 3px solid var(--ps-line-strong);
    border-radius: var(--ps-radius-shell);
    padding: 0.95rem 1rem;
}
.profile-page .profile-settings-overview-title {
    font-size: 0.6875rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ps-ink-muted);
    margin: 0 0 0.65rem;
}
.profile-page .profile-settings-progress-wrap {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 0.25rem;
}
.profile-page .profile-settings-progress-bar {
    flex: 1;
    height: 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.12);
    overflow: hidden;
}
.profile-page .profile-settings-progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: #0f172a;
    border-radius: 999px;
    transition: width 0.35s ease;
}
.profile-page .profile-settings-progress-pct {
    font-weight: 900;
    color: var(--ps-ink);
    font-size: 0.9rem;
    min-width: 3.2rem;
    text-align: right;
}
.profile-page .profile-settings-overview-hint,
.profile-page .profile-settings-overview-sub {
    margin: 0.65rem 0 0;
    color: var(--ps-ink-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
    font-weight: 600;
}
.profile-page .profile-settings-overview-value {
    margin: 0.15rem 0 0;
    color: var(--ps-ink);
    font-weight: 800;
}
.profile-page .profile-settings-suggest {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.profile-page .profile-settings-suggest-refresh {
    width: 100%;
    margin-top: 0.65rem;
    border-radius: 12px;
    border: 3px solid var(--ps-line-strong);
    background: var(--ps-surface);
    color: var(--ps-ink);
    font-weight: 900;
    padding: 0.55rem 0.8rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.profile-page .profile-settings-suggest-refresh:hover {
    transform: translateY(-1px);
    background: var(--ps-surface-subtle);
    border-color: rgba(15, 23, 42, 0.45);
}
.profile-page .profile-settings-suggest-btn {
    width: 100%;
    text-align: left;
    border-radius: 12px;
    border: 3px solid var(--ps-line-strong);
    background: var(--ps-surface);
    color: var(--ps-ink);
    font-weight: 900;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    font-size: 0.8125rem;
    line-height: 1.3;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.profile-page .profile-settings-suggest-btn:hover {
    transform: translateY(-1px);
    background: var(--ps-surface-subtle);
    border-color: rgba(15, 23, 42, 0.45);
}

@media (min-width: 980px) {
    .profile-page .profile-settings-overview {
        grid-template-columns: 1.2fr 0.9fr 1fr;
    }
}

.profile-page.theme-dark .profile-settings-overview-card,
[data-theme="dark"] .profile-page .profile-settings-overview-card,
html.dark-mode .profile-page .profile-settings-overview-card {
    background: rgba(20, 24, 31, 0.65);
    border-color: rgba(255, 255, 255, 0.18);
}
.profile-page.theme-dark .profile-settings-overview-hint,
.profile-page.theme-dark .profile-settings-overview-sub,
[data-theme="dark"] .profile-page .profile-settings-overview-hint,
[data-theme="dark"] .profile-page .profile-settings-overview-sub,
html.dark-mode .profile-page .profile-settings-overview-hint,
html.dark-mode .profile-page .profile-settings-overview-sub {
    color: rgba(148, 163, 184, 0.95);
}
.profile-page.theme-dark .profile-settings-overview-value,
.profile-page.theme-dark .profile-settings-suggest-btn,
.profile-page.theme-dark .profile-settings-suggest-refresh,
[data-theme="dark"] .profile-page .profile-settings-overview-value,
[data-theme="dark"] .profile-page .profile-settings-suggest-btn,
[data-theme="dark"] .profile-page .profile-settings-suggest-refresh,
html.dark-mode .profile-page .profile-settings-overview-value,
html.dark-mode .profile-page .profile-settings-suggest-btn,
html.dark-mode .profile-page .profile-settings-suggest-refresh {
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(26, 31, 46, 0.8);
}

/* Main sheet — left-aligned in column, even padding */
.profile-page .profile-settings-studio .profile-combined-panel .profile-panel-inner {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 1.6rem 1.6rem 1.85rem;
    background: var(--ps-surface);
    border-radius: var(--ps-radius-shell);
    border: 2px solid var(--ps-line-strong);
    box-shadow: var(--ps-shadow-float);
    position: relative;
    overflow: hidden;
}
.profile-page .profile-settings-studio .profile-combined-panel .profile-panel-inner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #0f172a;
    opacity: 1;
    pointer-events: none;
}

/* Hero header */
.profile-page .profile-settings-studio .profile-combined-header {
    margin: 0 0 1.65rem;
    padding: 0 0 1.35rem;
    border-bottom: 2px solid var(--ps-line);
}
.profile-page .profile-settings-studio .profile-combined-page-title {
    font-family: var(--profile-font-body);
    font-size: clamp(1.4rem, 2.2vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.18;
    color: var(--ps-ink);
    margin: 0;
    max-width: none;
}
.profile-page .profile-settings-studio .profile-combined-page-desc {
    margin: 0.75rem 0 0;
    font-size: 0.98rem;
    line-height: 1.62;
    color: var(--ps-ink-secondary);
    max-width: 40rem;
    font-weight: 500;
}

/* Section rhythm */
.profile-page .profile-settings-studio .profile-combined-section {
    margin-top: 2.125rem;
    padding-top: 0;
    border-top: none;
    scroll-margin-top: 1rem;
}
.profile-page .profile-settings-studio .profile-combined-section:first-of-type {
    margin-top: 1.1rem;
}
.profile-page .profile-settings-studio .profile-combined-section-title {
    font-family: var(--profile-font-body);
    font-size: 1.0825rem;
    font-weight: 700;
    letter-spacing: -0.022em;
    color: var(--ps-ink);
    margin: 0 0 0.45rem;
    line-height: 1.28;
}
.profile-page .profile-settings-studio .profile-combined-section-desc {
    font-size: 0.9375rem;
    line-height: 1.62;
    color: var(--ps-ink-secondary);
    margin: 0 0 1.35rem;
    max-width: 38rem;
    font-weight: 500;
}
.profile-page .profile-settings-studio .profile-combined-subhead {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ps-ink-muted);
    margin: 1.35rem 0 0.65rem;
}

/* Photo */
.profile-page .profile-settings-studio .profile-upload-photo-block {
    background: var(--ps-surface-subtle);
    border: 2px solid var(--ps-line-strong);
    border-radius: var(--ps-radius-card);
    padding: clamp(1.2rem, 2.8vw, 1.65rem);
    margin-bottom: 1.6rem;
    box-shadow: var(--ps-shadow-card);
}
.profile-page .profile-settings-studio .profile-upload-photo-wrap {
    gap: clamp(1rem, 2.5vw, 1.5rem);
}
.profile-page .profile-settings-studio .profile-upload-photo-circle {
    width: 108px;
    height: 108px;
    border: 3px solid #fff;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.12);
    background: linear-gradient(145deg, #e8eef9 0%, #f1f5f9 100%);
    transition: box-shadow 0.22s ease, transform 0.22s ease;
}
.profile-page .profile-settings-studio .profile-upload-photo-circle:hover {
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    transform: scale(1.02);
    border-color: #fff;
}
.profile-page .profile-settings-studio .profile-upload-photo-label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--ps-ink);
}
.profile-page .profile-settings-studio .profile-upload-photo-filename {
    font-size: 0.8125rem;
    color: var(--ps-ink-muted);
}
.profile-page .profile-settings-studio .profile-upload-photo-block .profile-btn-primary {
    background: var(--ps-ink);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1.3rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 3px 12px rgba(12, 18, 34, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.profile-page .profile-settings-studio .profile-upload-photo-block .profile-btn-primary:hover {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(12, 18, 34, 0.22);
}

/* Quick account form */
.profile-page .profile-settings-studio .profile-change-info-section {
    background: var(--ps-surface);
    border: 2px solid var(--ps-line-strong);
    border-radius: var(--ps-radius-card);
    padding: clamp(1.3rem, 3.2vw, 1.9rem);
    box-shadow: var(--ps-shadow-card);
}
.profile-page .profile-settings-studio .profile-change-info-title {
    font-family: var(--profile-font-body);
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ps-ink-muted);
    margin: 0 0 1.2rem;
    padding: 0 0 0.85rem;
    border-bottom: 2px solid var(--ps-line);
}
.profile-page .profile-settings-studio .profile-change-info-form {
    gap: 1.1rem 1.35rem;
}
.profile-page .profile-settings-studio .profile-change-info-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ps-ink-secondary);
    letter-spacing: 0.015em;
}
.profile-page .profile-settings-studio .profile-change-info-input {
    border: 2px solid var(--ps-line-strong);
    border-radius: var(--ps-radius-control);
    padding: 0.65rem 0.95rem;
    font-size: 0.9375rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.profile-page .profile-settings-studio .profile-change-info-input:focus {
    border-color: #0f172a;
    box-shadow: 0 0 0 3px var(--ps-accent-soft);
    background: #fff;
    outline: none;
}
.profile-page .profile-settings-studio .profile-change-info-input::placeholder {
    color: #a1a8b8;
}
.profile-page .profile-settings-studio .profile-change-info-actions {
    border-top: 2px solid var(--ps-line);
    margin-top: 1.35rem;
    padding-top: 1.2rem;
}
.profile-page .profile-settings-studio .profile-btn-update-info {
    border-radius: 10px;
    border: 2px solid #0f172a;
    background: #0f172a;
    color: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
    min-width: auto;
    padding: 0.72rem 1.65rem;
    font-size: 0.9375rem;
    font-weight: 700;
}
.profile-page .profile-settings-studio .profile-btn-update-info:hover {
    filter: brightness(1.08);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
}

.profile-page .profile-settings-studio .profile-btn-secondary {
    border-radius: 10px;
    padding: 0.62rem 1.45rem;
    font-weight: 600;
    font-size: 0.875rem;
    border: 2px solid var(--ps-line-strong);
    background: #fff;
    color: var(--ps-ink);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.profile-page .profile-settings-studio .profile-btn-secondary:hover {
    border-color: #0f172a;
    background: var(--ps-surface-subtle);
    color: #0f172a;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

/* Setting cards */
.profile-page .profile-settings-studio .profile-panel-card .profile-card {
    background: var(--ps-surface);
    border: 3px solid var(--ps-line-strong);
    border-radius: var(--ps-radius-card);
    padding: 1.2rem 1.5rem 1.1rem;
    margin-bottom: 1.15rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08), 0 1px 0 rgba(15, 23, 42, 0.04);
}
.profile-page .profile-settings-studio .profile-panel-card .profile-card:last-of-type {
    margin-bottom: 0;
}
.profile-page .profile-settings-studio .profile-panel-card .profile-card-title {
    font-family: var(--profile-font-body);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ps-ink-secondary);
    /* Visible section rule under labels like “Who can message you” (was removed / read as faint “dots”) */
    border-bottom: 3px solid #0f172a;
    padding-bottom: 0.85rem;
    margin: 0 0 1rem;
    line-height: 1.3;
}
.profile-page .profile-settings-studio .profile-panel-card .profile-row {
    padding: 1.05rem 0;
    border-bottom: 3px solid var(--ps-line);
    gap: 0.45rem;
}
.profile-page .profile-settings-studio .profile-panel-card .profile-row label,
.profile-page .profile-settings-studio .profile-panel-card .profile-row-toggle label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ps-ink);
    line-height: 1.45;
}
.profile-page .profile-settings-studio .profile-panel-card .profile-row select,
.profile-page .profile-settings-studio .profile-panel-card .profile-row input[type="text"],
.profile-page .profile-settings-studio .profile-panel-card .profile-row input[type="time"] {
    border-radius: var(--ps-radius-control);
    border: 3px solid var(--ps-line-strong);
    padding: 0.58rem 0.9rem;
    background: var(--ps-surface-subtle);
    font-size: 0.9375rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.profile-page .profile-settings-studio .profile-panel-card .profile-row select:focus,
.profile-page .profile-settings-studio .profile-panel-card .profile-row input:focus {
    border-color: #0f172a;
    box-shadow: 0 0 0 3px var(--ps-accent-soft);
    background: #fff;
    outline: none;
}
.profile-page .profile-settings-studio .profile-panel-card .profile-row-toggle {
    padding: 0.95rem 0;
    border-bottom: 3px solid var(--ps-line);
    align-items: center;
    gap: 1rem;
}

/* iOS-style toggles */
.profile-page .profile-settings-studio .profile-toggle {
    width: 48px;
    height: 28px;
    border-radius: 14px;
    background: #e2e8f0;
    border: none;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.07);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.profile-page .profile-settings-studio .profile-toggle::after {
    width: 22px;
    height: 22px;
    top: 3px;
    left: 3px;
    border: none;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
    transition: transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.profile-page .profile-settings-studio .profile-toggle.on,
.profile-page .profile-settings-studio .profile-toggle[aria-checked="true"] {
    background: #0f172a;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.2);
}
.profile-page .profile-settings-studio .profile-toggle.on::after,
.profile-page .profile-settings-studio .profile-toggle[aria-checked="true"]::after {
    transform: translateX(20px);
}

.profile-page .profile-settings-studio .profile-panel-actions {
    margin-top: 1.1rem;
    padding-top: 1.15rem;
    border-top: 2px solid var(--ps-line);
}
.profile-page .profile-settings-studio .profile-panel-actions .profile-btn-primary {
    border-radius: 10px;
    border: 2px solid #0f172a;
    background: #0f172a;
    color: #fff;
    padding: 0.65rem 1.6rem;
    font-size: 0.9375rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
    min-width: auto;
}
.profile-page .profile-settings-studio .profile-panel-actions .profile-btn-primary:hover {
    filter: brightness(1.08);
}

/* Empty / placeholder states */
.profile-page .profile-settings-studio .profile-card-placeholder {
    background: var(--ps-surface-subtle);
    border: 2px dashed var(--ps-line-strong);
    border-radius: var(--ps-radius-card);
    padding: clamp(1.65rem, 3.5vw, 2.35rem);
    box-shadow: var(--ps-shadow-card);
    text-align: left;
}

.profile-page .profile-settings-studio .profile-card-placeholder-cta {
    margin-top: 1rem;
}

.profile-page .profile-settings-studio .profile-card-placeholder .profile-card-placeholder-cta .profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
}
.profile-page .profile-settings-studio .profile-card-placeholder .profile-card-placeholder-text {
    color: var(--ps-ink-secondary);
    font-size: 0.9375rem;
    line-height: 1.62;
    max-width: 36ch;
}
.profile-page .profile-settings-studio .profile-card-placeholder .profile-card-placeholder-cta .profile-btn {
    border-radius: 10px;
    border: 2px solid #0f172a;
    background: #0f172a;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}
.profile-page .profile-settings-studio .profile-card-placeholder .profile-card-placeholder-cta .profile-btn:hover {
    filter: brightness(1.05);
}

.profile-page .profile-settings-studio .profile-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: 0.9375rem;
    color: var(--ps-ink-muted);
    background: var(--ps-surface-subtle);
    border-radius: var(--ps-radius-control);
    border: 2px dashed var(--ps-line-strong);
}

/* Verifications */
.profile-page .profile-settings-studio .profile-card.verifications-block {
    padding: 0.35rem 1.35rem 0.5rem;
}
.profile-page .profile-settings-studio .verification-item {
    padding: 1rem 0;
    border-bottom-color: var(--ps-line);
}
.profile-page .profile-settings-studio .verification-icon {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
}

/* Lists (blocked / muted / reports) */
.profile-page .profile-settings-studio .profile-safety-row {
    padding: 0.85rem 0.65rem;
    border-bottom: 2px solid var(--ps-line);
    border-radius: 10px;
    margin: 0.15rem 0;
    transition: background 0.15s ease;
}

/* Studio feature tiles — shared card shell (billing, careers, profile) */
.profile-page .profile-settings-studio #panel-settings-billing .profile-billing-card,
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-card,
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-recommendations-card,
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-cta-card,
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-card {
    border-width: 2px !important;
    border-color: var(--ps-line-strong) !important;
    border-radius: var(--ps-radius-card);
    padding: 1.2rem 1.35rem 1.1rem !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 8px 22px rgba(15, 23, 42, 0.06);
}
.profile-page .profile-settings-studio #panel-settings-billing .profile-billing-card .profile-card-title,
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-card .profile-card-title,
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-recommendations-card .profile-card-title,
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-cta-card .profile-card-title,
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-card .profile-card-title {
    border-bottom-width: 2px !important;
    border-bottom-color: var(--ps-line-strong) !important;
    border-bottom-style: solid !important;
    padding-bottom: 0.55rem !important;
    margin: 0 0 0.8rem !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.07em !important;
    color: var(--ps-ink) !important;
}

/* Payments & subscription — two-column plan cards */
.profile-page .profile-settings-studio #panel-settings-billing .profile-billing-section {
    margin-top: 0;
}
.profile-page .profile-settings-studio #panel-settings-billing .profile-billing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}
.profile-page .profile-settings-studio #panel-settings-billing .profile-billing-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    min-height: 100%;
}
.profile-page .profile-settings-studio #panel-settings-billing .profile-billing-lead {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ps-ink-muted);
    line-height: 1.45;
    margin: 0 0 0.6rem;
    letter-spacing: -0.01em;
}
.profile-page .profile-settings-studio #panel-settings-billing .profile-billing-text {
    flex: 1 1 auto;
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.58;
    color: var(--ps-ink-secondary);
    max-width: none;
}
.profile-page .profile-settings-studio #panel-settings-billing .profile-billing-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--ps-line);
}
.profile-page .profile-settings-studio #panel-settings-billing .profile-billing-footer .profile-btn {
    display: inline-flex;
    width: 100%;
    max-width: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}
@media (max-width: 900px) {
    .profile-page .profile-settings-studio #panel-settings-billing .profile-billing-grid {
        grid-template-columns: 1fr;
    }
}

.profile-page.theme-dark .profile-settings-studio #panel-settings-billing .profile-billing-lead,
[data-theme="dark"] .profile-page .profile-settings-studio #panel-settings-billing .profile-billing-lead,
html.dark-mode .profile-page .profile-settings-studio #panel-settings-billing .profile-billing-lead {
    color: #94a3b8;
}
.profile-page.theme-dark .profile-settings-studio #panel-settings-billing .profile-billing-text,
[data-theme="dark"] .profile-page .profile-settings-studio #panel-settings-billing .profile-billing-text,
html.dark-mode .profile-page .profile-settings-studio #panel-settings-billing .profile-billing-text {
    color: #cbd5e1;
}
.profile-page.theme-dark .profile-settings-studio #panel-settings-billing .profile-billing-footer,
[data-theme="dark"] .profile-page .profile-settings-studio #panel-settings-billing .profile-billing-footer,
html.dark-mode .profile-page .profile-settings-studio #panel-settings-billing .profile-billing-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Job preferences, hiring & recommendations — match Payments layout */
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-section {
    margin-top: 0;
}
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-top-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    min-height: 100%;
}
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-lead {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ps-ink-muted);
    line-height: 1.45;
    margin: 0 0 0.6rem;
    letter-spacing: -0.01em;
}
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-text {
    flex: 1 1 auto;
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.58;
    color: var(--ps-ink-secondary);
    max-width: none;
}
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--ps-line);
}
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-footer .profile-btn {
    display: inline-flex;
    width: 100%;
    max-width: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-recommendations-wrap {
    margin-top: 1rem;
}
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-recommendations-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-recommendations-body {
    margin: 0.35rem 0 0;
    flex: 1 1 auto;
}
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-recommendations-body .profile-row {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-recommendations-body .profile-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-footer--actions {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--ps-line);
}
.profile-page .profile-settings-studio #panel-settings-careers .profile-careers-footer--actions .profile-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
@media (max-width: 900px) {
    .profile-page .profile-settings-studio #panel-settings-careers .profile-careers-top-grid {
        grid-template-columns: 1fr;
    }
}
.profile-page.theme-dark .profile-settings-studio #panel-settings-careers .profile-careers-lead,
[data-theme="dark"] .profile-page .profile-settings-studio #panel-settings-careers .profile-careers-lead,
html.dark-mode .profile-page .profile-settings-studio #panel-settings-careers .profile-careers-lead {
    color: #94a3b8;
}
.profile-page.theme-dark .profile-settings-studio #panel-settings-careers .profile-careers-text,
[data-theme="dark"] .profile-page .profile-settings-studio #panel-settings-careers .profile-careers-text,
html.dark-mode .profile-page .profile-settings-studio #panel-settings-careers .profile-careers-text {
    color: #cbd5e1;
}
.profile-page.theme-dark .profile-settings-studio #panel-settings-careers .profile-careers-footer,
.profile-page.theme-dark .profile-settings-studio #panel-settings-careers .profile-careers-footer--actions,
[data-theme="dark"] .profile-page .profile-settings-studio #panel-settings-careers .profile-careers-footer,
[data-theme="dark"] .profile-page .profile-settings-studio #panel-settings-careers .profile-careers-footer--actions,
html.dark-mode .profile-page .profile-settings-studio #panel-settings-careers .profile-careers-footer,
html.dark-mode .profile-page .profile-settings-studio #panel-settings-careers .profile-careers-footer--actions {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Profile & profile setup — vertical rhythm above tiles */
.profile-page .profile-settings-studio #panel-settings-profile .profile-upload-photo-block {
    margin-bottom: 1rem;
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-change-info-section {
    margin-bottom: 1rem;
}

/* Profile & profile setup — editor + team grid, theme in one card */
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-cta-section {
    margin-top: 0;
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-top-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-cta-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    min-height: 100%;
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-lead {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ps-ink-muted);
    line-height: 1.45;
    margin: 0 0 0.6rem;
    letter-spacing: -0.01em;
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-text {
    flex: 1 1 auto;
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.58;
    color: var(--ps-ink-secondary);
    max-width: none;
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--ps-line);
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-footer .profile-btn,
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-footer .profile-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-wrap {
    margin-top: 1rem;
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-card {
    margin-bottom: 0;
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.15rem;
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-panel {
    background: var(--ps-surface-subtle);
    border: 1px solid var(--ps-line);
    border-radius: 12px;
    padding: 0.95rem 1.05rem 1rem;
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-panel .profile-profile-theme-subhead {
    margin: 0 0 0.65rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--ps-line);
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ps-ink-muted);
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-field {
    margin-bottom: 0.7rem;
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-field:last-child {
    margin-bottom: 0;
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-panel .display-mode-group {
    margin-bottom: 0;
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ps-ink-secondary);
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-checks {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.15rem;
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-panel .settings-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ps-ink);
    cursor: pointer;
}
.profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-panel .profile-profile-feed-label {
    margin: 0 0 0.55rem;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ps-ink-muted);
}
@media (max-width: 900px) {
    .profile-page .profile-settings-studio #panel-settings-profile .profile-profile-top-grid {
        grid-template-columns: 1fr;
    }
}
.profile-page.theme-dark .profile-settings-studio #panel-settings-profile .profile-profile-lead,
[data-theme="dark"] .profile-page .profile-settings-studio #panel-settings-profile .profile-profile-lead,
html.dark-mode .profile-page .profile-settings-studio #panel-settings-profile .profile-profile-lead {
    color: #94a3b8;
}
.profile-page.theme-dark .profile-settings-studio #panel-settings-profile .profile-profile-text,
[data-theme="dark"] .profile-page .profile-settings-studio #panel-settings-profile .profile-profile-text,
html.dark-mode .profile-page .profile-settings-studio #panel-settings-profile .profile-profile-text {
    color: #cbd5e1;
}
.profile-page.theme-dark .profile-settings-studio #panel-settings-profile .profile-profile-footer,
[data-theme="dark"] .profile-page .profile-settings-studio #panel-settings-profile .profile-profile-footer,
html.dark-mode .profile-page .profile-settings-studio #panel-settings-profile .profile-profile-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}
.profile-page.theme-dark .profile-settings-studio #panel-settings-profile .profile-profile-theme-body .form-group label,
[data-theme="dark"] .profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-body .form-group label,
html.dark-mode .profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-body .form-group label {
    color: #cbd5e1;
}
.profile-page.theme-dark .profile-settings-studio #panel-settings-profile .profile-profile-theme-panel,
[data-theme="dark"] .profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-panel,
html.dark-mode .profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-panel {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}
.profile-page.theme-dark .profile-settings-studio #panel-settings-profile .profile-profile-theme-panel .profile-profile-theme-subhead,
[data-theme="dark"] .profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-panel .profile-profile-theme-subhead,
html.dark-mode .profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-panel .profile-profile-theme-subhead {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
.profile-page.theme-dark .profile-settings-studio #panel-settings-profile .profile-profile-theme-field label,
[data-theme="dark"] .profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-field label,
html.dark-mode .profile-page .profile-settings-studio #panel-settings-profile .profile-profile-theme-field label {
    color: #cbd5e1;
}

/* Messaging now follows shared studio card/row style (same as Profile section) */
.profile-page .profile-settings-studio .profile-safety-row:hover {
    background: var(--ps-accent-soft);
}
.profile-page .profile-settings-studio .profile-safety-name {
    font-weight: 500;
    color: var(--ps-ink);
}

/* Segmented theme control */
.profile-page .profile-settings-studio .theme-toggle {
    display: inline-flex;
    padding: 5px;
    background: var(--ps-surface-subtle);
    border-radius: 999px;
    border: 2px solid var(--ps-line-strong);
    gap: 4px;
    flex-wrap: wrap;
}
.profile-page .profile-settings-studio .theme-option {
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1.2rem;
    font-size: 0.8125rem;
    font-weight: 600;
    background: transparent;
    color: var(--ps-ink-secondary);
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.profile-page .profile-settings-studio .theme-option:hover {
    color: var(--ps-ink);
    background: rgba(255, 255, 255, 0.85);
}
.profile-page .profile-settings-studio .theme-option.active {
    background: #0f172a;
    color: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

.profile-page .profile-settings-studio .account-sidebar-block.display-block .form-group label,
.profile-page .profile-settings-studio .account-sidebar-block .form-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ps-ink-secondary);
    margin-bottom: 0.35rem;
}
.profile-page .profile-settings-studio .sidebar-select {
    border-radius: var(--ps-radius-control);
    border: 2px solid var(--ps-line-strong);
    padding: 0.52rem 0.8rem;
    width: 100%;
    max-width: 300px;
    font-size: 0.9375rem;
    background: var(--ps-surface-subtle);
}
.profile-page .profile-settings-studio .settings-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.55rem 0;
    font-size: 0.9375rem;
    color: var(--ps-ink-secondary);
}

.profile-page .profile-settings-studio .profile-moderation-banner {
    border-radius: var(--ps-radius-control);
    border: 2px solid var(--ps-line-strong);
    background: var(--ps-surface-subtle);
}

/* Primary links as pills inside studio */
.profile-page .profile-settings-studio a.profile-btn-primary[data-switch-panel] {
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@keyframes profilePanelStudioIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.profile-page .profile-settings-main .sidebar-panel.active {
    animation: profilePanelStudioIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Nav rail — flat slate (no blue/purple gradient) */
.profile-page .profile-left-settings-nav {
    width: min(302px, 100%);
    background: #0f172a;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.06);
}
.profile-page .profile-left-settings-nav .sidebar-settings-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
.profile-page .profile-left-settings-nav .sidebar-nav-item {
    border-radius: 11px;
}
.profile-page .profile-left-settings-nav .sidebar-nav-item.active {
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    font-weight: 600;
}
.profile-page .sidebar-nav-main.sidebar-nav-main-combined .nav-label {
    font-size: 0.78rem;
    line-height: 1.35;
}

/* Stronger studio strokes (bolder boxes) */
.profile-page .profile-settings-studio .profile-combined-panel .profile-panel-inner,
.profile-page .profile-settings-studio .profile-upload-photo-block,
.profile-page .profile-settings-studio .profile-change-info-section,
.profile-page .profile-settings-studio .profile-btn-update-info,
.profile-page .profile-settings-studio .profile-btn-secondary,
.profile-page .profile-settings-studio .profile-panel-card .profile-card,
.profile-page .profile-settings-studio .profile-moderation-banner {
    border-width: 3px !important;
}

.profile-page .profile-settings-studio .profile-combined-header,
.profile-page .profile-settings-studio .profile-change-info-title {
    border-bottom-width: 3px !important;
}

.profile-page .profile-settings-studio .profile-panel-actions,
.profile-page .profile-settings-studio .profile-change-info-actions {
    border-top-width: 3px !important;
}

.profile-page .profile-settings-studio .profile-panel-card .profile-row,
.profile-page .profile-settings-studio .profile-panel-card .profile-row-toggle {
    border-bottom-width: 3px !important;
}

.profile-page .profile-settings-studio .profile-change-info-input,
.profile-page .profile-settings-studio .profile-panel-card .profile-row select,
.profile-page .profile-settings-studio .profile-panel-card .profile-row input[type="text"],
.profile-page .profile-settings-studio .profile-panel-card .profile-row input[type="time"] {
    border-width: 3px !important;
}

.profile-page .profile-settings-studio .profile-card-placeholder,
.profile-page .profile-settings-studio .profile-empty {
    border-width: 3px !important;
}

.profile-page .profile-settings-studio .profile-safety-row {
    border-bottom-width: 3px !important;
}

.profile-page .profile-settings-studio .theme-toggle,
.profile-page .profile-settings-studio .sidebar-select {
    border-width: 3px !important;
}

/* Dark: settings toolbar + chips */
.profile-page.theme-dark .profile-settings-studio .profile-settings-studio-toolbar,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-settings-studio-toolbar,
html.dark-mode .profile-page .profile-settings-studio .profile-settings-studio-toolbar {
    background: rgba(20, 24, 31, 0.94);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}
.profile-page.theme-dark .profile-settings-studio .profile-settings-toolbar-label,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-settings-toolbar-label,
html.dark-mode .profile-page .profile-settings-studio .profile-settings-toolbar-label {
    color: #94a3b8;
}
.profile-page.theme-dark .profile-settings-studio .profile-settings-toolbar-hint,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-settings-toolbar-hint,
html.dark-mode .profile-page .profile-settings-studio .profile-settings-toolbar-hint {
    color: #94a3b8;
}
.profile-page.theme-dark .profile-settings-studio .profile-quick-nav-chip,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-quick-nav-chip,
html.dark-mode .profile-page .profile-settings-studio .profile-quick-nav-chip {
    background: #1a1f2e;
    border-color: rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    box-shadow: none;
}
.profile-page.theme-dark .profile-settings-studio .profile-quick-nav-chip:hover,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-quick-nav-chip:hover,
html.dark-mode .profile-page .profile-settings-studio .profile-quick-nav-chip:hover {
    border-color: #f1f5f9;
    color: #f8fafc;
    background: #243045;
}
.profile-page.theme-dark .profile-settings-studio .profile-quick-nav-chip.active,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-quick-nav-chip.active,
html.dark-mode .profile-page .profile-settings-studio .profile-quick-nav-chip.active {
    background: #f1f5f9;
    border-color: #f1f5f9;
    color: #0f172a;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.profile-page.theme-dark .profile-settings-studio .profile-toolbar-btn--secondary,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-toolbar-btn--secondary,
html.dark-mode .profile-page .profile-settings-studio .profile-toolbar-btn--secondary {
    background: #1a1f2e;
    border-color: rgba(255, 255, 255, 0.14);
    color: #f1f5f9;
}
.profile-page.theme-dark .profile-settings-studio .profile-toolbar-btn--ghost,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-toolbar-btn--ghost,
html.dark-mode .profile-page .profile-settings-studio .profile-toolbar-btn--ghost {
    border-color: rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
    background: transparent;
}
.profile-page.theme-dark .profile-settings-studio .profile-toolbar-btn--ghost:hover,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-toolbar-btn--ghost:hover,
html.dark-mode .profile-page .profile-settings-studio .profile-toolbar-btn--ghost:hover {
    border-color: #f1f5f9;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.06);
}

/* ----- Dark mode: settings studio ----- */
.profile-page.theme-dark .profile-settings-studio .profile-combined-panel .profile-panel-inner,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-combined-panel .profile-panel-inner,
html.dark-mode .profile-page .profile-settings-studio .profile-combined-panel .profile-panel-inner {
    background: #14181f;
    border: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.profile-page.theme-dark .profile-settings-studio .profile-combined-panel .profile-panel-inner::before,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-combined-panel .profile-panel-inner::before,
html.dark-mode .profile-page .profile-settings-studio .profile-combined-panel .profile-panel-inner::before {
    background: #e2e8f0;
    opacity: 1;
}
.profile-page.theme-dark .profile-settings-studio .profile-combined-page-title,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-combined-page-title,
html.dark-mode .profile-page .profile-settings-studio .profile-combined-page-title {
    color: #f1f5f9;
}
.profile-page.theme-dark .profile-settings-studio .profile-combined-page-desc,
.profile-page.theme-dark .profile-settings-studio .profile-combined-section-desc,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-combined-page-desc,
html.dark-mode .profile-page .profile-settings-studio .profile-combined-page-desc,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-combined-section-desc,
html.dark-mode .profile-page .profile-settings-studio .profile-combined-section-desc {
    color: #94a3b8;
}
.profile-page.theme-dark .profile-settings-studio .profile-combined-section-title,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-combined-section-title,
html.dark-mode .profile-page .profile-settings-studio .profile-combined-section-title {
    color: #e2e8f0;
}
.profile-page.theme-dark .profile-settings-studio .profile-combined-header,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-combined-header,
html.dark-mode .profile-page .profile-settings-studio .profile-combined-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
.profile-page.theme-dark .profile-settings-studio .profile-panel-card .profile-card,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-panel-card .profile-card,
html.dark-mode .profile-page .profile-settings-studio .profile-panel-card .profile-card {
    background: #1a1f2e;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.profile-page.theme-dark .profile-settings-studio .profile-panel-card .profile-card-title,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-panel-card .profile-card-title,
html.dark-mode .profile-page .profile-settings-studio .profile-panel-card .profile-card-title {
    color: #94a3b8;
    border-bottom-color: rgba(255, 255, 255, 0.22);
}
.profile-page.theme-dark .profile-settings-studio .profile-panel-card .profile-row,
.profile-page.theme-dark .profile-settings-studio .profile-panel-card .profile-row-toggle,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-panel-card .profile-row,
html.dark-mode .profile-page .profile-settings-studio .profile-panel-card .profile-row {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}
.profile-page.theme-dark .profile-settings-studio .profile-panel-card .profile-row label,
.profile-page.theme-dark .profile-settings-studio .profile-panel-card .profile-row-toggle label,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-panel-card .profile-row label,
html.dark-mode .profile-page .profile-settings-studio .profile-panel-card .profile-row label {
    color: #e2e8f0;
}
.profile-page.theme-dark .profile-settings-studio .profile-panel-card .profile-row select,
.profile-page.theme-dark .profile-settings-studio .profile-panel-card .profile-row input,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-panel-card .profile-row select,
html.dark-mode .profile-page .profile-settings-studio .profile-panel-card .profile-row input {
    background: #0f1419;
    border-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}
.profile-page.theme-dark .profile-settings-studio .profile-change-info-section,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-change-info-section,
html.dark-mode .profile-page .profile-settings-studio .profile-change-info-section {
    background: #1a1f2e;
    border: 2px solid rgba(255, 255, 255, 0.12);
}
.profile-page.theme-dark .profile-settings-studio .profile-change-info-input,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-change-info-input,
html.dark-mode .profile-page .profile-settings-studio .profile-change-info-input {
    background: #0f1419;
    border-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}
.profile-page.theme-dark .profile-settings-studio .profile-upload-photo-block,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-upload-photo-block,
html.dark-mode .profile-page .profile-settings-studio .profile-upload-photo-block {
    background: #1a1f2e;
    border: 2px solid rgba(255, 255, 255, 0.12);
}
.profile-page.theme-dark .profile-settings-studio .profile-card-placeholder,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-card-placeholder,
html.dark-mode .profile-page .profile-settings-studio .profile-card-placeholder {
    background: #1a1f2e;
    border: 2px dashed rgba(255, 255, 255, 0.14);
}
.profile-page.theme-dark .profile-settings-studio .theme-toggle,
[data-theme="dark"] .profile-page .profile-settings-studio .theme-toggle,
html.dark-mode .profile-page .profile-settings-studio .theme-toggle {
    background: #0f1419;
    border-color: rgba(255, 255, 255, 0.1);
}
.profile-page.theme-dark .profile-settings-studio .theme-option.active,
[data-theme="dark"] .profile-page .profile-settings-studio .theme-option.active,
html.dark-mode .profile-page .profile-settings-studio .theme-option.active {
    background: #f1f5f9;
    color: #0f172a;
}
.profile-page.theme-dark .profile-settings-studio .profile-toggle,
[data-theme="dark"] .profile-page .profile-settings-studio .profile-toggle,
html.dark-mode .profile-page .profile-settings-studio .profile-toggle {
    background: #334155;
}

/* =============================================================================
   Settings layout: CSS grid (nav + content), all breakpoints / zoom-safe
   Activated with .profile-layout--settings (see profile/index.php JS).
   ============================================================================= */
.profile-page .profile-layout--settings {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
    margin-top: 1.25rem;
}
.profile-page .profile-layout--settings .profile-left-settings-nav {
    order: -1;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    position: sticky;
    top: clamp(0.5rem, 2vh, 1.25rem);
    align-self: start;
    box-sizing: border-box;
}
.profile-page .profile-layout--settings .profile-settings-main {
    flex: unset;
    order: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}
.profile-page .profile-layout--settings .sidebar-nav-main.sidebar-nav-main-combined {
    padding: 0.75rem 0.7rem 1rem;
    gap: 5px;
}
/* Studio scroll area: fluid height, no awkward crop on laptop zoom */
.profile-page .profile-settings-studio {
    max-height: min(82vh, 56rem);
    max-height: min(82dvh, 56rem);
    padding-left: 0;
    padding-right: 0;
}
.profile-page .profile-settings-studio .profile-combined-panel .profile-panel-inner {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* Account form: single column on narrow settings column */
@media (max-width: 900px) {
    .profile-page .profile-settings-studio .profile-change-info-form {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    .profile-page .profile-settings-studio .profile-upload-photo-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
    .profile-page .profile-settings-studio .profile-panel-card .profile-row-toggle {
        flex-wrap: wrap;
    }
    .profile-page .profile-settings-studio .profile-panel-card .profile-row-toggle label {
        flex: 1 1 100%;
    }
}

/* Medium: slightly narrower nav column */
@media (max-width: 1100px) {
    .profile-page .profile-layout--settings {
        grid-template-columns: min(248px, 32vw) minmax(0, 1fr);
        gap: 1.15rem;
    }
    .profile-page .profile-settings-studio .profile-combined-panel .profile-panel-inner {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Tablet: stack nav above content */
@media (max-width: 900px) {
    .profile-page .profile-layout--settings {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .profile-page .profile-layout--settings .profile-left-settings-nav {
        position: static;
        top: auto;
        max-height: none;
    }
    .profile-page .profile-layout--settings .profile-settings-main {
        width: 100%;
    }
    .profile-page .profile-settings-studio {
        max-height: none;
        min-height: 0;
        padding-bottom: 2rem;
    }
    .profile-page .sidebar-nav-main.sidebar-nav-main-combined {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: flex-start;
    }
    .profile-page .sidebar-nav-main.sidebar-nav-main-combined .sidebar-nav-item {
        flex: 1 1 auto;
        min-width: min(100%, 200px);
        max-width: 100%;
    }
}

/* Merge with existing mobile rules: tighten banner + touch */
@media (max-width: 768px) {
    .profile-page .profile-layout--settings .profile-left-settings-nav .sidebar-nav-main {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .profile-page .profile-top-banner-inner {
        padding-left: clamp(0.75rem, 3vw, 1rem);
        padding-right: clamp(0.75rem, 3vw, 1rem);
    }
    .profile-page .profile-settings-studio .profile-combined-page-title {
        max-width: none;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .profile-page .profile-container {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }
    .profile-page .profile-settings-studio .profile-panel-actions .profile-btn-primary,
    .profile-page .profile-settings-studio .profile-btn-update-info {
        width: 100%;
        max-width: 100%;
    }
    .profile-page .profile-settings-studio .theme-toggle {
        width: 100%;
        justify-content: stretch;
    }
    .profile-page .profile-settings-studio .theme-option {
        flex: 1 1 50%;
        text-align: center;
        justify-content: center;
    }
}

/* Ultra-wide: use extra space for nav + content, not infinite text width */
@media (min-width: 1600px) {
    @supports selector(:has(*)) {
        .profile-page .profile-container:has(.profile-layout--settings) {
            max-width: min(1440px, calc(100vw - 3rem));
        }
    }
}
