.profile-page {
    padding: 48px 20px 0;
}

.profile-wrap {
    width: min(1100px, 100%);
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 56px clamp(24px, 5vw, 64px);
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.profile-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 16px;
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.profile-intro {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-lead {
    margin: 0;
    color: rgba(226, 232, 240, 0.8);
    line-height: 1.6;
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 24px;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.04);
}

.profile-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.4rem;
    letter-spacing: 0.06em;
    background: rgba(79, 70, 229, 0.18);
    border: 1px solid rgba(79, 70, 229, 0.32);
    color: var(--color-text);
}

.profile-summary-details h2 {
    margin: 0 0 6px;
    font-size: 1.4rem;
}

.profile-email {
    margin: 0;
    color: rgba(203, 213, 225, 0.85);
}

.profile-meta {
    margin: 4px 0 0;
    color: rgba(148, 163, 184, 0.9);
    font-size: 0.9rem;
}

.profile-card {
    background: rgba(8, 15, 30, 0.78);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 22px;
    padding: clamp(28px, 5vw, 42px);
    display: flex;
    flex-direction: column;
    gap: 28px;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.06);
}

.profile-fieldset {
    margin: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-fieldset legend {
    padding: 0 12px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
}

.fieldset-hint {
    margin: -8px 0 4px;
    color: rgba(148, 163, 184, 0.75);
    font-size: 0.9rem;
}

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

.field label span {
    color: rgba(248, 113, 113, 0.95);
}

.field input,
.field select {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text);
    background: rgba(15, 23, 42, 0.55);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(15, 23, 42, 0.75);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.18);
}

.field-feedback {
    margin: 6px 0 0;
    font-size: 0.82rem;
    color: rgba(203, 213, 225, 0.6);
    min-height: 1em;
}

.field.has-error {
    border-color: rgba(248, 113, 113, 0.65);
    background: rgba(30, 10, 20, 0.6);
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.18);
}

.field.has-error input,
.field.has-error select {
    border-color: rgba(248, 113, 113, 0.65);
}

.field.has-error .field-feedback {
    color: #fda4af;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
}

.profile-status {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(203, 213, 225, 0.75);
    min-height: 1.2em;
}

.profile-status.is-success {
    color: #4ade80;
}

.profile-status.is-error {
    color: #f87171;
}

@media (max-width: 720px) {
    .profile-wrap {
        padding: 40px 20px;
        gap: 36px;
    }

    .profile-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-nav {
        justify-content: flex-start;
    }

    .profile-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-actions {
        width: 100%;
    }

    .profile-actions .btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .profile-nav,
    .profile-nav .nav-link {
        width: 100%;
    }
}
