
.profile-page-header {
    margin-bottom: 22px;
}

.profile-hero {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(
            135deg,
            rgba(37, 99, 235, 0.07),
            rgba(255, 255, 255, 0.92) 45%
        );
    box-shadow: var(--shadow);
}

.profile-avatar-large {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    border-radius: 28px;
    background:
        linear-gradient(
            145deg,
            var(--primary),
            #60a5fa
        );
    color: #ffffff;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.24);
    font-size: 2rem;
    font-weight: 820;
    letter-spacing: -0.04em;
}

.profile-identity {
    min-width: 0;
}

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

.profile-name-line h2 {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    letter-spacing: -0.045em;
}

.profile-plan-badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 0.76rem;
    font-weight: 760;
}

.profile-identity > p {
    margin: 7px 0 13px;
    color: var(--muted);
}

.profile-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--muted);
    font-size: 0.82rem;
}

.profile-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.profile-meta .lucide {
    width: 16px;
    height: 16px;
}

.profile-photo-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.72fr);
    align-items: start;
    gap: 18px;
    margin-top: 18px;
}

.profile-main-column,
.profile-side-column {
    display: grid;
    gap: 18px;
}

.profile-section-card,
.profile-stat-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.profile-section-heading {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    margin-bottom: 20px;
}

.profile-section-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.profile-section-heading p,
.profile-section-heading h2 {
    margin: 0;
}

.profile-section-heading p {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 680;
}

.profile-section-heading h2 {
    margin-top: 2px;
    font-size: 1.3rem;
    letter-spacing: -0.035em;
}

.profile-form-grid {
    gap: 15px;
}

.preference-list,
.toggle-list {
    display: grid;
}

.preference-row,
.toggle-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 210px);
    align-items: center;
    gap: 18px;
    padding: 15px 0;
    border-top: 1px solid var(--border);
}

.preference-row:first-child,
.toggle-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.preference-row:last-child,
.toggle-row:last-child {
    padding-bottom: 0;
}

.preference-row > span,
.toggle-row > span {
    display: grid;
    gap: 3px;
}

.preference-row small,
.toggle-row small {
    color: var(--muted);
}

.preference-row select {
    min-height: 44px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-solid);
    color: var(--text);
}

.toggle-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.toggle-row input {
    appearance: none;
    position: relative;
    width: 50px;
    height: 29px;
    margin: 0;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 160ms ease;
}

.toggle-row input::after {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.2);
    content: "";
    transition: transform 160ms ease;
}

.toggle-row input:checked {
    background: var(--primary);
}

.toggle-row input:checked::after {
    transform: translateX(21px);
}

.profile-stat-card {
    background:
        linear-gradient(
            155deg,
            #0f172a,
            #172554
        );
    color: #ffffff;
}

.profile-stat-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-stat-heading > span {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.1);
}

.profile-stat-list {
    display: grid;
    margin: 18px 0 0;
}

.profile-stat-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-stat-list dt {
    color: rgba(255, 255, 255, 0.65);
}

.profile-stat-list dd {
    margin: 0;
    font-weight: 720;
    text-align: right;
}

.profile-actions-card {
    padding-bottom: 12px;
}

.profile-action-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 14px 0;
    border: 0;
    border-top: 1px solid var(--border);
    background: transparent;
    text-align: left;
}

.profile-action-button > span {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-action-button > span > span {
    display: grid;
    gap: 2px;
}

.profile-action-button small {
    color: var(--muted);
}

.profile-action-button > .lucide {
    color: var(--muted);
}

.profile-action-button:hover strong {
    color: var(--primary-dark);
}

.danger-action:hover strong {
    color: var(--danger);
}

.profile-about-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 13px;
}

.profile-about-logo {
    width: 46px;
    height: 46px;
}

.profile-about-card p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.profile-about-card dl {
    grid-column: 1 / -1;
    display: grid;
    margin: 7px 0 0;
}

.profile-about-card dl > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
}

.profile-about-card dt {
    color: var(--muted);
}

.profile-about-card dd {
    margin: 0;
    font-weight: 680;
    text-align: right;
}

/* Local app dark appearance */

html[data-exhale-theme="dark"] {
    --background: #07101f;
    --surface: rgba(15, 23, 42, 0.94);
    --surface-solid: #111c30;
    --surface-soft: rgba(37, 99, 235, 0.17);
    --text: #f8fafc;
    --muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.09);
    --primary-soft: rgba(37, 99, 235, 0.18);
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

html[data-exhale-theme="dark"] body {
    background:
        radial-gradient(
            circle at 88% 0%,
            rgba(37, 99, 235, 0.14),
            transparent 34rem
        ),
        var(--background);
}

html[data-exhale-theme="dark"] .sidebar,
html[data-exhale-theme="dark"] .mobile-nav {
    background: rgba(7, 16, 31, 0.9);
}

html[data-exhale-theme="dark"] .donut::after {
    background: var(--surface-solid);
}

html[data-exhale-theme="dark"] .profile-hero {
    background:
        linear-gradient(
            135deg,
            rgba(37, 99, 235, 0.18),
            rgba(15, 23, 42, 0.96) 48%
        );
}

html[data-exhale-theme="dark"] .secondary-button {
    background: var(--surface-solid);
    color: var(--text);
}

@media (max-width: 980px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-side-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-about-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .profile-hero {
        grid-template-columns: 72px minmax(0, 1fr);
        padding: 19px;
    }

    .profile-avatar-large {
        width: 72px;
        height: 72px;
        border-radius: 23px;
        font-size: 1.65rem;
    }

    .profile-photo-button {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }

    .profile-side-column {
        grid-template-columns: 1fr;
    }

    .profile-about-card {
        grid-column: auto;
    }

    .preference-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .preference-row select {
        width: 100%;
    }

    .profile-meta {
        display: grid;
        gap: 7px;
    }
}

@media (max-width: 430px) {
    .profile-hero {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .profile-name-line,
    .profile-meta {
        justify-content: center;
    }

    .profile-section-card,
    .profile-stat-card {
        padding: 19px;
    }
}
