.account-button > span,
.avatar-button > span,
.account-avatar-large,
.avatar,
.laiya-profile-avatar {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    image-rendering: auto;
}

.laiya-profile-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(14, 28, 52, .52);
    backdrop-filter: blur(10px);
}
.laiya-profile-overlay[hidden] { display: none; }
.laiya-profile-modal {
    display: flex;
    width: min(760px, calc(100vw - 36px));
    max-height: min(820px, calc(100dvh - 36px));
    flex-direction: column;
    overflow: hidden;
    color: #14213d;
    border: 1px solid #dbe4f2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(13, 31, 64, .28);
}
.laiya-profile-header,
.laiya-profile-footer,
.laiya-profile-heading,
.laiya-profile-avatar-card {
    display: flex;
    align-items: center;
}
.laiya-profile-header {
    flex: 0 0 auto;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px;
    border-bottom: 1px solid #e7edf6;
    background: linear-gradient(180deg, #fff, #f8fbff);
}
.laiya-profile-heading { gap: 13px; }
.laiya-profile-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #1769ff;
    border-radius: 12px;
    background: #eef5ff;
}
.laiya-profile-header h3 { margin: 0; font-size: 21px; letter-spacing: 0; }
.laiya-profile-header p { margin: 4px 0 0; color: #667793; font-size: 13px; }
.laiya-profile-close {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #253655;
    border: 1px solid #d8e2f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}
.laiya-profile-body {
    display: grid;
    min-height: 0;
    gap: 16px;
    padding: 22px 26px;
    overflow-y: auto;
    background: #f7faff;
}
.laiya-profile-card {
    padding: 18px;
    border: 1px solid #dfe8f4;
    border-radius: 14px;
    background: #fff;
}
.laiya-profile-avatar-card {
    gap: 16px;
    background: linear-gradient(135deg, #fff, #f6f9ff);
}
.laiya-profile-avatar {
    display: grid;
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    place-items: center;
    overflow: hidden;
    color: #fff;
    border: 2px solid #d8e5f7;
    border-radius: 50%;
    background: linear-gradient(145deg, #2d70ff, #554fe8);
    background-position: center;
    background-size: cover;
    font-size: 24px;
    font-weight: 800;
    cursor: pointer;
}
.laiya-profile-avatar-card strong,
.laiya-profile-card-title strong {
    display: block;
    font-size: 17px;
}
.laiya-profile-avatar-card span,
.laiya-profile-card-title span {
    display: block;
    margin-top: 5px;
    color: #667793;
    font-size: 12px;
}
.laiya-profile-link {
    margin-top: 8px;
    padding: 0;
    color: #1769ff;
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}
.laiya-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.laiya-profile-field { display: grid; gap: 7px; }
.laiya-profile-field[hidden] { display: none; }
.laiya-profile-field span {
    color: #52627b;
    font-size: 12px;
    font-weight: 750;
}
.laiya-profile-field input,
.laiya-profile-field select {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    color: #14213d;
    border: 1px solid #d7e2f0;
    border-radius: 12px;
    outline: 0;
    background: #fff;
    font: inherit;
}
.laiya-profile-field input:focus,
.laiya-profile-field select:focus {
    border-color: #8ab1ff;
    box-shadow: 0 0 0 3px rgba(23, 105, 255, .1);
}
.laiya-profile-field input[readonly] {
    color: #7a879b;
    background: #f4f7fb;
}
.laiya-profile-field-full { grid-column: 1 / -1; }
.laiya-profile-error {
    min-height: 18px;
    margin: 0;
    color: #d83b3b;
    font-size: 12px;
}
.laiya-profile-footer {
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 26px 22px;
    border-top: 1px solid #e7edf6;
    background: #fff;
}
.laiya-profile-secondary,
.laiya-profile-primary {
    height: 44px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
}
.laiya-profile-secondary {
    color: #243450;
    border: 1px solid #d8e2f0;
    background: #fff;
}
.laiya-profile-primary {
    color: #fff;
    border: 1px solid #1769ff;
    background: #1769ff;
    box-shadow: 0 12px 24px rgba(23, 105, 255, .2);
}
.laiya-profile-primary:disabled {
    opacity: .65;
    cursor: wait;
}
body.laiya-profile-open { overflow: hidden; }

@media (max-width: 640px) {
    .laiya-profile-overlay { padding: 12px; align-items: end; }
    .laiya-profile-modal { width: 100%; max-height: calc(100dvh - 24px); border-radius: 16px; }
    .laiya-profile-header,
    .laiya-profile-body,
    .laiya-profile-footer { padding-right: 18px; padding-left: 18px; }
    .laiya-profile-grid { grid-template-columns: 1fr; }
    .laiya-profile-field-full { grid-column: auto; }
}
