/**
 * Profile page — LinkedIn-style layout, modern and sleek
 * Scoped to .profile-page. Load after styles.css.
 */

/* --- Page --- (darker blue aligned with home page: --color-blue #003366, --color-blue-dark #002244) */
.profile-page {
    --profile-banner-height: 88px;
    --profile-accent: var(--color-blue, #003366);
    --profile-accent-dark: var(--color-blue-dark, #002244);
    --profile-accent-light: rgba(0, 51, 102, 0.08);
    background: linear-gradient(180deg, #e6f0f8 0%, #eef4f8 18%, #f3f2ef 45%, #f5f5f4 100%);
    min-height: 70vh;
    padding: 0 1.5rem 4rem;
    font-family: var(--font-primary);
}

.profile-page .profile-container {
    max-width: 1128px;
    margin: 0 auto;
}

/* --- Loading / Error --- */
.profile-page .profile-loading,
.profile-page .profile-error {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
    border-radius: 14px;
    font-size: 0.9375rem;
    color: #52525b;
    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.08);
}

.profile-page .profile-error {
    color: #b91c1c;
    border: 1px solid #fecaca;
    background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
}

/* --- Intro card (LinkedIn-style: cover + avatar overlap + name/headline) --- */
.profile-page .profile-intro-card {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.profile-page .profile-cover {
    min-height: 256px;
    height: 256px;
    background: linear-gradient(135deg, #003366 0%, #0d3255 50%, #002244 100%);
}

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

.profile-page .profile-intro-inner {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    padding: 0 1.5rem 1.5rem;
    flex-wrap: wrap;
}

.profile-page .profile-avatar-wrap {
    margin-top: -64px;
    flex-shrink: 0;
}

.profile-page .profile-avatar {
    width: 168px;
    height: 168px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: #e0e0e0;
    color: #5f5f5f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 600;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

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

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

.profile-page .profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
}

.profile-page .profile-headline {
    font-size: 0.9375rem;
    color: #333;
    margin: 0 0 0.35rem;
    line-height: 1.4;
}

.profile-page .profile-role-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.profile-page .profile-role-badge.student {
    background: #e8f4fd;
    color: #003366;
}

.profile-page .profile-role-badge.master {
    background: #e7f5ec;
    color: #057642;
}

.profile-page .profile-role-badge.educator {
    background: #fff3e8;
    color: #b24020;
}

.profile-page .profile-location {
    font-size: 0.875rem;
    color: #666;
    margin: 0 0 0.2rem;
}

.profile-page .profile-industry {
    font-size: 0.8125rem;
    color: #999;
    margin: 0 0 1rem;
}

.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.5rem 1.25rem;
    border-radius: 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.profile-page .profile-btn-primary {
    background: #003366;
    color: #fff;
    border-color: #003366;
}

.profile-page .profile-btn-primary:hover {
    background: #004182;
    border-color: #004182;
}

.profile-page .profile-btn-secondary {
    background: #fff;
    color: #003366;
    border: 1px solid #003366;
}

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

.profile-page .profile-btn-outline {
    background: #fff;
    color: #333;
    border: 1px solid #666;
}

.profile-page .profile-btn-outline:hover {
    background: #f3f2ef;
    border-color: #333;
}

/* --- Layout: sidebar + main --- */
.profile-page .profile-layout {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    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: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.profile-page .profile-nav-link:hover {
    background: #f3f2ef;
    color: #000;
}

.profile-page .profile-nav-link.active {
    font-weight: 600;
    color: #000;
}

.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;
}

.profile-page .profile-readonly-column,
.profile-page .profile-own-edit-column {
    display: block;
}

.profile-page .profile-inline-section {
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1rem;
    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);
    border-left: 4px solid var(--profile-accent);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.profile-page .profile-inline-section:hover {
    box-shadow: 0 4px 16px rgba(0, 51, 102, 0.1), inset 0 1px 0 rgba(255,255,255,0.8);
    border-left-color: var(--profile-accent);
}

.profile-page .profile-inline-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--profile-accent-dark);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 51, 102, 0.12);
    letter-spacing: 0.01em;
}

.profile-page .profile-form-inline .profile-edit-section {
    margin-bottom: 1.5rem;
}

.profile-page .profile-form-inline .profile-form-actions {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 51, 102, 0.12);
}

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

/* --- Top banner / spacer (below nav, above content) --- */
.profile-page .profile-top-banner {
    margin: 0 calc(-1 * var(--page-gutter, 1rem)) 2rem;
    padding: 0;
    background: linear-gradient(135deg, #002244 0%, #003366 35%, #0d3255 65%, #001a33 100%);
    min-height: var(--profile-banner-height);
    border-radius: 0 0 20px 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 6px 20px rgba(0, 34, 68, 0.35), 0 2px 6px rgba(0, 0, 0, 0.08);
}
.profile-page .profile-top-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 90% 20%, rgba(255,255,255,0.12) 0%, transparent 50%);
    pointer-events: none;
}
.profile-page .profile-top-banner-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.profile-page .profile-top-banner-shape--1 {
    width: 140px;
    height: 140px;
    top: -40px;
    right: 8%;
}
.profile-page .profile-top-banner-shape--2 {
    width: 80px;
    height: 80px;
    bottom: -20px;
    right: 25%;
}
.profile-page .profile-top-banner-inner {
    height: var(--profile-banner-height);
    padding: 0 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.2rem;
    position: relative;
    z-index: 1;
    background: repeating-linear-gradient(105deg, transparent 0, transparent 36px, rgba(255,255,255,0.035) 36px, rgba(255,255,255,0.035) 37px);
}
.profile-page .profile-top-banner-label {
    font-size: 1.0625rem;
    font-weight: 700;
    color: rgba(255,255,255,0.98);
    letter-spacing: 0.03em;
}
.profile-page .profile-top-banner-tagline {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255,255,255,0.78);
    letter-spacing: 0.01em;
}
.profile-page .profile-top-banner-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, rgba(245,158,11,0.85) 0%, rgba(251,191,36,0.95) 50%, rgba(245,158,11,0.85) 100%);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 -1px 2px rgba(251,191,36,0.3);
}

/* --- Left settings nav (minimizable); own profile only --- */
.profile-page .profile-layout {
    flex-wrap: nowrap;
}
.profile-page .profile-left-settings-nav {
    order: -1;
    flex-shrink: 0;
    width: 220px;
    min-height: 320px;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 51, 102, 0.08), inset 0 1px 0 rgba(255,255,255,0.9);
    border: 1px solid rgba(0, 51, 102, 0.12);
    border-left: 4px solid var(--profile-accent);
    padding: 1rem 0;
    position: sticky;
    top: 1.5rem;
    align-self: flex-start;
    transition: width 0.25s ease, box-shadow 0.2s ease;
    overflow: hidden;
}
.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;
    border-left: none;
}
.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: 0 1rem 0.75rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 51, 102, 0.12);
}
.profile-page .sidebar-settings-title-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--profile-accent-dark);
    margin: 0;
    white-space: nowrap;
    transition: opacity 0.2s;
    letter-spacing: 0.01em;
}
.profile-page .sidebar-minimize-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(0, 51, 102, 0.25);
    border-radius: 8px;
    background: #fff;
    color: var(--profile-accent-dark);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.profile-page .sidebar-minimize-btn:hover {
    background: var(--profile-accent-light);
    color: var(--profile-accent-dark);
    border-color: var(--profile-accent);
}
.profile-page .sidebar-nav-main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0 0.5rem;
}
.profile-page .profile-left-settings-nav .sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    border-radius: 10px;
    transition: color 0.15s, background 0.15s;
    text-align: left;
}
.profile-page .profile-left-settings-nav .sidebar-nav-item .nav-icon {
    flex-shrink: 0;
    font-style: normal;
}
.profile-page .profile-left-settings-nav .sidebar-nav-item:hover {
    color: var(--profile-accent);
    background: var(--profile-accent-light);
}
.profile-page .profile-left-settings-nav .sidebar-nav-item.active {
    color: var(--profile-accent);
    background: linear-gradient(90deg, rgba(0, 51, 102, 0.12) 0%, rgba(0, 34, 68, 0.06) 100%);
    font-weight: 600;
    border-left: 3px solid var(--profile-accent);
    margin-left: -3px;
    padding-left: calc(0.75rem + 3px);
    box-shadow: inset 0 0 0 1px rgba(0, 51, 102, 0.08);
}

/* Settings content (main area, right of left nav) */
.profile-page .profile-settings-main {
    flex: 1;
    min-width: 0;
    order: 0;
    padding-left: 0.25rem;
}
.profile-page .profile-settings-main .settings-content-inner {
    border-radius: 14px;
    padding: 1.5rem;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
    box-shadow: 0 4px 16px rgba(0, 51, 102, 0.06), inset 0 1px 0 rgba(255,255,255,0.9);
    border: 1px solid rgba(0, 51, 102, 0.1);
}
.profile-page .profile-main-inline {
    order: 0;
}
.profile-page .settings-content-inner {
    overflow-y: auto;
    max-height: 70vh;
    padding-right: 0.5rem;
}
.profile-page .profile-settings-main .sidebar-panel {
    display: none;
}
.profile-page .profile-settings-main .sidebar-panel.active {
    display: block;
}

/* --- 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: #52525b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.5rem;
    padding: 0 0.25rem;
}
.profile-page .preferences-section-box {
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 51, 102, 0.1);
    box-shadow: 0 2px 10px rgba(0, 51, 102, 0.06), inset 0 1px 0 rgba(255,255,255,0.8);
    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: #171717;
    font-size: 0.9375rem;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(0, 51, 102, 0.06);
}
.profile-page .preferences-item:last-child {
    border-bottom: none;
}
.profile-page .preferences-item:hover {
    background: rgba(0, 51, 102, 0.04);
}
.profile-page .preferences-item-label {
    flex: 1;
    min-width: 0;
}
.profile-page .preferences-item-arrow {
    flex-shrink: 0;
    margin-left: 0.75rem;
    color: #64748b;
    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: #000;
    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: #52525b;
    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);
}
.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;
}

.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.6rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.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;
}

/* 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-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: #fff;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    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: #000;
    margin: 0 0 1rem;
}

.profile-page .profile-section-body {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #333;
}

.profile-page .profile-section-card p {
    margin: 0;
    line-height: 1.6;
    color: #333;
    font-size: 0.9375rem;
}

.profile-page .profile-empty {
    color: #666;
    font-size: 0.875rem;
    margin: 0;
}

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

.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: #000;
    margin: 0 0 0.2rem;
}

.profile-page .exp-item .company,
.profile-page .edu-item .meta,
.profile-page .cert-item .meta {
    font-size: 0.875rem;
    color: #666;
}

.profile-page .exp-item .employment-type {
    font-size: 0.8125rem;
    color: #666;
}

.profile-page .exp-item .dates,
.profile-page .edu-item .dates,
.profile-page .cert-item .dates {
    font-size: 0.8125rem;
    color: #999;
}

.profile-page .exp-item .description,
.profile-page .edu-item .description {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #333;
    line-height: 1.5;
}

.profile-page .edu-item .grade {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.2rem;
}

.profile-page .edu-item .activities {
    font-size: 0.875rem;
    color: #333;
    margin-top: 0.35rem;
    line-height: 1.45;
}

.profile-page .cert-item .cert-credential-id {
    font-size: 0.8125rem;
    color: #666;
    margin-top: 0.25rem;
}

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

.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: 0.5rem;
}

.profile-page .skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile-page .skill-tag {
    background: #f3f2ef;
    color: #333;
    padding: 0.4rem 0.85rem;
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* --- Contact --- */
.profile-page .profile-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-page .profile-contact-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
}

.profile-page .profile-contact-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #666;
    min-width: 4.5rem;
}

.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: 1.75rem 1.5rem;
}

.profile-page .profile-edit-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 0.35rem;
}

.profile-page .profile-edit-desc {
    font-size: 0.9375rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.profile-page .profile-edit-section {
    margin-bottom: 2rem;
}

.profile-page .profile-edit-section-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 0.5rem;
}

.profile-page .profile-edit-section-hint {
    font-size: 0.8125rem;
    color: #666;
    margin: 0 0 0.75rem;
    line-height: 1.4;
}

.profile-page .profile-form .form-group {
    margin-bottom: 1rem;
}

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

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

.profile-page .profile-form input,
.profile-page .profile-form textarea,
.profile-page .profile-form select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9375rem;
    background: #fff;
    color: #000;
}

.profile-page .profile-form input:focus,
.profile-page .profile-form textarea:focus,
.profile-page .profile-form select:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 0 2px rgba(10, 102, 194, 0.2);
}

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

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

/* --- Profile & cover photo upload (tap to choose from device) --- */
.profile-page .profile-photos-upload {
    margin: 1.25rem 0;
}
.profile-page .profile-photos-upload-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--profile-accent-dark);
    margin-bottom: 0.75rem;
}
.profile-page .profile-photos-upload-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    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-item {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
}

.profile-page .block-item h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #666;
    margin: 0 0 0.75rem;
}

.profile-page .block-item .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.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: 0.5rem 1rem;
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 600;
    background: #fff;
    color: #003366;
    border: 1px solid #003366;
    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: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 51, 102, 0.12);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.profile-page .profile-btn-primary {
    padding: 0.6rem 1.75rem;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    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.6rem 1.75rem;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    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: 72px;
    }
    .profile-page .profile-top-banner-tagline {
        display: none;
    }
    .profile-page .profile-top-banner-shape--2 {
        display: none;
    }
    .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 (Account preferences, Sign in & security, etc.) – black bg, white text */
[data-theme="dark"] .profile-page .profile-left-settings-nav,
html.dark-mode .profile-page .profile-left-settings-nav {
    background: #0d0d0d !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    border-color: var(--color-grey-200);
}
[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,
[data-theme="dark"] .profile-page .profile-nav-link,
html.dark-mode .profile-page .profile-nav-link {
    color: #e5e5e5 !important;
}
[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,
[data-theme="dark"] .profile-page .profile-nav-link:hover,
html.dark-mode .profile-page .profile-nav-link:hover {
    color: #ffffff !important;
    background: #262626 !important;
}
[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,
[data-theme="dark"] .profile-page .profile-nav-link.active,
html.dark-mode .profile-page .profile-nav-link.active {
    color: var(--color-blue) !important;
    background: rgba(0, 51, 102, 0.2) !important;
}
[data-theme="dark"] .profile-page .sidebar-settings-header,
html.dark-mode .profile-page .sidebar-settings-header {
    border-bottom-color: var(--color-grey-200);
}
[data-theme="dark"] .profile-page .sidebar-minimize-btn,
html.dark-mode .profile-page .sidebar-minimize-btn {
    background: #262626 !important;
    color: #e5e5e5 !important;
    border-color: var(--color-grey-200);
}
[data-theme="dark"] .profile-page .sidebar-minimize-btn:hover,
html.dark-mode .profile-page .sidebar-minimize-btn:hover {
    background: #333 !important;
}
/* Main content area (right of sidebar) – black bg, light text */
[data-theme="dark"] .profile-page .profile-settings-main .settings-content-inner,
html.dark-mode .profile-page .profile-settings-main .settings-content-inner {
    background: #0d0d0d !important;
    box-shadow: none;
    border-color: var(--color-grey-200);
}
[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);
}
