.profile-dialog {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1rem;
    background: #f8fafc;
    color: #111827;
}

.profile-intro {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.profile-kicker,
.profile-title,
.profile-subtitle {
    margin: 0;
}

.profile-kicker {
    color: #2563eb;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-title {
    margin-top: 0.2rem;
    color: #111827;
    font-size: 1.25rem;
    font-weight: 750;
    line-height: 1.2;
}

.profile-subtitle {
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.92rem;
    line-height: 1.45;
}

.profile-loading {
    padding: 1rem 0;
    color: #6b7280;
}

.profile-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-avatar-column,
.profile-avatar-card,
.profile-avatar-actions {
    display: flex;
    flex-direction: column;
}

.profile-avatar-card {
    align-items: center;
    gap: 0.9rem;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.profile-avatar-frame {
    width: 112px;
    height: 112px;
    border-radius: 999px;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    border: 1px solid #bfdbfe;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.profile-avatar-fallback {
    color: #1d4ed8;
    font-size: 2rem;
    font-weight: 750;
    letter-spacing: -0.04em;
}

.profile-avatar-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    max-width: 100%;
    text-align: center;
}

.profile-avatar-copy strong {
    color: #111827;
    font-size: 1rem;
    font-weight: 700;
}

.profile-avatar-copy span {
    color: #6b7280;
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.profile-avatar-actions {
    width: 100%;
    gap: 0.5rem;
}

.profile-upload-input {
    display: none;
}

.profile-upload-button,
.profile-password-button.rz-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    font-weight: 650;
    cursor: pointer;
}

.profile-upload-button {
    background: #2563eb;
    color: #ffffff;
    border: 1px solid #2563eb;
}

.profile-upload-button:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.profile-password-button.rz-button {
    background: #ffffff !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    box-shadow: none !important;
}

.profile-password-button.rz-button:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
}

.profile-upload-meta {
    max-width: 100%;
    color: #6b7280;
    font-size: 0.82rem;
    text-align: center;
    word-break: break-word;
}

.profile-form {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1rem;
}

.profile-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.profile-section-header h3,
.profile-section-header p {
    margin: 0;
}

.profile-section-header h3 {
    color: #111827;
    font-size: 1rem;
    font-weight: 700;
}

.profile-section-header p {
    margin-top: 0.2rem;
    color: #6b7280;
    font-size: 0.86rem;
    line-height: 1.4;
}

.profile-field-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.profile-field .rz-label {
    color: #374151;
    font-size: 0.84rem;
    font-weight: 650;
}

.profile-input.rz-textbox {
    width: 100%;
    min-height: 42px;
    color: #111827;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: none;
}

.profile-input.rz-textbox:hover {
    border-color: #9ca3af;
}

.profile-input.rz-textbox:focus,
.profile-input.rz-textbox:focus-visible {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
    outline: none;
}

.profile-input-readonly.rz-textbox {
    color: #6b7280;
    background: #f9fafb;
}

.profile-license-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile-license-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.32rem 0.65rem;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1;
}

.profile-license-empty {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0.7rem 0.85rem;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 0.9rem;
}

.profile-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.75rem;
    padding-top: 0.25rem;
    border-top: 1px solid #e5e7eb;
}

.profile-actions .rz-button {
    min-height: 42px;
    border-radius: 8px;
    box-shadow: none;
}

.profile-actions .rz-button.rz-primary {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

.profile-actions .rz-button.rz-primary:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

.profile-cancel.rz-button {
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #374151 !important;
}

.profile-cancel.rz-button:hover {
    background-color: #f9fafb !important;
    border-color: #9ca3af !important;
}

@media (min-width: 640px) {
    .profile-dialog {
        padding: 1.25rem;
    }

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

    .profile-field-wide {
        grid-column: 1 / -1;
    }

    .profile-actions {
        flex-direction: row;
        justify-content: flex-end;
    }
}

@media (min-width: 820px) {
    .profile-body {
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr);
        align-items: start;
        gap: 1.25rem;
    }

    .profile-avatar-card {
        position: sticky;
        top: 1rem;
    }
}
