.profile-page {
    padding-top: 24px;
    padding-bottom: 24px;
}

.profile-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-hero,
.profile-card {
    border: 1px solid #e7eaf0;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
}

.profile-hero__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    flex: 0 0 72px;
}

.profile-hero__content {
    min-width: 0;
}

.profile-hero__eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.profile-hero__title {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    color: #0f172a;
}

.profile-hero__text {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.65;
    color: #475569;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.profile-card {
    padding: 24px;
}

.profile-card--full {
    grid-column: 1 / -1;
}

.profile-card__head {
    margin-bottom: 18px;
}

.profile-card__title {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
    color: #0f172a;
}

.profile-card__desc {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
}

.profile-summary {
    display: grid;
    gap: 14px;
}

.profile-summary__item {
    padding: 16px 18px;
    border: 1px solid #edf1f6;
    border-radius: 16px;
    background: #fbfcfe;
}

.profile-summary__label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.profile-summary__value {
    display: block;
    font-size: 16px;
    line-height: 1.45;
    color: #0f172a;
    word-break: break-word;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-form__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.profile-form__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-form__label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.profile-form__input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #d7e0ea;
    border-radius: 16px;
    padding: 0 16px;
    font: inherit;
    font-size: 14px;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-sizing: border-box;
}

.profile-form__input[readonly] {
    background: #f8fafc;
    color: #64748b;
}

.profile-form__input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.profile-password-field {
    position: relative;
}

.profile-form__input--password {
    padding-right: 86px;
}

.profile-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    min-width: 66px;
    height: 34px;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.profile-password-toggle:hover {
    background: #eef4fb;
    border-color: #cbd5e1;
}

.profile-password-hint {
    margin-top: -4px;
    font-size: 13px;
    line-height: 1.6;
    color: #64748b;
}

.profile-form__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.profile-btn {
    min-width: 180px;
    min-height: 48px;
    border-radius: 16px;
    font-weight: 700;
}

.profile-btn--primary {
    background: #1d4ed8;
    border: 1px solid #1d4ed8;
    color: #ffffff;
}

.profile-btn--primary:hover {
    background: #1e40af;
    border-color: #1e40af;
}

html[dir="rtl"] .profile-form__input--password,
body.is-rtl .profile-form__input--password {
    padding-right: 16px;
    padding-left: 86px;
}

html[dir="rtl"] .profile-password-toggle,
body.is-rtl .profile-password-toggle {
    right: auto;
    left: 10px;
}

@media (max-width: 980px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-card--full {
        grid-column: auto;
    }

    .profile-form__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .profile-page {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .profile-hero,
    .profile-card {
        border-radius: 18px;
    }

    .profile-hero {
        padding: 18px;
        align-items: flex-start;
    }

    .profile-hero__avatar {
        width: 60px;
        height: 60px;
        flex-basis: 60px;
        font-size: 24px;
    }

    .profile-hero__title {
        font-size: 22px;
    }

    .profile-card {
        padding: 18px;
    }

    .profile-form__actions {
        justify-content: stretch;
    }

    .profile-btn {
        width: 100%;
    }
}