/* ---- Profile (view + edit) and Create Profile ---- */

.form-card .profile-create-title {
    margin-bottom: 18px;
}

.profile-create-subtitle {
    margin: 0 0 20px;
    font-size: 0.85rem;
    color: var(--app-text-muted);
    line-height: 1.45;
}

.profile-header-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    padding: 18px 16px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--ui-primary-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ui-primary);
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    margin: 0 0 6px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--app-text);
    overflow-wrap: anywhere;
}

.profile-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--ui-primary-muted);
    color: var(--ui-primary);
}

.profile-email {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: var(--app-text-muted);
    overflow-wrap: anywhere;
}

.profile-detail-list {
    margin-bottom: 8px;
}

.profile-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--app-border);
}

.profile-detail-row:last-child {
    border-bottom: none;
}

.profile-detail-label {
    font-size: 0.85rem;
    color: var(--app-text-muted);
    flex-shrink: 0;
}

.profile-detail-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--app-text);
    text-align: right;
    overflow-wrap: anywhere;
}

.profile-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.profile-status-badge--active {
    background: rgba(111, 214, 127, 0.18);
    color: #6fd67f;
}

.profile-status-badge--inactive {
    background: rgba(248, 113, 113, 0.15);
    color: var(--ui-danger);
}

.profile-edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.profile-edit-actions .ui-button {
    flex: 1;
}

/* Avatar upload control (profile edit + create profile) */

.profile-picture-edit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
}

.profile-picture-edit-preview {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--ui-primary-muted);
    border: 1px solid var(--app-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ui-primary);
    font-weight: 700;
    font-size: 1.6rem;
}

.profile-picture-edit-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ui-primary);
    cursor: pointer;
    padding: 4px 2px;
}

.profile-picture-edit-input {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    cursor: pointer;
}

.profile-picture-hint {
    margin: 0;
    font-size: 0.78rem;
    color: var(--app-text-muted);
}

/* Appearance (theme) selector */

.theme-option-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.theme-option-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: var(--app-radius);
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.theme-option-btn i {
    font-size: 1.1rem;
}

.theme-option-btn.active {
    border-color: var(--ui-primary);
    background: var(--ui-primary-muted);
    color: var(--ui-primary);
}

.theme-option-btn:disabled {
    opacity: 0.6;
    cursor: default;
}
